From 23738501c77ea7e1882b882a88e9649d471871ef Mon Sep 17 00:00:00 2001 From: John Coffey Date: Thu, 10 Sep 2026 08:28:21 -0700 Subject: [PATCH] Take @hono/node-server to 2.1.1 All three entry points we import survive the major unchanged: `serve` keeps its `(options, listeningListener)` signature and still accepts `fetch`, `hostname` and `port`; `RESPONSE_ALREADY_SENT` is still exported from `utils/response`; `getConnInfo` is still on `conninfo`. The peer is hono ^4 and the engine >=20, both of which we already meet. What v2 adds is two defaults worth knowing about. `overrideGlobalObjects` swaps in a lighter Request/Response, and `autoCleanupIncoming` destroys an incoming request the app never finished reading -- which is the behaviour you want behind a proxy, and is on by default. Neither is something the unit tests would notice, so this was run rather than reasoned about. Against the mock: login, an /api/events stream, and a POST carrying a body through to upstream. The SSE path is the one that matters, since it writes to the raw ServerResponse and hands back RESPONSE_ALREADY_SENT; it answers with the same headers, the same chunked encoding and the same bytes as 1.19.17 does on the same script. --- package-lock.json | 10 +++++----- server/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 367bb52..ccb6d74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -592,12 +592,12 @@ } }, "node_modules/@hono/node-server": { - "version": "1.19.17", - "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.17.tgz", - "integrity": "sha512-dSneS5qhiauZWGDCeK4o695Xd9nUNjviSZCMQrj10eetr8Uln1ucn6bbphOM6UynAMMtNIzZNSpL9vnASJwrPQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.1.tgz", + "integrity": "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg==", "license": "MIT", "engines": { - "node": ">=18.14.1" + "node": ">=20" }, "peerDependencies": { "hono": "^4" @@ -3182,7 +3182,7 @@ "version": "2.16.0", "license": "AGPL-3.0-or-later", "dependencies": { - "@hono/node-server": "^1.13.8", + "@hono/node-server": "^2.1.1", "hono": "^4.13.7" }, "devDependencies": { diff --git a/server/package.json b/server/package.json index 8890fa5..3fc14b2 100644 --- a/server/package.json +++ b/server/package.json @@ -16,7 +16,7 @@ "mock:no-keyword-sort": "MOCK_NO_KEYWORD_SORT=1 tsx src/mock/index.ts" }, "dependencies": { - "@hono/node-server": "^1.13.8", + "@hono/node-server": "^2.1.1", "hono": "^4.13.7" }, "devDependencies": {