diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json index 6b24e1bc2f..f4f9e055b1 100644 --- a/examples/react/search-validator-adapters/package.json +++ b/examples/react/search-validator-adapters/package.json @@ -9,18 +9,18 @@ "start": "vite" }, "dependencies": { + "@tanstack/react-query": "^5.59.0", "@tanstack/react-router": "^1.59.0", + "@tanstack/router-arktype-adapter": "^1.59.0", "@tanstack/router-devtools": "^1.59.0", "@tanstack/router-plugin": "^1.59.0", - "@tanstack/router-zod-adapter": "^1.59.0", "@tanstack/router-valibot-adapter": "^1.59.0", - "@tanstack/router-arktype-adapter": "^1.59.0", - "@tanstack/react-query": "^5.59.0", + "@tanstack/router-zod-adapter": "^1.59.0", + "arktype": "^2.0.0-rc.14", "react": "^18.2.0", "react-dom": "^18.2.0", - "zod": "^3.23.8", - "valibot": "^0.42.1", - "arktype": "^2.0.0-rc.14" + "valibot": "1.0.0-beta.0", + "zod": "^3.23.8" }, "devDependencies": { "@types/react": "^18.2.47", diff --git a/packages/router-valibot-adapter/package.json b/packages/router-valibot-adapter/package.json index b40c4c6d27..078b926c10 100644 --- a/packages/router-valibot-adapter/package.json +++ b/packages/router-valibot-adapter/package.json @@ -64,13 +64,13 @@ "node": ">=12" }, "devDependencies": { + "@tanstack/react-router": "workspace:*", "@testing-library/jest-dom": "^6.5.0", "@testing-library/react": "^16.0.1", - "@tanstack/react-router": "workspace:*", - "valibot": "^0.42.1" + "valibot": "1.0.0-beta.0" }, "peerDependencies": { - "valibot": ">=0.36.0", - "@tanstack/react-router": ">=1.43.2" + "@tanstack/react-router": ">=1.43.2", + "valibot": "^1.0.0" } } diff --git a/packages/router-valibot-adapter/src/index.ts b/packages/router-valibot-adapter/src/index.ts index ba9487d087..6fa1fd1366 100644 --- a/packages/router-valibot-adapter/src/index.ts +++ b/packages/router-valibot-adapter/src/index.ts @@ -1,20 +1,17 @@ import { parse } from 'valibot' import type { SearchValidatorAdapter } from '@tanstack/react-router' -import type { GenericSchema } from 'valibot' +import type { GenericSchema, InferInput, InferOutput } from 'valibot' export type ValibotSearchValidatorAdapter = - SearchValidatorAdapter< - NonNullable['input'], - NonNullable['output'] - > + SearchValidatorAdapter, InferOutput> export const valibotSearchValidator = ( options: TOptions, ): ValibotSearchValidatorAdapter => { return { types: { - input: options._types?.input, - output: options._types?.output, + input: null, + output: null, }, parse: (input) => parse(options, input), } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a01da0724..6a225ef4df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1581,10 +1581,10 @@ importers: version: 18.3.0 html-webpack-plugin: specifier: ^5.6.0 - version: 5.6.0(@rspack/core@1.0.8(@swc/helpers@0.5.13))(webpack@5.95.0) + version: 5.6.0(@rspack/core@1.0.8(@swc/helpers@0.5.13))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) swc-loader: specifier: ^0.2.6 - version: 0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.13))(webpack@5.95.0) + version: 0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.13))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -1662,8 +1662,8 @@ importers: specifier: ^18.2.0 version: 18.3.1(react@18.3.1) valibot: - specifier: ^0.42.1 - version: 0.42.1(typescript@5.6.2) + specifier: 1.0.0-beta.0 + version: 1.0.0-beta.0(typescript@5.6.2) zod: specifier: ^3.23.8 version: 3.23.8 @@ -2384,7 +2384,7 @@ importers: version: 4.3.2(vite@5.4.8(@types/node@22.5.4)(terser@5.31.1)) html-webpack-plugin: specifier: ^5.6.0 - version: 5.6.0(@rspack/core@1.0.8(@swc/helpers@0.5.13))(webpack@5.95.0) + version: 5.6.0(@rspack/core@1.0.8(@swc/helpers@0.5.13))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) react: specifier: ^18.3.1 version: 18.3.1 @@ -2393,7 +2393,7 @@ importers: version: 18.3.1(react@18.3.1) swc-loader: specifier: ^0.2.6 - version: 0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.13))(webpack@5.95.0) + version: 0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.13))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -2675,8 +2675,8 @@ importers: specifier: ^16.0.1 version: 16.0.1(@testing-library/dom@10.0.0)(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) valibot: - specifier: ^0.42.1 - version: 0.42.1(typescript@5.6.2) + specifier: 1.0.0-beta.0 + version: 1.0.0-beta.0(typescript@5.6.2) packages/router-vite-plugin: dependencies: @@ -9488,8 +9488,8 @@ packages: resolution: {integrity: sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg==} engines: {node: '>= 10.13.0'} - valibot@0.42.1: - resolution: {integrity: sha512-3keXV29Ar5b//Hqi4MbSdV7lfVp6zuYLZuA9V1PvQUsXqogr+u5lvLPLk3A4f74VUXDnf/JfWMN6sB+koJ/FFw==} + valibot@1.0.0-beta.0: + resolution: {integrity: sha512-Q/oine+NPMXdIy3vwluw0vidHLk0mTPUQBRHc+EHZXnEWF3KzLx1YLsVHPVrgHaMGRfV58P9eGOgxJvi0a059w==} peerDependencies: typescript: '>=5' peerDependenciesMeta: @@ -12299,17 +12299,17 @@ snapshots: '@webassemblyjs/ast': 1.12.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.95.0)': + '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4))': dependencies: webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.95.0)': + '@webpack-cli/info@2.0.2(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4))': dependencies: webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.1.0)(webpack@5.95.0)': + '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0))(webpack-dev-server@5.1.0(webpack-cli@5.1.4)(webpack@5.95.0))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4))': dependencies: webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0) @@ -14246,7 +14246,7 @@ snapshots: html-void-elements@3.0.0: {} - html-webpack-plugin@5.6.0(@rspack/core@1.0.8(@swc/helpers@0.5.13))(webpack@5.95.0): + html-webpack-plugin@5.6.0(@rspack/core@1.0.8(@swc/helpers@0.5.13))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -16386,7 +16386,7 @@ snapshots: csso: 5.0.5 picocolors: 1.1.0 - swc-loader@0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.13))(webpack@5.95.0): + swc-loader@0.2.6(@swc/core@1.7.26(@swc/helpers@0.5.13))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)): dependencies: '@swc/core': 1.7.26(@swc/helpers@0.5.13) '@swc/counter': 0.1.3 @@ -16456,26 +16456,26 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - terser-webpack-plugin@5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)): + terser-webpack-plugin@5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.1 - webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1) + webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4) optionalDependencies: '@swc/core': 1.7.26(@swc/helpers@0.5.13) esbuild: 0.23.1 - terser-webpack-plugin@5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.95.0): + terser-webpack-plugin@5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.1 - webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4) + webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1) optionalDependencies: '@swc/core': 1.7.26(@swc/helpers@0.5.13) esbuild: 0.23.1 @@ -16893,7 +16893,7 @@ snapshots: v8flags@4.0.1: {} - valibot@0.42.1(typescript@5.6.2): + valibot@1.0.0-beta.0(typescript@5.6.2): optionalDependencies: typescript: 5.6.2 @@ -17118,9 +17118,9 @@ snapshots: webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.95.0) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.95.0) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.1.0)(webpack@5.95.0) + '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) + '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) + '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4(webpack-dev-server@5.1.0)(webpack@5.95.0))(webpack-dev-server@5.1.0(webpack-cli@5.1.4)(webpack@5.95.0))(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) colorette: 2.0.20 commander: 10.0.1 cross-spawn: 7.0.3 @@ -17134,7 +17134,7 @@ snapshots: optionalDependencies: webpack-dev-server: 5.1.0(webpack-cli@5.1.4)(webpack@5.95.0) - webpack-dev-middleware@7.4.2(webpack@5.95.0): + webpack-dev-middleware@7.4.2(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)): dependencies: colorette: 2.0.20 memfs: 4.9.3 @@ -17173,7 +17173,7 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 7.4.2(webpack@5.95.0) + webpack-dev-middleware: 7.4.2(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) ws: 8.18.0 optionalDependencies: webpack: 5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4) @@ -17246,7 +17246,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.95.0) + terser-webpack-plugin: 5.3.10(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.95.0(@swc/core@1.7.26(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack-cli@5.1.4)) watchpack: 2.4.1 webpack-sources: 3.2.3 optionalDependencies: