Minor Changes
-
#8829
66c796aThanks @effect-bot! - Bound Node stream and socket pulls to at mostchunkSizechunks (default 4096), preventing synchronously refilling sources from draining indefinitely in one pull. Add achunkSizeoption to Node socket constructors and a separatereadSizeoption for Node streamread(size)calls; callers previously usingchunkSizefor byte read sizes should usereadSizeinstead. SetchunkSize: Infinityto opt into unbounded batching. -
#8829
8f23668Thanks @fubhy! - Replaceeffect/Cryptowith family-specificeffect/crypto/*services, opaque keys,CryptoError, a configurableWebCryptoreference and key schemas ineffect/Schema. Encoding secret or private keys through byte/format schemas requires{ allowEncode: true }.Breaking changes
- Use
SecureRandomfor randomness and UUIDs, andDigestwith algorithm values such asDigest.sha256for hashing. Replaceeffect/testing/TestCryptowithLayer.mockfor the required services. - Provide crypto explicitly; it is no longer included in the runtime
*Servicesbundles.NodeCrypto,BunCrypto,DenoCryptoandBrowserCryptooffer individual family layers and a combinedlayer, supplyingSecureRandomwhere needed. Core modules offerlayerWebCrypto. - Provide
Digest.Digestinstead ofCrypto.CryptotoSqlMessageStorageandSingleRunner, and instead ofEventLogEncryptiontoSqlEventLogServerEncrypted.makeStorageandlayerStorage. ReplaceEventLogEncryption.sha256Stringwithdigest.digestHex(Digest.sha256, bytes).
Existing workflow ID, activity idempotency key and event log table-name encodings are unchanged.
Event log encryption, identity key derivation and session authentication now run on
Aead,Digest,SignatureandSecureRandom.EventLogEncryption.makeandEventLogEncryption.layertake those services from context, so Node apps can use theNodeCryptolayers.EventLogEncryption.layerSubtleand the session auth functions use the Web Crypto layers on theWebCryptoreference instead ofglobalThis.crypto. Existing identities, derived signing keys and encrypted batches are unchanged.UUIDv7 and ULID generation is now monotonic below the maximum 48-bit timestamp, including within a millisecond and across clock rollback. Ordering is per
SecureRandominstance; the unsafe helpers and model UUIDv7 defaults share per-realm ordering. - Use
-
#10087
472c469Thanks @effect-bot! - Node.js 22.19.0 (required byundici8) is now the minimum for@effect/platform-node,@effect/platform-node-shared,@effect/opentelemetryand@effect/docgen, up from 18.NodeSocketWebSocket clients now use Node's globalWebSocketinstead ofws, so client-only usage no longer bundlesws.Breaking:
wsmoved to a newNodeWSmodule.NodeSocket.NodeWSandBunSocket.NodeWSare removed. ImportNodeWSfrom@effect/platform-nodeor@effect/platform-node-shared(on Bun, importwsdirectly). UseNodeWS.WebSocketin place ofNodeSocket.NodeWS.default.NodeSocket.layerWebSocketConstructorWSis removed. UseNodeWS.layerWebSocketConstructor.
Behaviour changes for clients that pass handshake headers, which previously used
ws. UseNodeWS.layerWebSocketConstructorto keep the old behaviour:- Reads cannot be paused. Incoming frames are buffered without limit, and a configured
highWaterMarkfails the socket with aSocketReadError. - Connection errors are a generic
ErrorEvent, soSocketOpenErrorcauses lack the underlying error code. - The
Socket.WebSocketservice is a globalWebSocket, sowsinstanceofchecks andws-only methods such asterminate()andping()no longer apply. - A custom
Hostheader is ignored. - Outgoing messages are not compressed. Incoming
permessage-deflatemessages are still decompressed. - Connections use undici's global dispatcher instead of
http.globalAgent/https.globalAgent.
-
#8829
d2b6bc7Thanks @jpowersdev! - Add experimentalGlobpath matching and a sharedFileSystem.globimplementation for Node, Bun, and Deno.- Breaking: custom
FileSystemimplementations, including inputs toFileSystem.make, must providereadDirectoryEntries; mappingreadDirectorynames to{ name, type: "Unknown" }is supported. Wrappers must apply directory-listing changes to both methods. FileSystem.makenow derivesglobinstead of accepting it. Apply custom overrides afterward withFileSystem.of({ ...fs, glob: customGlob }).- Glob patterns use
/separators and backslash escapes; Node extglobs no longer expand. Results use/separators and are relative torootunless the pattern is absolute. Deno wildcards now skip dotfiles unless explicitly named ordot: true; unreadable wildcard-reached directories are skipped, while read failures at the root or a leading literal directory propagate.
- Breaking: custom
-
#8829
3d88452Thanks @fubhy! - AddCommandLinetoeffect/processfor quoting and joining command lines, and supportRedactedarguments andenvvalues inChildProcess.Migration:
ChildProcess.maketemplates keep quoted words together and throw aCommandLineErrorfor shell syntax such as|,$HOMEor*. Quote such characters or pass them with${}.- With the
shelloption, templates cannot contain${}values and extra arguments fail withBadArgument. Pass the whole script as the command, built withCommandLine.join. StandardCommand.argsandenvvalues can beRedactedstrings.ChildProcess.TemplateExpressionandChildProcess.TemplateExpressionItemare removed. Use theCommandLinetypes of the same name.
-
#8829
89e5443Thanks @jpowersdev! - AddTerminal.size, a scoped queue that starts with the current terminal dimensions and receives each resize. Custom terminals passed toTerminal.makemust now supplysize.
Patch Changes
- #8829
fe6b748Thanks @effect-bot! - Support duplexadditionalFdsthroughgetInputFdandgetOutputFd, preserving both directions when used withpipeTo. - Updated dependencies [
631d4f4,7ea1ea2,a2ccc14,ed20129,20795b9,a8e5e6c,c4d298d,fb5dbee,8309b94,ac10e55,af23904,df8dce5,0c24a8f,468c6ee,2d1fcd4,8f23668,3f8f359,fe6b748,2a03584,40e145e,7217410,cf249fe,4f0fad1,e75708c,7890077,c4a00fc,f74db37,069cf72,9a07ebc,f40dc4e,fa516c6,ffd9237,93895b9,8938b19,e5a1479,89e1e1e,eda0960,65db606,7c42335,cb21d14,89e1e1e,c32eb78,be9895b,26b4bfe,e19c611,f97711f,4f16778,d2b6bc7,8e668fe,ce9e999,3d88452,3c42058,2ae4045,e853fa1,6dc3f7c,1513bbd,c065ed7,1194a4c,2cb498e,89e5443,2a9a425,e710bbb,b0d6e75,32b3570,9f93f4f,27370c7]:- effect@4.1.0