npm / @effect/platform-node
@effect/platform-node
What changed in @effect/platform-node 0.108 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.
12 breaking1 security5 new APIs and options1 performance1 behavior and defaults14 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@effect/platform-node 433 changes
Breaking changes 12
Adds
upgradeWith({ headers });upgradeis nowupgradeWith({}). Third-party HttpServerRequest implementations must add it, and WebSocket upgrades fail when headers are given.Waits for the request body to end before writing the 101 response. On Node 25 and older, reads Content-Length bodies from the connection and answers chunked bodies with 411 Length Required.
When its source stream errors, NodeMultipart now fails with a MultipartError instead of waiting for more input.
Custom HttpClientResponse implementations must add upgrade.
The middleware now requires a trusted-proxy policy and applies forwarded headers only when the connecting peer is trusted.
toURL no longer reads x-forwarded-proto directly; it uses request.protocol, set by trusted proxy middleware, before the transport scheme.
Node server requests expose an absolute originalUrl when a Host header is present; use url instead of originalUrl to read the path.
For absolute-form Node requests, url and headers.host are derived from the request target, ignoring a conflicting Host header.
Multipart requests missing a boundary now return a typed parse error instead of a defect.
Oversized buffered or decompressed request bodies now receive 413; Node drains oversized bodies so the response can reach the client without destroying the socket.
Handlers returning a status outside 200–599 now receive a 500 response.
The return type now includes HTTP/2 request and response types; code using HTTP/1.1-only members must narrow first.
Security 1
Streaming payloads can be limited by byte size; exceeding the limit fails the stream with HttpApiPayloadTooLarge (413), and excessive content-length is rejected before the handler runs.
New APIs and options 5
Upgrade endpoints can declare buffered payloads and typed 101 response headers; clients decode the headers, handlers receive an upgrade function, and 426 is returned before payload decoding.
Node stream readers expose MaxBytesError and an optional destroyOnOverflow setting; the default destruction behavior is unchanged.
NDJSON streaming payloads are supported; invalid lines fail the stream with HttpApiSchemaError (400), and StreamNdjson also works as a success response.
Endpoints can declare streaming request payloads; handlers receive a lazy Stream that reads the body as it pulls.
Raw HTTP/1.1 upgrades are supported through the client and Node HTTP server; Node clients expose the upgraded connection as a Socket.
Performance 1
Importing effect/Schema or starting a Node HTTP server before web APIs are used no longer loads Node's internal undici on cold start.
Behavior and default changes 1
Streaming request bodies continue uploading after response headers arrive, enabling bidirectional streaming; unfinished uploads stop when the response is consumed, the connection closes, or the request is cancelled.
Fixes and other changes 13
Fixes hanging or reporting a defect when an HTTP/1 client disconnects before the response is written.
Fixes hanging when the source closes early or is already destroyed, including while a file part is being read, and removes source listeners once parsing finishes.
The server defers 100 Continue until the application reads the request body, preventing early rejections from prompting uploads.
HTTP/2 uses authority for the exposed host header and request URL, including when Host is missing or conflicting.
HTTPS detection now prioritizes an exact http or https x-forwarded-proto value, otherwise infers HTTPS from originalUrl; paths beginning with // preserve the request host.
Stream body encoding errors are preserved instead of being reported as transport errors caused by request cleanup.
Sending HttpBody.formData request bodies no longer hangs.
The server drains up to 256 KiB of an unread request body, then closes the connection rather than reading the whole upload or leaving the socket stuck.
make, layerServer, layer, and layerConfig accept HTTP/2 servers created with Http2.createServer() or Http2.createSecureServer(), including allowHTTP1.
HTTP/2 responses drop forbidden connection-specific headers, failed bodies reset the stream with INTERNAL_ERROR, and shutdown closes idle sessions.
When Node rejects response headers, the server sends a fallback error response or destroys the response if that also fails, avoiding hanging requests.
Writables are released when upstream fails or the sink is interrupted, preserving the original exit cause; writables with endOnDone: false remain open.
If a streamed response body fails after headers are sent, the connection is aborted so clients do not treat a truncated body as complete.
@effect/platform-node 0.1081 changes
Fixes and other changes 1
Fixes the method to return an ArrayBuffer instead of a Uint8Array, matching its expected return type.