Skip to content

Commit

Permalink
Version Packages (honojs#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and askorupskyy committed Dec 18, 2024
1 parent 33d8ecd commit 91f4505
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 36 deletions.
35 changes: 0 additions & 35 deletions .changeset/support-http-module.md

This file was deleted.

36 changes: 36 additions & 0 deletions packages/typia-validator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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<Schema>(),
+ typia.http.createValidateQuery<Schema>(),
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
Expand Down
2 changes: 1 addition & 1 deletion packages/typia-validator/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 91f4505

Please sign in to comment.