June 02, 2026
·
3 commits
to master
since this release
@whatwg-node/node-fetch@0.8.6
Patch Changes
- #3203
771cad6
Thanks @renovate! - Add TypeScript 6 compatibility: implement
values()method and[Symbol.asyncDispose]onPonyfillReadableStreamto match the updated
ReadableStreaminterface
@whatwg-node/server@0.11.0
Minor Changes
-
#3399
9d02fd0
Thanks @enisdenjo! - NewuseRequestDeadlineplugin for enforcing
per-request timeoutsAborts the request signal and returns a custom response when the handler takes longer than the
configured timeout.import { createServerAdapter, useRequestDeadline } from '@whatwg-node/server' const adapter = createServerAdapter(myHandler, { plugins: [ useRequestDeadline({ timeout: 5000, response: req => new Response(`Request to ${req.url} timed out`, { status: 504 }) }) ] })
The request's
AbortSignalis aborted when the deadline fires, so handlers that respect it (e.g.
fetchcalls, database queries) are cancelled cooperatively:async function myHandler(req: Request) { // this fetch is cancelled automatically if the deadline fires const data = await fetch('https://slow-api.example.com/data', { signal: req.signal }) return Response.json(await data.json()) }
Patch Changes
- #3376
228b517
Thanks @copilot-swe-agent! - Fix duplicate
transfer-encoding: chunkedheader when using uWebSockets.js. uWebSockets.js automatically adds
this header when streaming viawrite()+end(), so forwarding it from the fetch response
causedchunked, chunkedwhich breaks strict load balancers (e.g. Google Cloud Load Balancer).