@effect/platform-node@4.0.0-rc.113
Pre-releasePatch Changes
-
#7463
0d083baThanks @tim-smart! - Remove themimeruntime dependency. The neweffect/unstable/http/Mimemodule provides top-level lookup functions
backed by a vendored standard MIME registry. -
#7477
be0f822Thanks @candrewlee14! - Allow sockets to use browser, Bun, and Node WebSocket implementations without consumer casts. Platform constructors
now support typed opening-handshake headers where available. -
#8096
cce221eThanks @tim-smart! - Update dependencies to their latest compatible versions. -
#7650
5c7eed0Thanks @tim-smart! - Reduce HTTP server allocation churn when tracing is not configured and for requests that complete synchronously. -
#7772
1e92dbdThanks @tim-smart! - Improve HTTP server throughput by reducing routing, request handling, response
construction, and body encoding overhead. AddEffect.withFiberSucceedfor
synchronously computing successful values from the current fiber. Copy pooled
byte views by their exact range when exposingArrayBuffervalues. -
#7511
a4bb2aaThanks @tim-smart! - AddNodeSocket.makeTls,NodeSocket.makeTlsChannel, andNodeSocket.layerTlsfor TLS client connections.These mirror the existing
makeNetfamily but dialtls.connect, so they take the fulltls.ConnectionOptionsset:
trust anchors (ca), client certificates (cert/key), ALPN protocols, andservername. The socket opens once the
handshake completes; a failed handshake fails with aSocketOpenError. -
#7512
5664c94Thanks @tim-smart! - AddNodeSocketServer.makeTlsandNodeSocketServer.layerTlsfor TLS socket servers. -
#7514
b76a1cfThanks @tim-smart! - Add Socket.upgrade, for upgrading tcp sockets using STARTTLS -
#7525
53843f6Thanks @fubhy! - AddByteSizemodule and use it across the ecosystem -
#8110
4ab4e83Thanks @tim-smart! - Prevent precision loss in Node/Bun filesystem operations andHttpPlatformfile responses. -
#8148
7999b07Thanks @tim-smart! - Preserve the response Content-Type when compressing file, raw, stream, and byte-array responses on Node, Bun, Deno, and the web platform, including headers overridden after body construction. -
#7528
dd6ce2dThanks @Kashkovsky! - Defer loading Undici until an Undici-backed layer is acquired, preventing Node HTTP client imports from replacing Node's global fetch dispatcher. Import Undici APIs from@effect/platform-node/Undiciinstead of the package root. -
#7524
0a08ae0Thanks @fubhy! - AddNetAddressundereffect/unstable/netfor MAC, IP, internet socket, and Unix socket addresses, with checked parsing, schemas, equality, canonical string serialization, and URL formatting. Companion modulesIpInterfaceandIpNetworkrepresent IP interfaces and CIDR networks.HTTP and socket servers now expose
NetAddress.SocketAddress. Replace TCPhostnameaccess withNetAddress.formatIp(address.address)and useUnixPathAddress.pathfor Unix sockets. URL helpers bracket IPv6 addresses and reject scoped IPv6. Bun and Deno HTTP server layers can now fail withServeErrorwhen listener address conversion fails.PostgreSQL
inetvalues now useIpInterface;cidrvalues useIpNetworkand reject addresses with host bits set. -
#7730
e406217Thanks @kitlangton! - Forward custom and empty status text from NodeHttpServer responses. -
#7716
f93d051Thanks @kitlangton! - Preserve response bytes when selecting the text reader in Node HTTP clients. -
#7810
9252a00Thanks @kitlangton! - Preserve reply payloads sent throughNodeWorkerRunner.sendUnsafe. -
#7487
ba53b64Thanks @tim-smart! - RedesignSocketaround a scoped, pull-based reader with transport backpressure.Socketnow exposesreaderandwriter. Client reader acquisition dials and yields a pull of non-empty batches: one buffer for TCP and one entry per WebSocket frame. TCP applies backpressure while paused; pausable WebSockets pause athighWaterMark(64 KiB by default) and resume after draining. Browser WebSockets cannot pause, so they can fail withSocketReadErrorat a configuredhighWaterMark. Writes await native drain signals and batch withcork/uncorkwhere available.Breaking changes
Socket.run,Socket.runString, andSocket.runRaware removed. Acquiresocket.reader(orSocket.readerBytes/Socket.readerString) in a scope and pull in a loop. Code before the first pull replacesonOpen.Socket.makenow takes{ reader, writer }. The writer acquisition is infallible and yields aWriterwithwriteandwriteAll; both operations can still fail withSocketError.- Every close fails the pull with
SocketErrorwrappingSocketCloseError. The close-code predicates are removed; useEffect.retryaround the scoped read loop to reconnect. Socket.toChannelandSocket.toChannelStringnow read from the pull and fail on close.Socket.toStreamis added for read-only consumption.fromWebSocketdrops theonInitialRunoption;SendQueueCapacityis removed.- Accepted server sockets pause immediately. Their reader attaches to the existing connection and cannot reconnect after close.
-
#7461
b4d5398Thanks @tim-smart! - Remove the MessagePack encoding and RPC serialization APIs together with themsgpackrdependency. Event-log persistence and remote messages now use SchemaBinary, and cluster transports use SchemaBinary unless NDJSON is selected explicitly. -
#7496
ca6f0dcThanks @nikhilsnayak! - AddHttpClientResponse.url, including query parameters and excluding the hash. When redirects are followed, it reports
the final URL. -
#7427
1a2cceeThanks @tim-smart! - Use SchemaBinary as the default RPC serialization for TCP cluster connections, including configurable frame limits.Cluster payloads are encoded with the binary codec on the wire. When a persisted reply cannot be encoded for JSON storage, the defect fallback that storage records is now also the reply delivered to waiting callers, so live replies always match what was persisted.
SchemaBinary codecs are memoized by schema identity and wire mode, so per-message codec requests reuse the derived codec instead of rebuilding it.
-
#7718
72b8582Thanks @kitlangton! - Parse URL-encoded and multipart response bodies in the Undici HTTP client. -
#7459
505dc05Thanks @tim-smart! - Prevent NodeHttpServer from writing the route's HTTP response onto a connection that was upgraded to a WebSocket connection because stricter clients will interpret those bytes as WebSocket frames, logging "Invalid frame header" and failing the connection with an untyped 1006 error instead of the actual close code that the server sent. -
Updated dependencies [
49e3901,b945ded,d6422f4,5a80204,53511ef,79ae49f,0d083ba,be0f822,debe8fd,a8588f9,f17eb0a,f30cbfe,78cc9c0,2f106a5,ccbdbd5,a63dcbf,b845b18,381b794,4ffcaf4,ba2fd82,02be94c,115d8c2,1452635,77f85fe,a3f2b31,310f8d3,291d616,48dbbb2,b43bfd6,1c89c78,9bbe1a5,dd99ab0,8f397ed,d7ae6b6,8cf1203,87654c5,f05ae0b,436f5eb,d8ff960,8766475,b64f406,4697aaa,cec6c2d,9956f0e,5c7eed0,183c2ea,1e92dbd,4eb0fa7,534b8b9,a4bb2aa,5664c94,b76a1cf,b76a1cf,acc1e53,4950a91,c020987,abe95d1,027ceb9,3d203b7,a29b8f4,ce4aa65,a8ea807,a3ebb7f,473bd81,53843f6,c5eca65,d6f9eba,8d1e97a,b28ab48,9960708,8ac53b6,84ad49a,72cfa24,95c2581,d5c7cd2,fe4fed1,d150a64,05b1e80,414dc90,3f51acd,d68ff05,f3cf1e6,6525771,4ab4e83,f7f1d78,47b358a,45ffa72,6232650,4b73e1b,284050c,c85fc0b,7999b07,7d455f5,d681c2e,84d2a47,a6ceb98,ed74b18,2245997,d386979,fc9fedf,7750dbe,fc91af6,39b9738,88093b5,d14c463,d473bd3,84864bc,e2ae724,f921ed3,1df933d,829aff9,aa0aba3,a71140f,0276a27,10d2c98,c86c999,975f758,2a3a478,1e6e206,fa6027b,7616f73,fc668b6,d425c8c,ce120f4,248201f,e80d397,f1a941d,73bc3a1,b628bb1,6e3ae7b,e891247,53e6c73,1579d6f,d3c6b73,4a59c6a,145d8e1,f74282c,0a38623,0a08ae0,fa6a56b,615c41e,d0a6c5e,500c60b,163cebd,37cdd69,d60c5d4,07ffd25,9b517ad,604b1c1,ccc2e02,14d810a,a9d1ee3,a31adbe,7245f87,3a0828b,0beaf69,cd83544,6550a07,6f090d4,b505c0d,186dd49,9f37e58,4446451,58be972,1320075,ba53b64,f7490d4,c8ea602,62d82f4,a2c9e7c,97dd022,f984ee8,f1b2910,a29e05a,1aa1d8b,bb99734,222e7ca,797c9e3,b4d5398,c8349ed,8426e5f,26e0085,1a86166,0856631,0af0985,bc582c9,2c63f1e,0d98213,ca6f0dc,d8cc9ed,42fd969,5641ad3,629870d,d592c14,10d2c98,53909a9,78a4269,06c6307,0847c41,5a77084,96f99b3,7bb8781,4907e9b,2a30248,8364ddd,ad67d8c,ec0c087,fa6a56b,a2c1ce6,91e9af0,7bd3f34,ef16581,1693a87,df3fc47,e11be41,2e39e8b,11c5ee7,1742d2f,8efc70e,9642776,6680828,c34edcb,7b2c5bd,1a2ccee,db995df,af0ccdd,addeaea,7704034,e72b12f,310dd9c,1c2afc1,44f44ca,f43b9d6,56e72b3,50ef80e,fc3b718,ee336d8,d12f922,46d8310,59812fd,f9d0dec,4372c79,81485ef,bd393d6,0c95c04]:- effect@4.0.0-rc.113
- @effect/platform-node-shared@4.0.0-rc.113