Download Latest Version v10.5.0 source code.zip (257.2 kB) Google Add to Preferred Sources
Home / v10.4.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-08-18 1.9 kB
v10.4.0 source code.tar.gz 2026-08-18 205.1 kB
v10.4.0 source code.zip 2026-08-18 253.3 kB
Totals: 3 Items   460.3 kB 3

Fixed

  • Fixed TypeScript builds by explicitly including Node.js and Mocha type definitions

  • Fixed connection failures with undici 8.x (InvalidArgumentError: invalid content-length header) on the default globalThis.fetch path (not only when using config.agentOptions) by removing manual Content-Length header handling by default and letting fetch set it from the request body. (#855)

  • Fixed connection failures never being retried. isSystemError rejected the error objects thrown by undici because their immediate prototype is not Error.prototype, so a refused connection produced isSafeToRetry: null and the retry gate — which also governs host failover — was never entered (#867).

  • Fixed config.maxRetries having no effect. It was destructured out of the config without being re-added to the connection's common request options, so the retry budget always fell back to hosts.length - 1, and setting it to false did not disable retries (#867).

  • Fixed a possible stack overflow while constructing a FetchFailedError when the error's cause chain is cyclic (#867).

Added

  • Added config.forceContentLength (default false). Set to true if you see ECONNRESET in Next.js 15 production builds when using next/headers cookies() (#831). Do not enable this when using undici 8.x unless required — it restores explicit Content-Length handling that can conflict with strict undici header validation.

Deprecated

Source: README.md, updated 2026-08-18