Packages

effect

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

Your version

4.0.5

15 Oct 2026Where it was published

4.1.5 is the newest release of 4.x.

In short

9 new32 fixed

Release note

Patch Changes

  • Pass a NonEmptyArray to the onNonEmpty callback of Array.match when the input is a mutable array.

  • Fix AsyncResult.all failures carrying a single input's previousSuccess instead of the combined record or tuple.

  • Fix infinite atom rebuilds caused by late reads of uninitialized dependencies.

  • Add Flag.withOptionalValue for GNU-style flags with an optional value, like --color[=WHEN]. A bare flag uses the given value; an explicit value must be attached with =.

  • Fix lost deferred callback wakes in cluster workflows when an activity suspends while a parallel activity is still running.

  • Name cluster entity RPC server spans by entity type only (e.g. WorkflowEntity.Run) so span names stay low-cardinality. The entity ID is still recorded in the entity.id span attribute.

  • Recover persisted local cluster replies from storage to prevent requests hanging when replies arrive before handler registration. Retain local reply notifications as storage-reader wakeups for low-latency streaming.

    Defer terminal in-memory reply publication until the successful outer transaction completes, preserving the commit boundary for reply readers.

  • Fix ConfigProvider.fromDotEnv and fromDotEnvContents rescanning expanded values when expandVariables is enabled. Self and circular references no longer overflow the stack, escaped \$NAME stays literal, and defaults apply when a reference expands to an empty value.

  • Fix Duration conversions throwing for very large millisecond values, and make those durations equal to their nanosecond equivalents.

  • Fix Duration conversions losing nanosecond precision for large integer millisecond values.

  • Use bigint for 64-bit FileSystem.File.Info metadata. dev is now a bigint, and ino, rdev, nlink, and blocks are Option<bigint>, so file stats no longer fail or drop values outside the safe integer range. Node and Bun read dev, ino, rdev, and nlink as unsigned 64-bit integers. Deno reports these fields as numbers, so values above Number.MAX_SAFE_INTEGER are rounded by Deno before conversion.

  • Support per-request URLs in GraphQLProtocol.layerHttp and makeHttp, as a function of the context and operation or as an Effect<string>. GraphQLResolver batches lookups by URL.

  • Add HttpClientRequest.compressBody for gzip and deflate request body compression.

  • Accept Redacted values as URL parameters in UrlParams and HttpClientRequest.

  • Add HttpMiddleware.decompression, which decompresses gzip and deflate request bodies, limits the decompressed size, and rejects other codings with 415.

  • Fix interruption calling Math.random and hashing defects, which made deterministic hosts that forbid randomness loop forever or overflow the stack.

  • Narrow only the matched prefix when a Match tuple pattern is applied to an array or variadic tuple, so the remaining elements keep their original type.

  • Fix McpServer types to require schema services for resource templates and encoding services for prompt parameters with completion handlers. Missing services are now caught at compile time.

  • Pad 64-bit trace ids to 128 bits in OTLP exports and traceparent headers.

  • Add opt-in gzip compression to built-in OTLP JSON and protobuf exporters via the compression option or OTEL_EXPORTER_OTLP_COMPRESSION and per-signal environment variables. Compress batches once before retries using HttpClientRequest.compressBody, retaining its default 1KB threshold and uncompressed defaults.

  • Add Path.resolveWithin(root, input), which resolves a relative path beneath a root and returns Option.none() for traversal escapes and rooted inputs, using the platform's path rules.

  • Collect tool approvals once per LanguageModel request instead of twice.

  • Reduce SQLite statement overhead by borrowing the shared connection while preserving semaphore exclusion and failed-COMMIT recovery.

  • Cache the last response decoder for each language model response kind, keyed by validation mode and ordered tool schema identities.

  • Redact sensitive query values in HTTP spans, request inspection and error messages. Also redact URL credentials in client spans, request inspection and errors. Request URLs sent over the wire are unchanged.

    Move AWSAccessKeyId, Signature, sig and X-Goog-Signature from Headers.CurrentRedactedNames to the new UrlParams.CurrentRedactedNames. A custom list replaces these defaults. Add UrlParams.isRedactedName, UrlParams.redact and UrlParams.redactUrl for explicit redaction.

  • Match.when, Match.whenOr, Match.whenAnd, and Match.not now reject object patterns with keys the input type does not have.

  • Keep Schema decoding synchronous when a decoding default is an already-successful effect, such as Effect.succeed(...).

  • Preserve completion-handler service requirements in McpServer.registerResource and McpServer.resource URI templates when handlers take a context argument.

  • Fix handler-local request.url for parameterized and percent-encoded HttpRouter prefixes, respecting duplicate-slash configuration.

  • Fix RPC socket clients closing healthy connections before sending a ping when a ping tick runs late. Slow requests now stay connected while the server responds to pings.

  • Reject duplicate discriminants at compile time in Schema.toTaggedUnion, including duplicates in nested unions and numeric/string property-key collisions such as 1 and "1".

  • Fix Sse.encoder dropping event data after a lone \r. CR and CRLF line endings in event data now start a new data: line, like LF.

  • Add filesystem watcher installation notifications and wait for all GraphQL watch subscriptions, including nested directories, before generating. This prevents edits during startup from being missed.

  • Fix Stream.timeout and Stream.timeoutOrElse hanging when an async iterator's pending next() never settles.

  • Fix String.snakeToCamel and String.snakeToPascal throwing on a trailing underscore or an even-length run of underscores, such as "foo_" or "__". A trailing underscore is now dropped and an even-length run of underscores returns ""; inputs that converted before give the same result.

    String.noCase no longer calls a custom transform for input without words, such as "" or "---".

  • Support structured decision instructions, descriptions, and score legends in TypeSafe, Cloudflare, and OpenRouter. Decision.rate accepts labeled descriptions; Rate.criteria entries are now { label, description } objects instead of strings.

  • Remove interrupted sleeps from TestClock and insert new sleeps in order instead of re-sorting the queue.

  • Fix TestClock.adjust and TestClock.setTime skipping sleeps that a woken fiber registers after more than one scheduler hop, such as after Effect.yieldNow or forking and joining a child.

  • Effect.Transaction now stores attempt metadata, analogous to Schedule.CurrentMetadata. Yield it inside a transaction body to read attempt, retryReason, and the same timing fields as a schedule (start, now, elapsed, elapsedSincePrevious).

  • Add a detached option for discarded child workflows. Detached children neither wake their parent on completion nor get interrupted with it.

  • Keep workflows suspended by Workflow.SuspendOnFailure from retrying failed activities until explicitly resumed. Interrupting a failure-suspended workflow now completes it as interrupted without re-running the failed activity.

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.