From efeabb13202add40d2a37220a0ae1f9ee4fc249b Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Thu, 25 Sep 2025 01:14:53 -0700 Subject: [PATCH] chore(core): upgrade hono --- clients/openapi/openapi.json | 3 - package.json | 2 +- packages/rivetkit/package.json | 2 +- .../rivetkit/src/actor/router-endpoints.ts | 4 +- packages/rivetkit/src/common/router.ts | 3 +- packages/rivetkit/src/manager/router.ts | 3 +- pnpm-lock.yaml | 102 +++++++++--------- 7 files changed, 60 insertions(+), 59 deletions(-) diff --git a/clients/openapi/openapi.json b/clients/openapi/openapi.json index f9831facb..8ad9b7b0b 100644 --- a/clients/openapi/openapi.json +++ b/clients/openapi/openapi.json @@ -104,9 +104,6 @@ } }, "put": { - "cors": [ - null - ], "requestBody": { "content": { "application/json": { diff --git a/package.json b/package.json index 3f9f44d26..cc683a127 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react@^19": "^19.0.0", "react-dom@^19": "^19.0.0", "react@^18": "^18.3", - "hono": "4.8.3", + "hono": "4.9.8", "zod": "3.25.76" }, "dependencies": { diff --git a/packages/rivetkit/package.json b/packages/rivetkit/package.json index c68607cb9..306062ce1 100644 --- a/packages/rivetkit/package.json +++ b/packages/rivetkit/package.json @@ -166,7 +166,7 @@ "@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@b72b232", "@rivetkit/fast-json-patch": "^3.1.2", "cbor-x": "^1.6.0", - "hono": "^4.7.0", + "hono": "^4.9.8", "invariant": "^2.2.4", "nanoevents": "^9.1.0", "on-change": "^5.0.1", diff --git a/packages/rivetkit/src/actor/router-endpoints.ts b/packages/rivetkit/src/actor/router-endpoints.ts index a97e47966..901803ca5 100644 --- a/packages/rivetkit/src/actor/router-endpoints.ts +++ b/packages/rivetkit/src/actor/router-endpoints.ts @@ -501,7 +501,9 @@ export async function handleAction( responseData, HTTP_ACTION_RESPONSE_VERSIONED, ); - return c.body(serialized as Uint8Array, 200, { + + // TODO: Remvoe any, Hono is being a dumbass + return c.body(serialized as Uint8Array as any, 200, { "Content-Type": contentTypeForEncoding(encoding), }); } diff --git a/packages/rivetkit/src/common/router.ts b/packages/rivetkit/src/common/router.ts index 73684ab45..180cadf4e 100644 --- a/packages/rivetkit/src/common/router.ts +++ b/packages/rivetkit/src/common/router.ts @@ -76,5 +76,6 @@ export function handleRouteError(error: unknown, c: HonoContext) { HTTP_RESPONSE_ERROR_VERSIONED, ); - return c.body(output, { status: statusCode }); + // TODO: Remove any + return c.body(output as any, { status: statusCode }); } diff --git a/packages/rivetkit/src/manager/router.ts b/packages/rivetkit/src/manager/router.ts index 1fd6759d7..d1252bc31 100644 --- a/packages/rivetkit/src/manager/router.ts +++ b/packages/rivetkit/src/manager/router.ts @@ -310,7 +310,8 @@ export function createManagerRouter( response = { err }; } - return c.body(cbor.encode(response)); + // TODO: Remove any + return c.body(cbor.encode(response) as any); }); router.get(".test/inline-driver/connect-websocket/*", async (c) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bfd7a276f..3024c6fa0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,7 @@ overrides: react@^19: ^19.0.0 react-dom@^19: ^19.0.0 react@^18: ^18.3 - hono: 4.8.3 + hono: 4.9.8 zod: 3.25.76 importers: @@ -17,10 +17,10 @@ importers: dependencies: '@hono/node-server': specifier: ^1.14.4 - version: 1.14.4(hono@4.8.3) + version: 1.14.4(hono@4.9.8) '@hono/node-ws': specifier: ^1.1.7 - version: 1.1.7(@hono/node-server@1.14.4(hono@4.8.3))(hono@4.8.3) + version: 1.1.7(@hono/node-server@1.14.4(hono@4.9.8))(hono@4.9.8) esbuild: specifier: ^0.25.1 version: 0.25.5 @@ -129,8 +129,8 @@ importers: specifier: ^11.10.0 version: 11.10.0 hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 react: specifier: ^18.3 version: 18.3.1 @@ -249,8 +249,8 @@ importers: specifier: workspace:* version: link:../../packages/cloudflare-workers hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 devDependencies: '@cloudflare/workers-types': specifier: ^4.20250129.0 @@ -505,8 +505,8 @@ importers: examples/hono: dependencies: hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 devDependencies: '@types/node': specifier: ^22.13.9 @@ -527,8 +527,8 @@ importers: specifier: workspace:* version: link:../../packages/react hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 react: specifier: ^18.3 version: 18.3.1 @@ -647,8 +647,8 @@ importers: specifier: workspace:* version: link:../../packages/react hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 react: specifier: ^18.3 version: 18.3.1 @@ -690,8 +690,8 @@ importers: examples/raw-websocket-handler-proxy: dependencies: hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 react: specifier: ^18.3 version: 18.3.1 @@ -958,8 +958,8 @@ importers: packages/cloudflare-workers: dependencies: hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 invariant: specifier: ^2.2.4 version: 2.2.4 @@ -1063,8 +1063,8 @@ importers: specifier: workspace:* version: link:../react hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 react: specifier: ^19.0.0 version: 19.1.0 @@ -1126,10 +1126,10 @@ importers: version: 0.3.0 '@hono/standard-validator': specifier: ^0.1.3 - version: 0.1.4(@standard-schema/spec@1.0.0)(hono@4.8.3) + version: 0.1.4(@standard-schema/spec@1.0.0)(hono@4.9.8) '@hono/zod-openapi': specifier: ^0.19.10 - version: 0.19.10(hono@4.8.3)(zod@3.25.76) + version: 0.19.10(hono@4.9.8)(zod@3.25.76) '@rivetkit/engine-runner': specifier: https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@b72b232 version: https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@b72b232 @@ -1140,8 +1140,8 @@ importers: specifier: ^1.6.0 version: 1.6.0 hono: - specifier: 4.8.3 - version: 4.8.3 + specifier: 4.9.8 + version: 4.9.8 invariant: specifier: ^2.2.4 version: 2.2.4 @@ -1166,10 +1166,10 @@ importers: version: 0.13.0(@bare-ts/lib@0.3.0) '@hono/node-server': specifier: ^1.18.2 - version: 1.18.2(hono@4.8.3) + version: 1.18.2(hono@4.9.8) '@hono/node-ws': specifier: ^1.1.1 - version: 1.1.7(@hono/node-server@1.18.2(hono@4.8.3))(hono@4.8.3) + version: 1.1.7(@hono/node-server@1.18.2(hono@4.9.8))(hono@4.9.8) '@types/invariant': specifier: ^2 version: 2.2.37 @@ -2107,38 +2107,38 @@ packages: resolution: {integrity: sha512-DnxpshhYewr2q9ZN8ez/M5mmc3sucr8CT1sIgIy1bkeUXut9XWDkqHoFHRhWIQgkYnKpVRxunyhK7WzpJeJ6qQ==} engines: {node: '>=18.14.1'} peerDependencies: - hono: 4.8.3 + hono: 4.9.8 '@hono/node-server@1.18.2': resolution: {integrity: sha512-icgNvC0vRYivzyuSSaUv9ttcwtN8fDyd1k3AOIBDJgYd84tXRZSS6na8X54CY/oYoFTNhEmZraW/Rb9XYwX4KA==} engines: {node: '>=18.14.1'} peerDependencies: - hono: 4.8.3 + hono: 4.9.8 '@hono/node-ws@1.1.7': resolution: {integrity: sha512-O+sJXeruHlAAdSHUoyol8s2kTVqixdGIfKqakyN6z2RKR2O8LDOFr1CpTye7xfwmUsBe6uoXKSLmGvLbCfPFgw==} engines: {node: '>=18.14.1'} peerDependencies: '@hono/node-server': ^1.11.1 - hono: 4.8.3 + hono: 4.9.8 '@hono/standard-validator@0.1.4': resolution: {integrity: sha512-NPxSO9/Z1FFaJ34/0WJA0JoFRrVrJOG5P/i+PBJu7jCw9v0u8WmGiJu0zv+bTk1pjplBjjczAd59x2X50spRmQ==} peerDependencies: '@standard-schema/spec': 1.0.0 - hono: 4.8.3 + hono: 4.9.8 '@hono/zod-openapi@0.19.10': resolution: {integrity: sha512-dpoS6DenvoJyvxtQ7Kd633FRZ/Qf74+4+o9s+zZI8pEqnbjdF/DtxIib08WDpCaWabMEJOL5TXpMgNEZvb7hpA==} engines: {node: '>=16.0.0'} peerDependencies: - hono: 4.8.3 + hono: 4.9.8 zod: 3.25.76 '@hono/zod-validator@0.7.1': resolution: {integrity: sha512-8+vJT1RvezAx5sN7hiZ5Mis0RMuFL77nBEcqQQgT9ufoLkxr+7ll461WlBJQcGoQSY6EGMClVae19v3s/7bbgQ==} peerDependencies: - hono: 4.8.3 + hono: 4.9.8 zod: 3.25.76 '@img/sharp-darwin-arm64@0.33.5': @@ -3552,8 +3552,8 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true - hono@4.8.3: - resolution: {integrity: sha512-jYZ6ZtfWjzBdh8H/0CIFfCBHaFL75k+KMzaM177hrWWm2TWL39YMYaJgB74uK/niRc866NMlH9B8uCvIo284WQ==} + hono@4.9.8: + resolution: {integrity: sha512-JW8Bb4RFWD9iOKxg5PbUarBYGM99IcxFl2FPBo2gSJO11jjUDqlP1Bmfyqt8Z/dGhIQ63PMA9LdcLefXyIasyg==} engines: {node: '>=16.9.0'} http-errors@2.0.0: @@ -5400,48 +5400,48 @@ snapshots: '@hexagon/base64@1.1.28': {} - '@hono/node-server@1.14.4(hono@4.8.3)': + '@hono/node-server@1.14.4(hono@4.9.8)': dependencies: - hono: 4.8.3 + hono: 4.9.8 - '@hono/node-server@1.18.2(hono@4.8.3)': + '@hono/node-server@1.18.2(hono@4.9.8)': dependencies: - hono: 4.8.3 + hono: 4.9.8 - '@hono/node-ws@1.1.7(@hono/node-server@1.14.4(hono@4.8.3))(hono@4.8.3)': + '@hono/node-ws@1.1.7(@hono/node-server@1.14.4(hono@4.9.8))(hono@4.9.8)': dependencies: - '@hono/node-server': 1.14.4(hono@4.8.3) - hono: 4.8.3 + '@hono/node-server': 1.14.4(hono@4.9.8) + hono: 4.9.8 ws: 8.18.2 transitivePeerDependencies: - bufferutil - utf-8-validate - '@hono/node-ws@1.1.7(@hono/node-server@1.18.2(hono@4.8.3))(hono@4.8.3)': + '@hono/node-ws@1.1.7(@hono/node-server@1.18.2(hono@4.9.8))(hono@4.9.8)': dependencies: - '@hono/node-server': 1.18.2(hono@4.8.3) - hono: 4.8.3 + '@hono/node-server': 1.18.2(hono@4.9.8) + hono: 4.9.8 ws: 8.18.2 transitivePeerDependencies: - bufferutil - utf-8-validate - '@hono/standard-validator@0.1.4(@standard-schema/spec@1.0.0)(hono@4.8.3)': + '@hono/standard-validator@0.1.4(@standard-schema/spec@1.0.0)(hono@4.9.8)': dependencies: '@standard-schema/spec': 1.0.0 - hono: 4.8.3 + hono: 4.9.8 - '@hono/zod-openapi@0.19.10(hono@4.8.3)(zod@3.25.76)': + '@hono/zod-openapi@0.19.10(hono@4.9.8)(zod@3.25.76)': dependencies: '@asteasolutions/zod-to-openapi': 7.3.4(zod@3.25.76) - '@hono/zod-validator': 0.7.1(hono@4.8.3)(zod@3.25.76) - hono: 4.8.3 + '@hono/zod-validator': 0.7.1(hono@4.9.8)(zod@3.25.76) + hono: 4.9.8 openapi3-ts: 4.5.0 zod: 3.25.76 - '@hono/zod-validator@0.7.1(hono@4.8.3)(zod@3.25.76)': + '@hono/zod-validator@0.7.1(hono@4.9.8)(zod@3.25.76)': dependencies: - hono: 4.8.3 + hono: 4.9.8 zod: 3.25.76 '@img/sharp-darwin-arm64@0.33.5': @@ -6967,7 +6967,7 @@ snapshots: he@1.2.0: {} - hono@4.8.3: {} + hono@4.9.8: {} http-errors@2.0.0: dependencies: