diff --git a/packages/class-validator/package.json b/packages/class-validator/package.json index 6589ea15b..c3ee4432e 100644 --- a/packages/class-validator/package.json +++ b/packages/class-validator/package.json @@ -44,4 +44,4 @@ "class-validator": "^0.14.1", "reflect-metadata": "^0.2.2" } -} \ No newline at end of file +} diff --git a/packages/typebox-validator/CHANGELOG.md b/packages/typebox-validator/CHANGELOG.md index 2b3aa13c9..204cfe7ff 100644 --- a/packages/typebox-validator/CHANGELOG.md +++ b/packages/typebox-validator/CHANGELOG.md @@ -1,5 +1,11 @@ # @hono/typebox-validator +## 0.2.6 + +### Patch Changes + +- [#821](https://github.com/honojs/middleware/pull/821) [`553112c2c6440f3326e9fde839681620acb3090e`](https://github.com/honojs/middleware/commit/553112c2c6440f3326e9fde839681620acb3090e) Thanks [@MathurAditya724](https://github.com/MathurAditya724)! - exported the Hook type + ## 0.2.5 ### Patch Changes diff --git a/packages/typebox-validator/package.json b/packages/typebox-validator/package.json index 2e499ee79..0945307fd 100644 --- a/packages/typebox-validator/package.json +++ b/packages/typebox-validator/package.json @@ -1,6 +1,6 @@ { "name": "@hono/typebox-validator", - "version": "0.2.5", + "version": "0.2.6", "description": "Validator middleware using TypeBox", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/packages/typebox-validator/src/index.ts b/packages/typebox-validator/src/index.ts index 2f52ee834..3b38f5d8d 100644 --- a/packages/typebox-validator/src/index.ts +++ b/packages/typebox-validator/src/index.ts @@ -3,7 +3,7 @@ import { Value, type ValueError } from '@sinclair/typebox/value' import type { Context, Env, MiddlewareHandler, ValidationTargets } from 'hono' import { validator } from 'hono/validator' -type Hook = ( +export type Hook = ( result: { success: true; data: T } | { success: false; errors: ValueError[] }, c: Context ) => Response | Promise | void diff --git a/packages/valibot-validator/CHANGELOG.md b/packages/valibot-validator/CHANGELOG.md index 6ffffd985..d2427e4f7 100644 --- a/packages/valibot-validator/CHANGELOG.md +++ b/packages/valibot-validator/CHANGELOG.md @@ -1,5 +1,17 @@ # @hono/valibot-validator +## 0.5.1 + +### Patch Changes + +- [#821](https://github.com/honojs/middleware/pull/821) [`553112c2c6440f3326e9fde839681620acb3090e`](https://github.com/honojs/middleware/commit/553112c2c6440f3326e9fde839681620acb3090e) Thanks [@MathurAditya724](https://github.com/MathurAditya724)! - exported the Hook type + +## 0.5.0 + +### Minor Changes + +- [#819](https://github.com/honojs/middleware/pull/819) [`d6fcbbd3366b356616fd188d9943ddb3e8294e5b`](https://github.com/honojs/middleware/commit/d6fcbbd3366b356616fd188d9943ddb3e8294e5b) Thanks [@fabian-hiller](https://github.com/fabian-hiller)! - Upgrade Valibot peer dependency to >=v1.0.0-beta.4 + ## 0.4.1 ### Patch Changes diff --git a/packages/valibot-validator/package.json b/packages/valibot-validator/package.json index 57c7f9a71..16b0166b3 100644 --- a/packages/valibot-validator/package.json +++ b/packages/valibot-validator/package.json @@ -1,6 +1,6 @@ { "name": "@hono/valibot-validator", - "version": "0.4.1", + "version": "0.5.1", "description": "Validator middleware using Valibot", "type": "module", "main": "dist/index.js", @@ -32,12 +32,12 @@ "homepage": "https://github.com/honojs/middleware", "peerDependencies": { "hono": ">=3.9.0", - "valibot": "^1.0.0 || ^1.0.0-beta || ^1.0.0-rc" + "valibot": "^1.0.0 || ^1.0.0-beta.4 || ^1.0.0-rc" }, "devDependencies": { "hono": "^4.5.1", "jest": "^29.7.0", "tsup": "^8.3.0", - "valibot": "^1.0.0-beta.0" + "valibot": "^1.0.0-beta.5" } } diff --git a/packages/valibot-validator/src/index.ts b/packages/valibot-validator/src/index.ts index 36834916c..e430583f6 100644 --- a/packages/valibot-validator/src/index.ts +++ b/packages/valibot-validator/src/index.ts @@ -3,7 +3,7 @@ import { validator } from 'hono/validator' import type { GenericSchema, GenericSchemaAsync, InferInput, InferOutput, SafeParseResult } from 'valibot' import { safeParseAsync } from 'valibot' -type Hook = ( +export type Hook = ( result: SafeParseResult, c: Context ) => Response | Promise | void | Promise diff --git a/yarn.lock b/yarn.lock index 9f5a2b3d7..aec60e8fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2884,10 +2884,10 @@ __metadata: hono: "npm:^4.5.1" jest: "npm:^29.7.0" tsup: "npm:^8.3.0" - valibot: "npm:^1.0.0-beta.0" + valibot: "npm:^1.0.0-beta.5" peerDependencies: hono: ">=3.9.0" - valibot: ^1.0.0 || ^1.0.0-beta || ^1.0.0-rc + valibot: ^1.0.0 || ^1.0.0-beta.4 || ^1.0.0-rc languageName: unknown linkType: soft @@ -20466,15 +20466,15 @@ __metadata: languageName: node linkType: hard -"valibot@npm:^1.0.0-beta.0": - version: 1.0.0-beta.0 - resolution: "valibot@npm:1.0.0-beta.0" +"valibot@npm:^1.0.0-beta.5": + version: 1.0.0-beta.5 + resolution: "valibot@npm:1.0.0-beta.5" peerDependencies: typescript: ">=5" peerDependenciesMeta: typescript: optional: true - checksum: 0b5525fb3504f65011d2c7f57679d187f63c1205da2f441397f3d263514672938d2a8145b85ea2e1e46c505b5641d79f5628ba3262689b34fb918177176660fe + checksum: 9c433f6a6ba5d1761a42801d76ae87e9d81ade16908d8a74643d0f7c6f9f744f289b042c80cf619757a72c57891ab7e73b8d6b5d24e9e89bb4a78f0a9936552d languageName: node linkType: hard