@remix-run/node-fetch-server
1.0.1 · 19 Nov 2026MIT5.4M / weekRepositoryHomepagenpmAtom feed
Upgrading @remix-run/node-fetch-server From 0.8.0 to 1.0.1
14 releases in betweenevery note read
Reading releases, release notes and advisories…
- 2
- changes to make
- 0
- advisories fixed
- 2
- new
- 10
- fixes
Before you upgrade
Tick each one off as you go- Breaking1.0.0
- Breaking0.11.0
Release by release
- Fixed
createRequest()andcreateRequestListener()now validate the request host for every handler, including handlers that take no arguments. The effective host, whether it comes from thehostoption, a trustedForwardedorX-Forwarded-Hostheader, HTTP/2:authority, orHost, must be a hostname or bracketed IPv6 address with an optional port. Values with a path, query, fragment, userinfo, whitespace, or control characters, such asexample.com/../adminoruser@example.com, makecreateRequest()throw.createRequestListener()passes the error toonErrorand responds with400 Bad RequestunlessonErrorreturns a response. An invalid trustedX-Forwarded-Hostis rejected instead of falling back toHost.
- Fixed
- Breaking
First stable release.
- Breaking
- Fixed
Use HTTP/2
:authoritybeforeHostwhen constructing request URLs. Requests whoseHostand:authorityidentify different hosts now receive a 400 response by default fromcreateRequestListener(), with custom responses supported throughonError. Equivalent hostnames and default ports remain accepted. - Fixed
createRequestListener()now accepts request-only handlers separately from handlers that read client address information, so handlers such asrouter.fetchcan be passed directly. - Fixed
Declare package modules as side-effect-free.
- Fixed
- Fixed
Request handlers now receive native
Requestinstances instead of lazy request objects that emulated native requests. This fixes compatibility with standard APIs likenew Request(request, init)that rely on nativeRequestinternals.
- Fixed
- New
Added a
trustProxyoption tocreateRequestListener()andcreateRequest()so apps behind trusted reverse proxies can constructrequest.urlfromForwarded,X-Forwarded-Host, andX-Forwarded-Protoheaders.createRequestListener()also uses trustedForwardedandX-Forwarded-Forvalues for handler client address information (see #10874). - Fixed
Reject request body reads when clients abort uploads, and avoid writing fallback error responses after streaming response headers are already committed (see #11533 and #11534).
- New
- Fixed
Cancel unfinished streaming response bodies when the client connection closes before the response completes so user-provided
ReadableStream.cancel()hooks run for aborted requests (see #11432). - Fixed
Drop handler responses when the client has already disconnected, and do not forward request abort errors from handlers or response streams to
onErroror write them to a closed socket (see #11431).
- Fixed
- Fixed
Start writing the first response stream chunk immediately instead of waiting for another chunk. Streaming responses with a delayed second chunk now flush their initial data without unnecessary blocking.
- Fixed
- Fixed
Improve request throughput so
node-fetch-serveris now on par with nativenode:httpperformance in the request-inspection benchmark, while preserving Fetch API request handlers. The main optimizations lazily materializeRequestandHeadersobjects, specialize handlers by declared arity, avoid unnecessary client/request work on hot paths, and send single-chunk response bodies with less Web stream overhead. See thenode-fetch-serverbenchmarks for current results.
- Fixed
4 other lines we could not sort, mostly version bumps
- 0.13.0
Use the
:authorityheader to set the URL of http/2 requests. - 0.12.0
Use
tscdirectly instead ofesbuildto build the package. This means modules in thedistdirectory now mirror the layout of modules in thesrcdirectory. - 0.10.0
Fire
closeandfinishlisteners only once - 0.8.1
Only abort
request.signalwhen the connection closes before the response completes (see #10726)
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.