Skip to content

Commit

Permalink
chore: update zod and arktype (#3178)
Browse files Browse the repository at this point in the history
* chore: update zod and arktype

* ci: apply automated fixes

* chore: fix tests

* chore: remove ts ignore

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
chorobin and autofix-ci[bot] authored Jan 15, 2025
1 parent 8f7c193 commit 0cc3e14
Show file tree
Hide file tree
Showing 40 changed files with 243 additions and 1,209 deletions.
2 changes: 1 addition & 1 deletion e2e/react-router/basic-esbuild-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@tanstack/router-plugin": "workspace:^",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-router/basic-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-router/basic-react-query-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/react-router/basic-virtual-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
2 changes: 1 addition & 1 deletion e2e/start/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
"vinxi": "0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/authenticated-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-default-search-params/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"redaxios": "^0.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-file-based-codesplitting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-react-query-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-virtual-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/deferred-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"redaxios": "^0.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/kitchen-sink-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/kitchen-sink-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"immer": "^10.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"immer": "^10.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/large-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/quickstart-esbuild-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/quickstart-file-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@tanstack/react-router": "^1.97.0",
"@tanstack/router-plugin": "^1.97.0",
"redaxios": "^0.5.1",
"zod": "^3.23.8",
"zod": "^3.24.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/search-validator-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"@tanstack/router-plugin": "^1.97.0",
"@tanstack/valibot-adapter": "^1.97.0",
"@tanstack/zod-adapter": "^1.97.0",
"arktype": "2.0.0-rc.26",
"arktype": "^2.0.0-rc.33",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"valibot": "1.0.0-beta.9",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test('can navigate to the route', async () => {
}

const search = type({
'search?': 'string = "default"',
search: 'string = "default"',
})

const arkTypeRoute = createRoute({
Expand Down
2 changes: 1 addition & 1 deletion examples/react/start-convex-trellaux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"tailwind-merge": "^2.5.5",
"tiny-invariant": "^1.3.3",
"vinxi": "0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.65",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/start-trellaux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"tailwind-merge": "^2.5.5",
"tiny-invariant": "^1.3.3",
"vinxi": "0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.65",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/with-framer-motion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"framer-motion": "^11.13.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/with-trpc-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"vinxi": "0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/with-trpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"react-dom": "^18.2.0",
"redaxios": "^0.5.1",
"vinxi": "0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@types/react": "^18.2.47",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"tiny-invariant": "^1.3.3",
"validate-npm-package-name": "^6.0.0",
"yocto-spinner": "^0.1.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@inquirer/type": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"combinate": "^1.1.11",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"peerDependencies": {
"react": ">=18",
Expand Down
1 change: 0 additions & 1 deletion packages/react-router/tests/link.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4274,7 +4274,6 @@ describe('search middleware', () => {
}),
search: {
middlewares: [
// @ts-expect-error we cannot use zodValidator here to due to circular dependency
// this means we cannot get the correct input type for this schema
stripSearchParams({ foo: 'default' }),
retainSearchParams(true),
Expand Down
2 changes: 1 addition & 1 deletion packages/router-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@tanstack/virtual-file-routes": "workspace:^",
"tsx": "^4.19.2",
"prettier": "^3.4.2",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"peerDependencies": {
"@tanstack/react-router": "workspace:^"
Expand Down
2 changes: 1 addition & 1 deletion packages/router-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"chokidar": "^3.6.0",
"diff": "^7.0.0",
"unplugin": "^1.16.0",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"peerDependencies": {
"@rsbuild/core": ">=1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"ofetch": "^1.4.1",
"tiny-invariant": "^1.3.3",
"vinxi": "0.5.1",
"zod": "^3.23.8"
"zod": "^3.24.1"
},
"devDependencies": {
"@testing-library/react": "^16.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/zod-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@tanstack/react-router": "workspace:^",
"zod": "^3.23.8",
"zod": "^3.24.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/zod-adapter/tests/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ test('when using zod schema without adapter', () => {
.parameter(0)
.toHaveProperty('search')
.exclude<Function | true>()
.toEqualTypeOf<{ page: number; indexPage: number }>()
.toEqualTypeOf<{ page?: number; indexPage?: number } | undefined>()

expectTypeOf(Link<typeof router, string, '/'>)
.parameter(0)
.toHaveProperty('search')
.returns.toEqualTypeOf<{ page: number; indexPage: number }>()
.returns.toEqualTypeOf<{ page?: number; indexPage?: number }>()

expectTypeOf(Link<typeof router, '/', '/'>)
.parameter(0)
Expand Down
Loading

0 comments on commit 0cc3e14

Please sign in to comment.