@hono/zod-openapi 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @hono/zod-openapi
2
2
 
3
+ ## 1.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1514](https://github.com/honojs/middleware/pull/1514) [`565d0e3e89523da773a3570fd1084f3ed7e41036`](https://github.com/honojs/middleware/commit/565d0e3e89523da773a3570fd1084f3ed7e41036) Thanks [@yusukebe](https://github.com/yusukebe)! - fix: change middleware type from MiddlewareHandler to H
8
+
9
+ Update RouteConfig middleware field type to use H (Handler | MiddlewareHandler union) instead of MiddlewareHandler. This aligns with Hono's on() method type expectations and resolves type errors introduced in Hono v4.10.0+.
10
+
11
+ The H type is the correct type for handlers passed to Hono's on() method, and this change maintains runtime compatibility while fixing TypeScript compilation errors.
12
+
3
13
  ## 1.1.3
4
14
 
5
15
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { RouteConfig as RouteConfig$1, ZodRequestBody, ZodContentObject, ZodMediaTypeObject, OpenApiGeneratorV3, OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
2
2
  export { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
3
- import { MiddlewareHandler, TypedResponse, Env, ValidationTargets, Context, Input, Handler, Schema, Hono, ToSchema } from 'hono';
4
- import { MergePath, MergeSchemaPath } from 'hono/types';
3
+ import { TypedResponse, Env, ValidationTargets, Context, MiddlewareHandler, Input, Handler, Schema, Hono, ToSchema } from 'hono';
4
+ import { H, MergePath, MergeSchemaPath } from 'hono/types';
5
5
  import { InfoStatusCode, SuccessStatusCode, RedirectStatusCode, ClientErrorStatusCode, ServerErrorStatusCode, StatusCode } from 'hono/utils/http-status';
6
6
  import { JSONParsed, RemoveBlankRecord } from 'hono/utils/types';
7
7
  import { OpenAPIObject } from 'openapi3-ts/oas30';
@@ -11,7 +11,7 @@ export { z } from 'zod';
11
11
 
12
12
  type MaybePromise<T> = Promise<T> | T;
13
13
  type RouteConfig = RouteConfig$1 & {
14
- middleware?: MiddlewareHandler | MiddlewareHandler[];
14
+ middleware?: H | H[];
15
15
  hide?: boolean;
16
16
  };
17
17
  type RequestTypes = {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { RouteConfig as RouteConfig$1, ZodRequestBody, ZodContentObject, ZodMediaTypeObject, OpenApiGeneratorV3, OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
2
2
  export { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
3
- import { MiddlewareHandler, TypedResponse, Env, ValidationTargets, Context, Input, Handler, Schema, Hono, ToSchema } from 'hono';
4
- import { MergePath, MergeSchemaPath } from 'hono/types';
3
+ import { TypedResponse, Env, ValidationTargets, Context, MiddlewareHandler, Input, Handler, Schema, Hono, ToSchema } from 'hono';
4
+ import { H, MergePath, MergeSchemaPath } from 'hono/types';
5
5
  import { InfoStatusCode, SuccessStatusCode, RedirectStatusCode, ClientErrorStatusCode, ServerErrorStatusCode, StatusCode } from 'hono/utils/http-status';
6
6
  import { JSONParsed, RemoveBlankRecord } from 'hono/utils/types';
7
7
  import { OpenAPIObject } from 'openapi3-ts/oas30';
@@ -11,7 +11,7 @@ export { z } from 'zod';
11
11
 
12
12
  type MaybePromise<T> = Promise<T> | T;
13
13
  type RouteConfig = RouteConfig$1 & {
14
- middleware?: MiddlewareHandler | MiddlewareHandler[];
14
+ middleware?: H | H[];
15
15
  hide?: boolean;
16
16
  };
17
17
  type RequestTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/zod-openapi",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "A wrapper class of Hono which supports OpenAPI.",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
@@ -47,8 +47,8 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@arethetypeswrong/cli": "^0.18.2",
50
- "hono": "^4.9.8",
51
- "publint": "^0.3.9",
50
+ "hono": "^4.10.1",
51
+ "publint": "^0.3.14",
52
52
  "tsup": "^8.5.0",
53
53
  "typescript": "^5.8.2",
54
54
  "vitest": "^3.2.4",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@asteasolutions/zod-to-openapi": "^8.1.0",
60
- "@hono/zod-validator": "^0.7.3",
60
+ "@hono/zod-validator": "^0.7.4",
61
61
  "openapi3-ts": "^4.5.0"
62
62
  },
63
63
  "engines": {