Skip to content

chore(dev-deps): upgrade to hono v4 #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-zod-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
node-version: 20.x
- run: yarn workspaces focus hono-middleware @hono/zod-openapi
- run: yarn workspace @hono/zod-openapi build
- run: yarn workspaces foreach --topological --recursive --from @hono/zod-openapi run build
- run: yarn workspace @hono/zod-openapi publint
- run: yarn eslint packages/zod-openapi
- run: yarn test --coverage --project @hono/zod-openapi
Expand Down
36 changes: 1 addition & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,6 @@
]
},
"scripts": {
"build:hello": "yarn workspace @hono/hello build",
"build:zod-validator": "yarn workspace @hono/zod-validator build",
"build:class-validator": "yarn workspace @hono/class-validator build",
"build:arktype-validator": "yarn workspace @hono/arktype-validator build",
"build:qwik-city": "yarn workspace @hono/qwik-city build",
"build:graphql-server": "yarn workspace @hono/graphql-server build",
"build:sentry": "yarn workspace @hono/sentry build",
"build:firebase-auth": "yarn workspace @hono/firebase-auth build",
"build:trpc-server": "yarn workspace @hono/trpc-server build",
"build:clerk-auth": "yarn workspace @hono/clerk-auth build",
"build:typebox-validator": "yarn workspace @hono/typebox-validator build",
"build:medley-router": "yarn workspace @hono/medley-router build",
"build:valibot-validator": "yarn workspace @hono/valibot-validator build",
"build:zod-openapi": "yarn workspace @hono/zod-openapi install && yarn workspace @hono/zod-openapi build",
"build:typia-validator": "yarn workspace @hono/typia-validator build",
"build:swagger-ui": "yarn workspace @hono/swagger-ui build",
"build:swagger-editor": "yarn workspace @hono/swagger-editor build",
"build:esbuild-transpiler": "yarn workspace @hono/esbuild-transpiler build",
"build:event-emitter": "yarn workspace @hono/event-emitter build",
"build:oauth-providers": "yarn workspace @hono/oauth-providers build",
"build:react-renderer": "yarn workspace @hono/react-renderer build",
"build:auth-js": "yarn workspace @hono/auth-js build",
"build:bun-transpiler": "yarn workspace @hono/bun-transpiler build",
"build:prometheus": "yarn workspace @hono/prometheus build",
"build:oidc-auth": "yarn workspace @hono/oidc-auth build",
"build:node-ws": "yarn workspace @hono/node-ws build",
"build:react-compat": "yarn workspace @hono/react-compat build",
"build:effect-validator": "yarn workspace @hono/effect-validator build",
"build:conform-validator": "yarn workspace @hono/conform-validator build",
"build:casbin": "yarn workspace @hono/casbin build",
"build:ajv-validator": "yarn workspace @hono/ajv-validator build",
"build:tsyringe": "yarn workspace @hono/tsyringe build",
"build:cloudflare-access": "yarn workspace @hono/cloudflare-access build",
"build:standard-validator": "yarn workspace @hono/standard-validator build",
"build:otel": "yarn workspace @hono/otel build",
"build": "yarn workspaces foreach --all --parallel --topological --verbose run build",
"publint": "yarn workspaces foreach --all --parallel --topological --verbose run publint",
"test": "vitest",
Expand All @@ -69,6 +34,7 @@
"@typescript-eslint/parser": "^8.7.0",
"@vitest/coverage-istanbul": "^3.0.8",
"eslint": "^9.17.0",
"hono": "^4.7.5",
"npm-run-all2": "^6.2.2",
"prettier": "^2.7.1",
"tsup": "^8.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/ajv-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"ajv": ">=8.12.0",
"hono": "^4.4.12",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/arktype-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"arktype": "^2.0.0-dev.14",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 1 addition & 0 deletions packages/arktype-validator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const arktypeValidator = <
schema: T,
hook?: Hook<T['infer'], E, P>
): MiddlewareHandler<E, P, V> =>
// @ts-expect-error not typed well
validator(target, (value, c) => {
const out = schema(value)

Expand Down
1 change: 0 additions & 1 deletion packages/auth-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"@arethetypeswrong/cli": "^0.17.4",
"@auth/core": "^0.35.3",
"@types/react": "^18",
"hono": "^3.11.7",
"publint": "^0.3.9",
"react": "^18.2.0",
"tsup": "^8.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/bun-transpiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@types/bun": "^1.0.0",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/casbin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"casbin": "^5.30.0",
"hono": "^4.5.11",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/class-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.0.10",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/clerk-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@arethetypeswrong/cli": "^0.17.4",
"@clerk/backend": "^1.0.0",
"@types/react": "^18",
"hono": "^3.11.7",
"publint": "^0.3.9",
"react": "^18.2.0",
"tsup": "^8.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/cloudflare-access/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@cloudflare/workers-types": "^4.20230307.0",
"hono": "^4.4.12",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/conform-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@conform-to/yup": "^1.1.5",
"@conform-to/zod": "^1.1.5",
"conform-to-valibot": "^1.10.0",
"hono": "^4.5.1",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"valibot": "^0.36.0",
Expand Down
1 change: 0 additions & 1 deletion packages/effect-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"effect": "3.10.0",
"hono": "^4.4.13",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/esbuild-transpiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"@arethetypeswrong/cli": "^0.17.4",
"esbuild": "^0.19.9",
"esbuild-wasm": "^0.19.5",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/event-emitter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.3.6",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/firebase-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@arethetypeswrong/cli": "^0.17.4",
"@cloudflare/workers-types": "^4.20240222.0",
"firebase-tools": "^13.29.1",
"hono": "^4.2.4",
"miniflare": "^3.20240208.0",
"prettier": "^3.2.5",
"publint": "^0.3.9",
Expand Down
4 changes: 2 additions & 2 deletions packages/firebase-auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface VerifyFirebaseAuthConfig {
projectId: string
authorizationHeaderKey?: string
keyStore?: KeyStorer
keyStoreInitializer?: (c: Context) => KeyStorer
keyStoreInitializer?: (c: Context<{ Bindings: VerifyFirebaseAuthEnv }>) => KeyStorer
disableErrorLog?: boolean
firebaseEmulatorHost?: string
}
Expand Down Expand Up @@ -102,7 +102,7 @@ export interface VerifySessionCookieFirebaseAuthConfig {
projectId: string
cookieName?: string
keyStore?: KeyStorer
keyStoreInitializer?: (c: Context) => KeyStorer
keyStoreInitializer?: (c: Context<{ Bindings: VerifyFirebaseAuthEnv }>) => KeyStorer
firebaseEmulatorHost?: string
redirects: {
signIn: string
Expand Down
1 change: 0 additions & 1 deletion packages/graphql-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@cloudflare/workers-types": "^3.14.0",
"hono": "^4.0.2",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/hello/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.4.12",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/medley-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/node-ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@hono/node-server": "^1.11.1",
"@types/node": "^20.14.8",
"@types/ws": "^8.18.0",
"hono": "^4.6.0",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/oauth-providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.5.1",
"msw": "^2.0.11",
"publint": "^0.3.9",
"tsup": "^8.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/oidc-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@types/jsonwebtoken": "^9.0.5",
"hono": "^4.0.1",
"jsonwebtoken": "^9.0.2",
"publint": "^0.3.9",
"tsup": "^8.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/otel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@arethetypeswrong/cli": "^0.17.4",
"@opentelemetry/sdk-trace-base": "^1.30.0",
"@opentelemetry/sdk-trace-node": "^1.30.0",
"hono": "^4.4.12",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/prometheus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.2.7",
"prom-client": "^15.0.0",
"publint": "^0.3.9",
"tsup": "^8.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/qwik-city/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@arethetypeswrong/cli": "^0.17.4",
"@builder.io/qwik": "^1.2.0",
"@builder.io/qwik-city": "^1.2.0",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/react-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.5.0",
"publint": "^0.3.9",
"tsup": "^8.4.0"
}
Expand Down
1 change: 0 additions & 1 deletion packages/react-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@cloudflare/vitest-pool-workers": "^0.7.8",
"@types/react": "^18",
"@types/react-dom": "^18.2.17",
"hono": "^4.2.3",
"publint": "^0.3.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
1 change: 0 additions & 1 deletion packages/sentry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/standard-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@arethetypeswrong/cli": "^0.17.4",
"@standard-schema/spec": "1.0.0",
"arktype": "^2.0.0-rc.26",
"hono": "^4.0.10",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"valibot": "^1.0.0-beta.9",
Expand Down
1 change: 0 additions & 1 deletion packages/swagger-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/swagger-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@types/swagger-ui-dist": "^3.30.5",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 0 additions & 1 deletion packages/trpc-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@trpc/server": "^11.0.0",
"hono": "^4.3.6",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8",
Expand Down
5 changes: 4 additions & 1 deletion packages/trpc-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@
req: canWithBody
? c.req.raw
: new Proxy(c.req.raw, {
get(t, p, _r) {

Check warning on line 40 in packages/trpc-server/src/index.ts

View workflow job for this annotation

GitHub Actions / ci

'_r' is defined but never used
if (bodyProps.has(p as BodyProp)) {
return () => c.req[p as BodyProp]()
}
return Reflect.get(t, p, t)
},
}),
}).then((res) => c.body(res.body, res))
}).then((res) =>
// @ts-expect-error c.body accepts both ReadableStream and null but is not typed well
c.body(res.body, res)
)
return res
}
}
1 change: 0 additions & 1 deletion packages/tsyringe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.4.12",
"publint": "^0.3.9",
"reflect-metadata": "^0.2.2",
"tsup": "^8.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/typebox-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@sinclair/typebox": "^0.31.15",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
Expand Down
1 change: 1 addition & 0 deletions packages/typebox-validator/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { TSchema, Static } from '@sinclair/typebox'
import { TypeGuard, ValueGuard } from '@sinclair/typebox'

Check warning on line 2 in packages/typebox-validator/src/index.ts

View workflow job for this annotation

GitHub Actions / ci

'TypeGuard' is defined but never used
import { Value } from '@sinclair/typebox/value'
import type { ValueError } from '@sinclair/typebox/value'
import type { Context, Env, MiddlewareHandler, TypedResponse, ValidationTargets } from 'hono'
Expand Down Expand Up @@ -58,7 +58,7 @@
* ```
*/

type ExcludeResponseType<T> = T extends Response & TypedResponse<any> ? never : T

Check warning on line 61 in packages/typebox-validator/src/index.ts

View workflow job for this annotation

GitHub Actions / ci

Unexpected any. Specify a different type

export function tbValidator<
T extends TSchema,
Expand All @@ -75,6 +75,7 @@
hook?: Hook<Static<T>, E, P>,
stripNonSchemaItems?: boolean
): MiddlewareHandler<E, P, V> {
// @ts-expect-error not typed well
// Compile the provided schema once rather than per validation. This could be optimized further using a shared schema
// compilation pool similar to the Fastify implementation.
return validator(target, (unprocessedData, c) => {
Expand Down Expand Up @@ -104,7 +105,7 @@
})
}

function removeNonSchemaItems<T extends TSchema>(schema: T, obj: any): Static<T> {

Check warning on line 108 in packages/typebox-validator/src/index.ts

View workflow job for this annotation

GitHub Actions / ci

Unexpected any. Specify a different type
if (typeof obj !== 'object' || obj === null) {
return obj
}
Expand All @@ -113,7 +114,7 @@
return obj.map((item) => removeNonSchemaItems(schema.items, item))
}

const result: any = {}

Check warning on line 117 in packages/typebox-validator/src/index.ts

View workflow job for this annotation

GitHub Actions / ci

Unexpected any. Specify a different type
for (const key in schema.properties) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
const propertySchema = schema.properties[key]
Expand Down
1 change: 0 additions & 1 deletion packages/typia-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@ryoppippi/unplugin-typia": "^2.1.4",
"hono": "^3.11.7",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"typia": "^8.0.3",
Expand Down
1 change: 1 addition & 0 deletions packages/typia-validator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const typiaValidator = <
validate: T,
hook?: Hook<O, E, P>
): MiddlewareHandler<E, P, V> =>
// @ts-expect-error not typed well
validator(target, async (value, c) => {
const result = validate(value)

Expand Down
1 change: 0 additions & 1 deletion packages/valibot-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.5.1",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"valibot": "^1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/zod-openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.6.10",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8",
Expand All @@ -52,7 +51,7 @@
},
"dependencies": {
"@asteasolutions/zod-to-openapi": "^7.1.0",
"@hono/zod-validator": "npm:0.4.2"
"@hono/zod-validator": "workspace:^"
},
"engines": {
"node": ">=16.0.0"
Expand Down
Loading
Loading