Packages

effect

4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.3

11 Oct 2026Where it was published

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, and Effect.cachedInvalidateWithTTL are synchronously re-entered.

  • Export CliOutput.displayWidth to measure terminal-cell widths using the same logic as built-in CLI help and tables.

  • Respect NO_COLOR in 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 Sharding shuts 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, releaseAll attempts 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 RpcServer accepts acknowledgements for active streams after a client's EOF. Volatile requests sent during a handoff wait, for at most shardLockExpiration, until the shard can be served instead of repeatedly failing with EntityNotAssignedToRunner.

  • 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.add rebases 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.randomUUIDv4 and Crypto.randomUUIDv7 into 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-byte Uint8Array.

  • Fix DurableDeferred.raceAll and DurableDeferred.into so a workflow branch continues after its result is recorded instead of stalling until a concurrently parked sibling is woken. The effect passed to DurableDeferred.into now counts as in-flight work, so a parked sibling no longer suspends the run while it runs.

  • Fix Duration.fromInputUnsafe throwing on infinite nanosecond totals. It now returns an infinite duration, and Duration.fromInput returns Some instead of None.

  • Fix Duration.times throwing when a nanosecond-backed duration is multiplied by a fractional or non-finite number. Fractional results round to the nearest nanosecond.

  • Add a noFollow option to FileSystem.open to reject symlinks at the final path component. Supported on Node and Bun on POSIX; Windows and Deno return BadArgument. Add { position } to File.read and File.readAlloc for 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 +Inf bucket 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 disable v2026_07_28 subscriptions 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.reverse and name server inputs in the platform Dns services, and add Dns.nameServerFromInput.

  • Add TLSA records to effect/net/Dns, with a Schema.DnsTlsaRecord schema whose JSON codec encodes the certificate association data as hex. The Node.js Dns service queries them with resolveTlsa (Node.js 22.15 or 23.9 and later); Bun, Deno, and older Node.js versions fail TLSA queries with Unsupported.

  • Add experimental Host, Dns, and AddressResolver modules to effect/net for host parsing, DNS queries, and endpoint resolution, with Node, Bun, and Deno services. DNS operations accept and normalize domain-name strings; endpoint resolution also accepts host:port strings. 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 *Services layers. Use NodeAddressResolver.layer.pipe(Layer.provideMerge(NodeDns.layer)) to provide both Node services.

  • Add fromInput constructors to the effect/net data types.

  • Answer orphaned cluster workflow activity requests with Suspended instead of waiting indefinitely for replay registration.

  • Omit min and max from subsequent delta histogram exports in OtlpMetrics: cumulative extrema do not describe the reported interval.

  • Add a delay option to PersistedQueue.offer that postpones an element's first delivery in the memory, Redis and SQL stores.

  • Add PowerShell CLI completions with --completions powershell (alias pwsh).

  • Add DatagramSocket for UDP on Node, Bun, and Deno, and NetAddress.inetAddressFromNativeUnsafe for 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 onPingTimeout to RpcClient.makeProtocolSocket and RpcClient.layerProtocolSocket to distinguish ping timeouts from other socket failures. It runs only when a ping timeout drops an open connection, before onDisconnect and in-flight call failures; defects are logged and ignored.

  • Export Schema.isInt and Schema.Int as exact JSON Schema integers bounded by Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER. Composed bounds retain the tighter constraint, and exact integer branches preserve oneOf.

  • Skip startup stack probing when Error.stackTraceLimit is 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.stderrIsTerminal with an overridable false default and runtime detection for Node.js, Bun, and Deno.

  • Add ClusterSchema.InterruptOnTermination to interrupt opted-in RPCs as soon as entity termination starts. Persisted requests resume under the next owner without saving an interrupt reply, and server-side Uninterruptible takes precedence.

  • Make HttpClient.withRateLimiter wait 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.WithTransaction requests 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.