From f30f7ee28cfae36771c31acf7c86e62a69664651 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 18:59:37 +0900 Subject: [PATCH] Version Packages (#889) --- .changeset/support-http-module.md | 35 -------------------------- packages/typia-validator/CHANGELOG.md | 36 +++++++++++++++++++++++++++ packages/typia-validator/package.json | 2 +- 3 files changed, 37 insertions(+), 36 deletions(-) delete mode 100644 .changeset/support-http-module.md diff --git a/.changeset/support-http-module.md b/.changeset/support-http-module.md deleted file mode 100644 index 078c4f5ef..000000000 --- a/.changeset/support-http-module.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -'@hono/typia-validator': minor ---- - -Enables handling of `number`, `boolean`, and `bigint` types in query parameters and headers. - -```diff -- import { typiaValidator } from '@hono/typia-validator'; -+ import { typiaValidator } from '@hono/typia-validator/http'; - import { Hono } from 'hono'; - import typia, { type tags } from 'typia'; - - interface Schema { -- pages: `${number}`[]; -+ pages: (number & tags.Type<'uint32'>)[]; - } - - const app = new Hono() - .get( - '/books', - typiaValidator( -- typia.createValidate(), -+ typia.http.createValidateQuery(), - async (result, c) => { - if (!result.success) - return c.text('Invalid query parameters', 400); -- return { pages: result.data.pages.map(Number) }; - } - ), - async c => { - const { pages } = c.req.valid('query'); // { pages: number[] } - //... - } - ) -``` \ No newline at end of file diff --git a/packages/typia-validator/CHANGELOG.md b/packages/typia-validator/CHANGELOG.md index b04b5ae36..e245ceb0a 100644 --- a/packages/typia-validator/CHANGELOG.md +++ b/packages/typia-validator/CHANGELOG.md @@ -1,5 +1,41 @@ # @hono/typia-validator +## 0.1.0 + +### Minor Changes + +- [#888](https://github.com/honojs/middleware/pull/888) [`c63470e4915a0680c624bf97d52487572185a2d5`](https://github.com/honojs/middleware/commit/c63470e4915a0680c624bf97d52487572185a2d5) Thanks [@miyaji255](https://github.com/miyaji255)! - Enables handling of `number`, `boolean`, and `bigint` types in query parameters and headers. + + ```diff + - import { typiaValidator } from '@hono/typia-validator'; + + import { typiaValidator } from '@hono/typia-validator/http'; + import { Hono } from 'hono'; + import typia, { type tags } from 'typia'; + + interface Schema { + - pages: `${number}`[]; + + pages: (number & tags.Type<'uint32'>)[]; + } + + const app = new Hono() + .get( + '/books', + typiaValidator( + - typia.createValidate(), + + typia.http.createValidateQuery(), + async (result, c) => { + if (!result.success) + return c.text('Invalid query parameters', 400); + - return { pages: result.data.pages.map(Number) }; + } + ), + async c => { + const { pages } = c.req.valid('query'); // { pages: number[] } + //... + } + ) + ``` + ## 0.0.5 ### Patch Changes diff --git a/packages/typia-validator/package.json b/packages/typia-validator/package.json index e1d68fcce..11d586bda 100644 --- a/packages/typia-validator/package.json +++ b/packages/typia-validator/package.json @@ -1,6 +1,6 @@ { "name": "@hono/typia-validator", - "version": "0.0.5", + "version": "0.1.0", "description": "Validator middleware using Typia", "main": "dist/cjs/index.js", "module": "dist/esm/index.js",