Skip to content
Source
Sign inSign up
TanStack/router

fix(router-core): format Standard Schema issues instead of JSON.stringify #8471

Openharshit-d3v(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/8471/headopened

Showing 11 changed files with 24 additions and 0 deletions (loading 8).

x
0 of 11 viewed, 11 left
8 additions and 0 deletions.changeset/olive-donkeys-repeat.mdAdded
View file
@@ -0,0 +1,8 @@
+---
+'@tanstack/router-core': patch
+'@tanstack/start-client-core': patch
+---
+​
+Format Standard Schema validation issues instead of running them through `JSON.stringify`. An issue can carry a value that cannot be serialized, such as a bigint or a circular reference, which threw and hid the real failure, and the resulting blob buried the messages. Server-function validation and router search validation now share one formatter that reports each issue as `path: message`, quoting any key that is not a plain identifier so `['a', 'b']` and `['a.b']` stay distinct.
+​
+Fixes #7779
10 additions and 0 deletionspackages/router-core/package.jsonModified
View file
@@ -48,6 +48,16 @@
"default": "./dist/cjs/index.cjs"
},
+ "./internal": {
+ "import": {
+ "types": "./dist/esm/internal.d.ts",
+ "default": "./dist/esm/internal.js"
+ },
+ "require": {
+ "types": "./dist/cjs/internal.d.cts",
+ "default": "./dist/cjs/internal.cjs"
+ }
+ },