fix(ci): run CI on Node 22.x and correct undici 8 Node floor (#1563)

undici 8.5.0 requires Node >= 22.19.0 (its declared engines), so CI's
Node 20.x could not load undici's CacheStorage (missing
webidl.util.markAsUncloneable) and the proxy integration tests failed.
Bump the CI setup-node to 22.x to match the repo's Node floor.

Reconcile the declared floor with undici's real requirement: bump root
engines.node to >=22.19.0 and correct the CLI README note (undici 8.5.0
needs >=22.19.0, not >=22.7.5). Also document proxy support in the web
README and clarify that a caller-supplied eventSourceInit.fetch bypasses
the proxy wrapper by design.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX
This commit is contained in:
cliffhall 2026-07-01 19:17:05 -04:00
commit b152f74ccd

View file

@ -140,6 +140,8 @@ export function createTransportNode(
const sseConfig = config as SseServerConfig;
const url = new URL(sseConfig.url);
// A caller-supplied eventSourceInit.fetch wins as-is (explicit fetch is not
// re-wrapped for proxying); the default path uses the proxy-aware baseFetch.
const sseFetch =
(sseConfig.eventSourceInit?.fetch as typeof fetch) || baseFetch;
const trackedFetch = onFetchRequest