Skip to content

Releases: honojs/middleware

@hono/[email protected]

23 Dec 02:27
c9d96ee
Compare
Choose a tag to compare

Minor Changes

@hono/[email protected]

15 Dec 10:02
f30f7ee
Compare
Choose a tag to compare

Minor Changes

  • #888 c63470e4915a0680c624bf97d52487572185a2d5 Thanks @miyaji255! - Enables handling of number, boolean, and bigint types in query parameters and headers.

    - 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[] }
            //...
          }
        )

@hono/[email protected]

13 Dec 08:04
9150550
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

13 Dec 08:25
f58f47e
Compare
Choose a tag to compare

@hono/[email protected]

10 Dec 04:04
27ff98f
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

03 Dec 08:55
6524a92
Compare
Choose a tag to compare

Minor Changes

@hono/[email protected]

03 Dec 01:09
21403ec
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

02 Dec 01:16
71c1e66
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

02 Dec 02:06
1765934
Compare
Choose a tag to compare

@hono/[email protected]

29 Nov 12:15
3bd19ae
Compare
Choose a tag to compare

Patch Changes