Skip to content

Commit b18f243

Browse files
chore(dev-deps): upgrade to hono v4 (#1092)
* chore(dev-deps): upgrade to hono v4 * chore(zod-openapi): build workspace dependencies * chore(trpc-server): ignore null body type
1 parent 9a536e6 commit b18f243

File tree

43 files changed

+16
-221
lines changed

Some content is hidden

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

43 files changed

+16
-221
lines changed

Diff for: .github/workflows/ci-zod-openapi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
node-version: 20.x
2020
- run: yarn workspaces focus hono-middleware @hono/zod-openapi
21-
- run: yarn workspace @hono/zod-openapi build
21+
- run: yarn workspaces foreach --topological --recursive --from @hono/zod-openapi run build
2222
- run: yarn workspace @hono/zod-openapi publint
2323
- run: yarn eslint packages/zod-openapi
2424
- run: yarn test --coverage --project @hono/zod-openapi

Diff for: package.json

+1-35
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,6 @@
88
]
99
},
1010
"scripts": {
11-
"build:hello": "yarn workspace @hono/hello build",
12-
"build:zod-validator": "yarn workspace @hono/zod-validator build",
13-
"build:class-validator": "yarn workspace @hono/class-validator build",
14-
"build:arktype-validator": "yarn workspace @hono/arktype-validator build",
15-
"build:qwik-city": "yarn workspace @hono/qwik-city build",
16-
"build:graphql-server": "yarn workspace @hono/graphql-server build",
17-
"build:sentry": "yarn workspace @hono/sentry build",
18-
"build:firebase-auth": "yarn workspace @hono/firebase-auth build",
19-
"build:trpc-server": "yarn workspace @hono/trpc-server build",
20-
"build:clerk-auth": "yarn workspace @hono/clerk-auth build",
21-
"build:typebox-validator": "yarn workspace @hono/typebox-validator build",
22-
"build:medley-router": "yarn workspace @hono/medley-router build",
23-
"build:valibot-validator": "yarn workspace @hono/valibot-validator build",
24-
"build:zod-openapi": "yarn workspace @hono/zod-openapi install && yarn workspace @hono/zod-openapi build",
25-
"build:typia-validator": "yarn workspace @hono/typia-validator build",
26-
"build:swagger-ui": "yarn workspace @hono/swagger-ui build",
27-
"build:swagger-editor": "yarn workspace @hono/swagger-editor build",
28-
"build:esbuild-transpiler": "yarn workspace @hono/esbuild-transpiler build",
29-
"build:event-emitter": "yarn workspace @hono/event-emitter build",
30-
"build:oauth-providers": "yarn workspace @hono/oauth-providers build",
31-
"build:react-renderer": "yarn workspace @hono/react-renderer build",
32-
"build:auth-js": "yarn workspace @hono/auth-js build",
33-
"build:bun-transpiler": "yarn workspace @hono/bun-transpiler build",
34-
"build:prometheus": "yarn workspace @hono/prometheus build",
35-
"build:oidc-auth": "yarn workspace @hono/oidc-auth build",
36-
"build:node-ws": "yarn workspace @hono/node-ws build",
37-
"build:react-compat": "yarn workspace @hono/react-compat build",
38-
"build:effect-validator": "yarn workspace @hono/effect-validator build",
39-
"build:conform-validator": "yarn workspace @hono/conform-validator build",
40-
"build:casbin": "yarn workspace @hono/casbin build",
41-
"build:ajv-validator": "yarn workspace @hono/ajv-validator build",
42-
"build:tsyringe": "yarn workspace @hono/tsyringe build",
43-
"build:cloudflare-access": "yarn workspace @hono/cloudflare-access build",
44-
"build:standard-validator": "yarn workspace @hono/standard-validator build",
45-
"build:otel": "yarn workspace @hono/otel build",
4611
"build": "yarn workspaces foreach --all --parallel --topological --verbose run build",
4712
"publint": "yarn workspaces foreach --all --parallel --topological --verbose run publint",
4813
"test": "vitest",
@@ -69,6 +34,7 @@
6934
"@typescript-eslint/parser": "^8.7.0",
7035
"@vitest/coverage-istanbul": "^3.0.8",
7136
"eslint": "^9.17.0",
37+
"hono": "^4.7.5",
7238
"npm-run-all2": "^6.2.2",
7339
"prettier": "^2.7.1",
7440
"tsup": "^8.4.0",

Diff for: packages/ajv-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
4646
"ajv": ">=8.12.0",
47-
"hono": "^4.4.12",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",
5049
"vitest": "^3.0.8"

Diff for: packages/arktype-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"devDependencies": {
4646
"@arethetypeswrong/cli": "^0.17.4",
4747
"arktype": "^2.0.0-dev.14",
48-
"hono": "^3.11.7",
4948
"publint": "^0.3.9",
5049
"tsup": "^8.4.0",
5150
"vitest": "^3.0.8"

Diff for: packages/arktype-validator/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const arktypeValidator = <
2929
schema: T,
3030
hook?: Hook<T['infer'], E, P>
3131
): MiddlewareHandler<E, P, V> =>
32+
// @ts-expect-error not typed well
3233
validator(target, (value, c) => {
3334
const out = schema(value)
3435

Diff for: packages/auth-js/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"@arethetypeswrong/cli": "^0.17.4",
6363
"@auth/core": "^0.35.3",
6464
"@types/react": "^18",
65-
"hono": "^3.11.7",
6665
"publint": "^0.3.9",
6766
"react": "^18.2.0",
6867
"tsup": "^8.4.0",

Diff for: packages/bun-transpiler/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
4646
"@types/bun": "^1.0.0",
47-
"hono": "^3.11.7",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",
5049
"vitest": "^3.0.8"

Diff for: packages/casbin/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"devDependencies": {
5656
"@arethetypeswrong/cli": "^0.17.4",
5757
"casbin": "^5.30.0",
58-
"hono": "^4.5.11",
5958
"publint": "^0.3.9",
6059
"tsup": "^8.4.0",
6160
"vitest": "^3.0.8"

Diff for: packages/class-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
},
4545
"devDependencies": {
4646
"@arethetypeswrong/cli": "^0.17.4",
47-
"hono": "^4.0.10",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",
5049
"vitest": "^3.0.8"

Diff for: packages/clerk-auth/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"@arethetypeswrong/cli": "^0.17.4",
4747
"@clerk/backend": "^1.0.0",
4848
"@types/react": "^18",
49-
"hono": "^3.11.7",
5049
"publint": "^0.3.9",
5150
"react": "^18.2.0",
5251
"tsup": "^8.4.0",

Diff for: packages/cloudflare-access/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"devDependencies": {
4444
"@arethetypeswrong/cli": "^0.17.4",
4545
"@cloudflare/workers-types": "^4.20230307.0",
46-
"hono": "^4.4.12",
4746
"publint": "^0.3.9",
4847
"tsup": "^8.4.0",
4948
"vitest": "^3.0.8"

Diff for: packages/conform-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"@conform-to/yup": "^1.1.5",
4949
"@conform-to/zod": "^1.1.5",
5050
"conform-to-valibot": "^1.10.0",
51-
"hono": "^4.5.1",
5251
"publint": "^0.3.9",
5352
"tsup": "^8.4.0",
5453
"valibot": "^0.36.0",

Diff for: packages/effect-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"devDependencies": {
4646
"@arethetypeswrong/cli": "^0.17.4",
4747
"effect": "3.10.0",
48-
"hono": "^4.4.13",
4948
"publint": "^0.3.9",
5049
"tsup": "^8.4.0",
5150
"vitest": "^3.0.8"

Diff for: packages/esbuild-transpiler/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"@arethetypeswrong/cli": "^0.17.4",
7575
"esbuild": "^0.19.9",
7676
"esbuild-wasm": "^0.19.5",
77-
"hono": "^3.11.7",
7877
"publint": "^0.3.9",
7978
"tsup": "^8.4.0",
8079
"vitest": "^3.0.8"

Diff for: packages/event-emitter/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
},
4545
"devDependencies": {
4646
"@arethetypeswrong/cli": "^0.17.4",
47-
"hono": "^4.3.6",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",
5049
"vitest": "^3.0.8"

Diff for: packages/firebase-auth/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@arethetypeswrong/cli": "^0.17.4",
5252
"@cloudflare/workers-types": "^4.20240222.0",
5353
"firebase-tools": "^13.29.1",
54-
"hono": "^4.2.4",
5554
"miniflare": "^3.20240208.0",
5655
"prettier": "^3.2.5",
5756
"publint": "^0.3.9",

Diff for: packages/firebase-auth/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface VerifyFirebaseAuthConfig {
1414
projectId: string
1515
authorizationHeaderKey?: string
1616
keyStore?: KeyStorer
17-
keyStoreInitializer?: (c: Context) => KeyStorer
17+
keyStoreInitializer?: (c: Context<{ Bindings: VerifyFirebaseAuthEnv }>) => KeyStorer
1818
disableErrorLog?: boolean
1919
firebaseEmulatorHost?: string
2020
}
@@ -102,7 +102,7 @@ export interface VerifySessionCookieFirebaseAuthConfig {
102102
projectId: string
103103
cookieName?: string
104104
keyStore?: KeyStorer
105-
keyStoreInitializer?: (c: Context) => KeyStorer
105+
keyStoreInitializer?: (c: Context<{ Bindings: VerifyFirebaseAuthEnv }>) => KeyStorer
106106
firebaseEmulatorHost?: string
107107
redirects: {
108108
signIn: string

Diff for: packages/graphql-server/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"devDependencies": {
4343
"@arethetypeswrong/cli": "^0.17.4",
4444
"@cloudflare/workers-types": "^3.14.0",
45-
"hono": "^4.0.2",
4645
"publint": "^0.3.9",
4746
"tsup": "^8.4.0",
4847
"vitest": "^3.0.8"

Diff for: packages/hello/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
},
4343
"devDependencies": {
4444
"@arethetypeswrong/cli": "^0.17.4",
45-
"hono": "^4.4.12",
4645
"publint": "^0.3.9",
4746
"tsup": "^8.4.0",
4847
"vitest": "^3.0.8"

Diff for: packages/medley-router/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
46-
"hono": "^3.11.7",
4746
"publint": "^0.3.9",
4847
"tsup": "^8.4.0",
4948
"vitest": "^3.0.8"

Diff for: packages/node-ws/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"@hono/node-server": "^1.11.1",
4444
"@types/node": "^20.14.8",
4545
"@types/ws": "^8.18.0",
46-
"hono": "^4.6.0",
4746
"publint": "^0.3.9",
4847
"tsup": "^8.4.0",
4948
"vitest": "^3.0.8"

Diff for: packages/oauth-providers/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
},
6868
"devDependencies": {
6969
"@arethetypeswrong/cli": "^0.17.4",
70-
"hono": "^4.5.1",
7170
"msw": "^2.0.11",
7271
"publint": "^0.3.9",
7372
"tsup": "^8.4.0",

Diff for: packages/oidc-auth/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"devDependencies": {
4444
"@arethetypeswrong/cli": "^0.17.4",
4545
"@types/jsonwebtoken": "^9.0.5",
46-
"hono": "^4.0.1",
4746
"jsonwebtoken": "^9.0.2",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",

Diff for: packages/otel/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"@arethetypeswrong/cli": "^0.17.4",
4949
"@opentelemetry/sdk-trace-base": "^1.30.0",
5050
"@opentelemetry/sdk-trace-node": "^1.30.0",
51-
"hono": "^4.4.12",
5251
"publint": "^0.3.9",
5352
"tsup": "^8.4.0",
5453
"vitest": "^3.0.8"

Diff for: packages/prometheus/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
46-
"hono": "^4.2.7",
4746
"prom-client": "^15.0.0",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",

Diff for: packages/qwik-city/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"@arethetypeswrong/cli": "^0.17.4",
4646
"@builder.io/qwik": "^1.2.0",
4747
"@builder.io/qwik-city": "^1.2.0",
48-
"hono": "^3.11.7",
4948
"publint": "^0.3.9",
5049
"tsup": "^8.4.0"
5150
},

Diff for: packages/react-compat/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
},
3030
"devDependencies": {
3131
"@arethetypeswrong/cli": "^0.17.4",
32-
"hono": "^4.5.0",
3332
"publint": "^0.3.9",
3433
"tsup": "^8.4.0"
3534
}

Diff for: packages/react-renderer/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"@cloudflare/vitest-pool-workers": "^0.7.8",
4848
"@types/react": "^18",
4949
"@types/react-dom": "^18.2.17",
50-
"hono": "^4.2.3",
5150
"publint": "^0.3.9",
5251
"react": "^18.2.0",
5352
"react-dom": "^18.2.0",

Diff for: packages/sentry/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
},
4747
"devDependencies": {
4848
"@arethetypeswrong/cli": "^0.17.4",
49-
"hono": "^3.11.7",
5049
"publint": "^0.3.9",
5150
"tsup": "^8.4.0",
5251
"vitest": "^3.0.8"

Diff for: packages/standard-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"@arethetypeswrong/cli": "^0.17.4",
4747
"@standard-schema/spec": "1.0.0",
4848
"arktype": "^2.0.0-rc.26",
49-
"hono": "^4.0.10",
5049
"publint": "^0.3.9",
5150
"tsup": "^8.4.0",
5251
"valibot": "^1.0.0-beta.9",

Diff for: packages/swagger-editor/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
46-
"hono": "^3.11.7",
4746
"publint": "^0.3.9",
4847
"tsup": "^8.4.0",
4948
"vitest": "^3.0.8"

Diff for: packages/swagger-ui/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
4646
"@types/swagger-ui-dist": "^3.30.5",
47-
"hono": "^3.11.7",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",
5049
"vitest": "^3.0.8"

Diff for: packages/trpc-server/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
4646
"@trpc/server": "^11.0.0",
47-
"hono": "^4.3.6",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",
5049
"vitest": "^3.0.8",

Diff for: packages/trpc-server/src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ export const trpcServer = ({
4444
return Reflect.get(t, p, t)
4545
},
4646
}),
47-
}).then((res) => c.body(res.body, res))
47+
}).then((res) =>
48+
// @ts-expect-error c.body accepts both ReadableStream and null but is not typed well
49+
c.body(res.body, res)
50+
)
4851
return res
4952
}
5053
}

Diff for: packages/tsyringe/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
46-
"hono": "^4.4.12",
4746
"publint": "^0.3.9",
4847
"reflect-metadata": "^0.2.2",
4948
"tsup": "^8.4.0",

Diff for: packages/typebox-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
4646
"@sinclair/typebox": "^0.31.15",
47-
"hono": "^3.11.7",
4847
"publint": "^0.3.9",
4948
"tsup": "^8.4.0",
5049
"vitest": "^3.0.8"

Diff for: packages/typebox-validator/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export function tbValidator<
7575
hook?: Hook<Static<T>, E, P>,
7676
stripNonSchemaItems?: boolean
7777
): MiddlewareHandler<E, P, V> {
78+
// @ts-expect-error not typed well
7879
// Compile the provided schema once rather than per validation. This could be optimized further using a shared schema
7980
// compilation pool similar to the Fastify implementation.
8081
return validator(target, (unprocessedData, c) => {

Diff for: packages/typia-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"devDependencies": {
5555
"@arethetypeswrong/cli": "^0.17.4",
5656
"@ryoppippi/unplugin-typia": "^2.1.4",
57-
"hono": "^3.11.7",
5857
"publint": "^0.3.9",
5958
"tsup": "^8.4.0",
6059
"typia": "^8.0.3",

Diff for: packages/typia-validator/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const typiaValidator = <
2929
validate: T,
3030
hook?: Hook<O, E, P>
3131
): MiddlewareHandler<E, P, V> =>
32+
// @ts-expect-error not typed well
3233
validator(target, async (value, c) => {
3334
const result = validate(value)
3435

Diff for: packages/valibot-validator/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
},
3838
"devDependencies": {
3939
"@arethetypeswrong/cli": "^0.17.4",
40-
"hono": "^4.5.1",
4140
"publint": "^0.3.9",
4241
"tsup": "^8.4.0",
4342
"valibot": "^1.0.0",

Diff for: packages/zod-openapi/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@arethetypeswrong/cli": "^0.17.4",
46-
"hono": "^4.6.10",
4746
"publint": "^0.3.9",
4847
"tsup": "^8.4.0",
4948
"vitest": "^3.0.8",
@@ -52,7 +51,7 @@
5251
},
5352
"dependencies": {
5453
"@asteasolutions/zod-to-openapi": "^7.1.0",
55-
"@hono/zod-validator": "npm:0.4.2"
54+
"@hono/zod-validator": "workspace:^"
5655
},
5756
"engines": {
5857
"node": ">=16.0.0"

0 commit comments

Comments
 (0)