unstale

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

@unstale/cli 0.2.9 on npm

@effect/platform-node 433 changes

Breaking changes 12

  • Adds upgradeWith({ headers }); upgrade is now upgradeWith({}). Third-party HttpServerRequest implementations must add it, and WebSocket upgrades fail when headers are given.

    4.0.7release notes

  • 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.

    4.0.7release notes

  • When its source stream errors, NodeMultipart now fails with a MultipartError instead of waiting for more input.

    4.0.7release notes

  • Custom HttpClientResponse implementations must add upgrade.

    4.0.6release notes

  • The middleware now requires a trusted-proxy policy and applies forwarded headers only when the connecting peer is trusted.

    4.0.6release notes

  • toURL no longer reads x-forwarded-proto directly; it uses request.protocol, set by trusted proxy middleware, before the transport scheme.

    4.0.6release notes

  • Node server requests expose an absolute originalUrl when a Host header is present; use url instead of originalUrl to read the path.

    4.0.6release notes

  • For absolute-form Node requests, url and headers.host are derived from the request target, ignoring a conflicting Host header.

    4.0.6release notes

  • Multipart requests missing a boundary now return a typed parse error instead of a defect.

    4.0.6release notes

  • Oversized buffered or decompressed request bodies now receive 413; Node drains oversized bodies so the response can reach the client without destroying the socket.

    4.0.6release notes

  • Handlers returning a status outside 200–599 now receive a 500 response.

    4.0.6release notes

  • The return type now includes HTTP/2 request and response types; code using HTTP/1.1-only members must narrow first.

    4.0.6release notes

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.

    4.0.6release notes

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.

    4.0.7release notes

  • Node stream readers expose MaxBytesError and an optional destroyOnOverflow setting; the default destruction behavior is unchanged.

    4.0.6release notes

  • NDJSON streaming payloads are supported; invalid lines fail the stream with HttpApiSchemaError (400), and StreamNdjson also works as a success response.

    4.0.6release notes

  • Endpoints can declare streaming request payloads; handlers receive a lazy Stream that reads the body as it pulls.

    4.0.6release notes

  • Raw HTTP/1.1 upgrades are supported through the client and Node HTTP server; Node clients expose the upgraded connection as a Socket.

    4.0.6release notes

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.

    4.0.6release notes

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.

    4.0.6release notes

Fixes and other changes 13

  • Fixes hanging or reporting a defect when an HTTP/1 client disconnects before the response is written.

    4.0.7release notes

  • 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.

    4.0.7release notes

  • The server defers 100 Continue until the application reads the request body, preventing early rejections from prompting uploads.

    4.0.6release notes

  • HTTP/2 uses authority for the exposed host header and request URL, including when Host is missing or conflicting.

    4.0.6release notes

  • 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.

    4.0.6release notes

  • Stream body encoding errors are preserved instead of being reported as transport errors caused by request cleanup.

    4.0.6release notes

  • Sending HttpBody.formData request bodies no longer hangs.

    4.0.6release notes

  • 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.

    4.0.6release notes

  • make, layerServer, layer, and layerConfig accept HTTP/2 servers created with Http2.createServer() or Http2.createSecureServer(), including allowHTTP1.

    4.0.6release notes

  • HTTP/2 responses drop forbidden connection-specific headers, failed bodies reset the stream with INTERNAL_ERROR, and shutdown closes idle sessions.

    4.0.6release notes

  • When Node rejects response headers, the server sends a fallback error response or destroys the response if that also fails, avoiding hanging requests.

    4.0.6release notes

  • Writables are released when upstream fails or the sink is interrupted, preserving the original exit cause; writables with endOnDone: false remain open.

    4.0.6release notes

  • If a streamed response body fails after headers are sent, the connection is aborted so clients do not treat a truncated body as complete.

    4.0.6release notes

@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.

    0.108.4release notes