effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
4.1.5 is the newest release of 4.x.
In short
15 new31 fixed
Release note
Patch Changes
Prevent crashes and premature interruption when
Effect.cached,Effect.cachedWithTTL, andEffect.cachedInvalidateWithTTLare synchronously re-entered.Export
CliOutput.displayWidthto measure terminal-cell widths using the same logic as built-in CLI help and tables.Respect
NO_COLORin CLI prompts and the command wizard, suppressing color and style escapes while preserving cursor and redraw controls.Hand cluster shards off one at a time when
Shardingshuts down, after their entities and singletons have stopped, so live runners can take them over sooner. The handoff is best effort: its wait is bounded, and if it times out,releaseAllattempts to release the remaining locks. A runner that is shutting down no longer acquires new shards, and releasing a shard no longer waits forever on an entity whose id is also active on another shard.Fix cluster shard handoffs. Interrupts and stream acknowledgements now reach requests still draining on the previous owner, and
RpcServeraccepts acknowledgements for active streams after a client's EOF. Volatile requests sent during a handoff wait, for at mostshardLockExpiration, until the shard can be served instead of repeatedly failing withEntityNotAssignedToRunner.Add separate migration and storage layers to cluster SQL storage so applications can use tables migrated by an owner connection.
Serialize SchemaError as a compact object containing its tag and formatted message in JSON logs and Node inspection, without dumping schema AST nodes.
Avoid a redundant map copy when
Context.addrebases an overlay chain.Add
TestCrypto.layer, which provides deterministic random operations derived from a seed while preserving a platform crypto service's digest implementation.Turn
Crypto.randomUUIDv4andCrypto.randomUUIDv7into functions accepting an optional{ format: "hex" | "bytes" }option. Call them with()for the default lowercase, hyphenated UUID string, or with{ format: "bytes" }for a 16-byteUint8Array.Fix
DurableDeferred.raceAllandDurableDeferred.intoso a workflow branch continues after its result is recorded instead of stalling until a concurrently parked sibling is woken. The effect passed toDurableDeferred.intonow counts as in-flight work, so a parked sibling no longer suspends the run while it runs.Fix
Duration.fromInputUnsafethrowing on infinite nanosecond totals. It now returns an infinite duration, andDuration.fromInputreturnsSomeinstead ofNone.Fix
Duration.timesthrowing when a nanosecond-backed duration is multiplied by a fractional or non-finite number. Fractional results round to the nearest nanosecond.Add a
noFollowoption toFileSystem.opento reject symlinks at the final path component. Supported on Node and Bun on POSIX; Windows and Deno returnBadArgument. Add{ position }toFile.readandFile.readAllocfor concurrent reads that leave the cursor unchanged.Preserve duplicate slashes in query values when FindMyWay normalizes request paths.
Fix histogram exporters to retain all finite boundaries and overflow observations in OTLP, and emit a single
+Infbucket in Prometheus.Defer terminal input acquisition until a prompt needs user input, so constant fallback prompts leave piped stdin untouched.
Return empty 200 text/event-stream responses for MCP HTTP request POSTs when cancellation withholds every reply. Return 500 for other request POSTs that end without a response.
Add
McpServer.layerHttp({ allowSubscriptions: false })to disablev2026_07_28subscriptions while keeping request-scoped progress and log notifications.Send MCP cancellation notifications for interrupted server-to-client requests instead of internal RPC control messages.
Prevent MCP subscriptions from receiving deferred list-change notifications emitted before they subscribed, while preserving coalesced runtime changes.
Allow interrupted activities to run again when the in-memory workflow engine replays a preempted execution.
Accept address inputs in
Dns.reverseand name server inputs in the platformDnsservices, and addDns.nameServerFromInput.Add TLSA records to
effect/net/Dns, with aSchema.DnsTlsaRecordschema whose JSON codec encodes the certificate association data as hex. The Node.jsDnsservice queries them withresolveTlsa(Node.js 22.15 or 23.9 and later); Bun, Deno, and older Node.js versions fail TLSA queries withUnsupported.Add experimental
Host,Dns, andAddressResolvermodules toeffect/netfor host parsing, DNS queries, and endpoint resolution, with Node, Bun, and Deno services. DNS operations accept and normalize domain-name strings; endpoint resolution also acceptshost:portstrings. Add scoped IPv6 literals and host and DNS record schemas, including JSON codecs for records.Provide the services explicitly; they are not included in the platform
*Serviceslayers. UseNodeAddressResolver.layer.pipe(Layer.provideMerge(NodeDns.layer))to provide both Node services.Add
fromInputconstructors to theeffect/netdata types.Answer orphaned cluster workflow activity requests with Suspended instead of waiting indefinitely for replay registration.
Omit
minandmaxfrom subsequent delta histogram exports inOtlpMetrics: cumulative extrema do not describe the reported interval.Add a
delayoption toPersistedQueue.offerthat postpones an element's first delivery in the memory, Redis and SQL stores.Add PowerShell CLI completions with
--completions powershell(aliaspwsh).Add
DatagramSocketfor UDP on Node, Bun, and Deno, andNetAddress.inetAddressFromNativeUnsafefor runtime-reported addresses.Report RPC response encoding failures to ErrorReporter and include the RPC tag in client defects.
End the RPC server span with the encoding defect when a response fails to encode, instead of recording it as a client interruption.
Add
onPingTimeouttoRpcClient.makeProtocolSocketandRpcClient.layerProtocolSocketto distinguish ping timeouts from other socket failures. It runs only when a ping timeout drops an open connection, beforeonDisconnectand in-flight call failures; defects are logged and ignored.Export
Schema.isIntandSchema.Intas exact JSON Schema integers bounded byNumber.MIN_SAFE_INTEGERandNumber.MAX_SAFE_INTEGER. Composed bounds retain the tighter constraint, and exact integer branches preserveoneOf.Skip startup stack probing when
Error.stackTraceLimitis zero, avoiding unnecessary stack formatting during module loading.Hold the shared connection for the whole statement or stream on single-connection SQL clients, so another fiber's transaction can no longer roll back an acknowledged write or expose uncommitted rows to a plain read.
Add
Stdio.stderrIsTerminalwith an overridable false default and runtime detection for Node.js, Bun, and Deno.Add
ClusterSchema.InterruptOnTerminationto interrupt opted-in RPCs as soon as entity termination starts. Persisted requests resume under the next owner without saving an interrupt reply, and server-sideUninterruptibletakes precedence.Make
HttpClient.withRateLimiterwait for the reported reset once a response's remaining budget is exhausted, including when a limit header is also present.Propagate SQL transaction COMMIT errors as typed SqlError failures when cleanup succeeds. Preserve both COMMIT and cleanup errors as defects when cleanup fails, so typed recovery cannot hide an unsafe connection state.
Reject B3 single-header and multi-header trace contexts with invalid trace or span identifiers.
Allow WebSocket clients on Node and Bun to send handshake headers alongside subprotocols through socket constructors, channels, and layers. Preserve browser-compatible constructor calls when headers are not supplied.
Deliver terminal replies for persisted
ClusterSchema.WithTransactionrequests only after commit or clean rollback. On transaction failure, recover a committed reply or retry the request.Fix lost failure replies for persisted cluster RPCs using
ClusterSchema.WithTransaction. Save typed failures and non-fatal defects after rollback so retries receive the stored reply. Successful replies still commit with the handler's writes.Fix generated Zsh completions for flag descriptions containing
].
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.