Skip to content

Commit 565d0e3

Browse files
authored
chore: bump hono (#1514)
* chore: bump `hono` * fix the ajv validator type error * add changeset * fix(zod-openapi): change middleware type from MiddlewareHandler to H 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+. The H type is the correct type for handlers passed to Hono's on() method, and this change maintains runtime compatibility while fixin TypeScript compilation errors. * changeset
1 parent 5e9f153 commit 565d0e3

File tree

46 files changed

+105
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+105
-91
lines changed

.changeset/bumpy-cats-cheat.md

Lines changed: 9 additions & 0 deletions

.changeset/rotten-times-tap.md

Lines changed: 5 additions & 0 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@types/ws": "^8.18.0",
4646
"@vitest/coverage-istanbul": "^3.2.4",
4747
"eslint": "^9.34.0",
48-
"hono": "^4.9.10",
48+
"hono": "^4.10.1",
4949
"pkg-pr-new": "^0.0.54",
5050
"prettier": "^3.6.2",
5151
"tsup": "^8.5.0",

packages/ajv-validator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"devDependencies": {
4949
"@arethetypeswrong/cli": "^0.18.2",
5050
"ajv": "^8.12.0",
51-
"hono": "^4.9.10",
51+
"hono": "^4.10.1",
5252
"publint": "^0.3.14",
5353
"tsup": "^8.5.0",
5454
"typescript": "^5.8.2",

packages/ajv-validator/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,17 @@ export function ajvValidator<
8888
if (valid) {
8989
if (hook) {
9090
const hookResult = hook({ success: true, data: data as T }, c)
91-
if (hookResult instanceof Response || hookResult instanceof Promise) {
91+
if (hookResult) {
9292
return hookResult
9393
}
9494
}
95-
return data as T
95+
return data
9696
}
9797

9898
const errors = validate.errors || []
9999
if (hook) {
100100
const hookResult = hook({ success: false, errors }, c)
101-
if (hookResult instanceof Response || hookResult instanceof Promise) {
101+
if (hookResult) {
102102
return hookResult
103103
}
104104
}

packages/arktype-validator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"devDependencies": {
5050
"@arethetypeswrong/cli": "^0.18.2",
5151
"arktype": "^2.1.20",
52-
"hono": "^4.9.10",
52+
"hono": "^4.10.1",
5353
"publint": "^0.3.14",
5454
"tsup": "^8.5.0",
5555
"typescript": "^5.8.2",

packages/auth-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@arethetypeswrong/cli": "^0.18.2",
6767
"@auth/core": "^0.35.3",
6868
"@types/react": "^19",
69-
"hono": "^4.9.10",
69+
"hono": "^4.10.1",
7070
"publint": "^0.3.14",
7171
"react": "^19.1.1",
7272
"tsup": "^8.5.0",

packages/bun-compress/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@arethetypeswrong/cli": "^0.18.2",
4848
"@types/bun": "^1.2.12",
4949
"@types/node": "^24.5.2",
50-
"hono": "^4.9.10",
50+
"hono": "^4.10.1",
5151
"publint": "^0.3.14",
5252
"tsup": "^8.5.0",
5353
"typescript": "^5.8.2",

packages/bun-transpiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"devDependencies": {
4848
"@arethetypeswrong/cli": "^0.18.2",
49-
"hono": "^4.9.10",
49+
"hono": "^4.10.1",
5050
"publint": "^0.3.14",
5151
"tsup": "^8.5.0",
5252
"typescript": "^5.8.2",

packages/casbin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"devDependencies": {
6060
"@arethetypeswrong/cli": "^0.18.2",
6161
"casbin": "^5.30.0",
62-
"hono": "^4.9.10",
62+
"hono": "^4.10.1",
6363
"publint": "^0.3.14",
6464
"tsup": "^8.5.0",
6565
"typescript": "^5.8.2",

0 commit comments

Comments
 (0)