Packages

effect

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

Your version

4.1.5

20 Nov 2026Where it was published

In short

20 new2 faster69 fixed

Release note

Patch Changes

  • Report unsupported regex patterns and their schema paths when Arbitrary sampling or property checking exhausts its discard budget.

    When constructing Arbitrary.SampleError or Arbitrary.Exhausted values, include the required diagnostics array; use `` when there are no diagnostics.

  • Shrink Arbitrary string counterexamples by deleting characters anywhere, and defer shrinking work until a property fails. Existing string replay tokens may need to be recorded again.

  • Fix Atom.kvs showing the value from before its last write after being refreshed or remounted past its idle TTL.

  • Add opt-in staleTime to HTTP and non-stream RPC atom queries and run hydrated waiting effects even with skipInitialRun.

  • Add Base64.encodeUnpadded for standard Base64 without = padding, and Base64.decodeLenient for input in either Base64 alphabet, with or without padding.

  • Add BigInt.nthRoot for integer n-th roots and Rational.nthRoot for exact n-th roots, each with a nthRootUnsafe variant.

  • Speed up BigInt.sqrt and BigInt.sqrtUnsafe on large inputs.

  • Fix Cache and ScopedCache entries failing to expire with a provided clock when the first caller is interrupted during a shared lookup.

  • Keep closed code blocks together when they fit in a single ChatMarkdown message.

  • Fix ChatTest.failNext scheduling a fault when its times option is zero.

  • Fix Chunk.fromIterable and TxChunk.fromIterable sharing the caller's array, so later changes to the array no longer change the chunk.

  • Deliver workflow activity results when a reply is redelivered after a transient shard-ownership check failure or when attempts of the same activity run concurrently.

  • Expose each cron job's effective schedule through ClusterCron.CronSchedule, both inside execute and on the registered entity.

  • Fix persisted Entity.keepAlive(true) requests completing prematurely on redelivery, preserving entity recovery after runner restarts.

  • Fix field discovery and type validation across struct comparisons, schemas, commands, and collection helpers to consistently handle own enumerable string and symbol fields.

    Some field maps declared with interface are no longer accepted. Replace interface Fields { ... } with type Fields = { ... }, or pass a plain object copy by replacing Order.Struct(fields) with Order.Struct({ ...fields }).

  • Add effect/crypto/Password for storing passwords as PHC strings. The Password service hashes with Argon2id or PBKDF2 from Kdf, verifies against the algorithm and salt recorded in the stored hash, and reports when a stored hash needs rehashing under the configured algorithm. Password.decode and Password.encode convert between PHC strings and PasswordHash values.

  • Decode empty CSV header cells according to the selected union member's optional fields.

  • Fix DateTime.make rejecting date strings that end in UT, UTC or a US time zone abbreviation such as PDT.

  • Fix DateTime.make ignoring whitespace-separated time zones followed by trailing whitespace or a single non-nested comment.

  • Parse zoneless DateTime strings such as 2024-1-15 as UTC instead of local time.

  • Add unstable effect/chat APIs and Slack, Discord, WhatsApp, Telegram and Microsoft Teams adapters for chat bots, with grapheme-safe Markdown streaming, buttons, selects, modals, slash commands, private/deferred command replies, and adapter conformance testing.

  • Fix SqlEventLogServerEncrypted on SQL Server stalling for seconds when two instances create the same tables at once.

  • Fix Atom.searchParam overwriting the restored URL when Back or Forward is pressed before a debounced write flushes.

  • Fix an interrupted fiber losing its exit, such as a finalizer defect, when a child fiber does not stop immediately.

  • Fix slow FindMyWay and HttpRouter lookups for request paths containing many encoded percent signs.

  • The Die variant of Schema.CauseReasonIso now declares defect instead of error, matching the existing runtime shape.

  • Fix ClusterWorkflowEngine activities repeatedly restarting after durable clock wakeups when using SQL storage.

  • Fix LayerRef.make and LayerRef.Service exposing layer build errors during creation when preload is omitted.

  • Fix Effect.raceAll and Effect.raceAllFirst not interrupting a loser that settles the race during its own first synchronous step.

  • Fix cluster shards remaining unavailable indefinitely when a runner's lock operations persistently fail while its heartbeat succeeds.

  • Fix Metric.summary and Metric.summaryWithTimestamp accepting NaN quantiles.

  • Fix intermittent SqlRunnerStorage advisory-lock failures after Vitess sessions have been idle.

  • Fix Stream.flattenIterable not closing the active iterator when downstream stops early.

  • Fix HashMap and HashSet overflowing the stack for keys whose custom hashes are not 32-bit integers.

  • Fix HttpClient sending invalid trace headers when tracing is disabled with Effect.withTracerEnabled(false).

  • Add redactedParams to HttpRouter routes and params to HttpApi.RedactedNames to redact path params in server spans and request logs.

  • Fix HttpRouter.serve ignoring app-provided references and rebuilding app-provided layers when handling requests.

  • Fix HttpRouter so an explicit route takes precedence over a wildcard at its bare prefix, regardless of registration order.

  • Fix HttpApiClient failing to decode single-element arrays in form-urlencoded responses and declared errors.

  • Avoid the startup cost of Intl.Segmenter for CLI commands that never measure text width.

  • Fix ConfigProvider.fromEnv() capturing the environment when called instead of at its first lookup, which ignored variables set after import.

    Variables removed before the first lookup are no longer captured; use ConfigProvider.fromEnvRecord({ ...process.env }) to snapshot at a chosen moment.

  • Fix McpServer to list tools with destructiveHint: false when Tool.Readonly is true and Tool.Destructive is unset.

  • Use a tool's toModelOutput parts as McpServer tool result content while preserving structuredContent and downgrading unsupported blocks on older protocol revisions.

  • Fix McpServer toolkit registration copying and scanning its registration context once per tool, which made memory use and registration time grow with the square of the tool count.

  • Allow McpServer.toolkit and McpServer.registerToolkit to return native MCP content blocks for selected tools without advertising an output schema.

  • Fix EventJournal.makeMemory dropping pending entries imported from another remote during an upload.

  • Fix Prompt.Int and Prompt.Number dropping the minus sign when a zero follows it, so typing -0.05 no longer submits 0.05.

  • Generate client and HttpApi operations from local OpenAPI Path Item references.

  • Fix Order.Struct and Struct.makeOrder ignoring symbol fields when comparing and sorting records.

  • Warn at the default log level when a failed OTLP export disables telemetry export for 60 seconds.

  • Fix OTLP exporters retaining a background fiber when exportInterval is infinite.

  • Fix OtlpLogger exporting invalid trace and span IDs for logs inside spans with tracing or propagation disabled.

  • Use Rpc.TracingEnabled to select automatic client and server spans per procedure and remoteParentSpan to parent custom handler or middleware spans.

    When invoking a handler or middleware directly, pass remoteParentSpan: undefined if no client span context was received.

  • Fix Pool.makeWithTTL usage-based expiration retaining idle excess resources beyond their configured time to live.

  • Add ProtobufDescriptor, ProtobufDescriptorProto, and ProtobufMessage for codecs preserving names and unknown fields across proto2, proto3, and editions 2023, 2024 and 2026.

    Replace reader.enter(); read(reader); reader.leave() with read(reader.delimited()). The child reader is bounded to the payload, and the parent advances past it immediately.

    ProtobufWriter.tag now throws RangeError for invalid tags; supply an integer field number from 1 through 536870911 and a wire type from 0 through 5.

  • Add effect/protobuf with ProtobufReader and ProtobufWriter, a Schema-independent reader and writer of the protobuf wire format, and speed up OTLP protobuf serialization, which now writes log record trace and span ids given as a Uint8Array as those bytes instead of corrupting them.

  • Deliver the last item taken from a closing queue before notifying its waiters, so a waiter cannot interrupt the take before it returns the item.

  • Update HttpApiScalar.layer to Scalar 1.81.0: bundled docs omit the undeclared Accept: */* example header, honor customFetch, and support hiding Ask AI with agent.disabled; the unpacked package grows by about 3.7 MB.

  • Fix HttpServerResponse.setStatus, removeHeader and the cookie combinators resetting explicit content-type and content-length headers to the body's values.

  • Serialize Result.Success under success instead of value in toJSON, JSON.stringify and Node inspection output, matching its success property. Code that reads value from a serialized Result should read success.

  • Add useSemicolonDelimiter and decodeStaticPath options to FindMyWay.RouterConfig, and a FindMyWay.strictConfig preset that turns off path normalization and matches static route text literally.

  • Fix a stalled RpcClient stream consumer blocking other responses and keepalive pings on its socket or worker connection.

  • Keep RPC and MCP stdio servers answering after a malformed NDJSON line, replying with a JSON-RPC -32700 parse error and still handling the other frames. RpcSerialization's makeUnsafe accepts onDecodeError to receive malformed NDJSON frames instead of throwing, and a throwing NDJSON decode now discards its pending UTF-8 bytes.

  • Answer RpcServer requests over framed HTTP, and tools/call on McpServer.layerHttpRequestScoped, without waiting for scheduler rounds first.

  • Fix RPC socket request and acknowledgement write failures to fail with RpcClientError instead of defects, preserving the socket error reason.

  • Speed up failed SchemaBinary decoding and encoding.

  • Add the experimental Codegen.Module builder and fix recursive initialization, name collisions, generated types, and symbol identity in schema and OpenAPI generation.

    Remove SchemaRepresentation.toCodeDocument, CodeDocument, Artifact, and makeCode. Generate schema source with Codegen.Module.addSchemas and print; construct { runtime, Type } directly instead of calling makeCode.

    Custom toCode callbacks must interpolate supplied argument strings unchanged and return supported schema/type expressions. Move unsupported code, such as functions with local declarations, into imported helpers.

    The @effect/openapi-generator/OpenApiTransformer module is removed. Use the OpenApiGenerator service to generate from an OpenAPI spec, selecting the output with format.

    Some nullable OpenAI objects, such as Batch.errors, now strip undeclared fields and no longer expose index signatures; use their declared fields instead.

  • Report SchemaIssue.InvalidValue when SchemaGetter.encodeBase64, encodeBase64Url, encodeHex, or encodeUriComponent encounters an unpaired UTF-16 surrogate during encoding.

  • Encode negative zero as "-0" instead of "0" in Schema.NumberFromString, Schema.FiniteFromString, and numeric encodings derived with Schema.toCodecStringTree.

  • Fix Semaphore taking quadratic time to drain a long queue of equally sized permit requests.

  • Wrap each SQL Migrator run in a Migrator.run tracing span with an effect.sql.migrator.table attribute, including runs with no pending migrations.

  • Fix SQL Server updates failing in repositories created by SqlModel.makeRepository.

  • Preserve completed SSE events when a later event exceeds the size limit in the same chunk.

  • Fix Stream.filterEffect predicate indices restarting at each chunk instead of counting across the whole stream.

  • Prevent Stream.groupBy and Stream.groupByKey from expiring groups while values are being queued.

  • Fix LanguageModel.streamText omitting approved and denied tool results when disableToolCallResolution is set, causing Chat.streamText to rerun approved tools on later turns.

  • Preserve Unicode letters, combining marks, and numbers in String word-case helpers, including non-ASCII config keys.

  • Add String.isWellFormed and String.toWellFormed, which check for and replace unpaired UTF-16 surrogates with the native ES2024 methods when the runtime has them.

  • Accept Schema.Enum parts in Schema.TemplateLiteral and Schema.TemplateLiteralParser, which threw "Invalid TemplateLiteral part Enum" although their types accepted them.

  • Fail writes with a SocketError after an accepted socket's reader is released instead of waiting for a connection that cannot reopen.

  • Add TestConsole readers for captured warning, info, debug, and trace parameters.

  • Add TextDiff.hunks, which groups a line diff into diff -u style hunks as data, optionally with the ranges that differ within changed lines.

  • Traverse only matching branches when looking up keys, values, or entries by Trie prefix.

  • Fix Effect.tx spinning instead of waiting for a transactional value to change when its body recovers from Effect.txRetry.

  • Add a websocket.highWaterMark inbound byte limit to the Bun, Deno, and Node HTTP servers. A WebSocket that cannot pause now stops reading and closes once Socket.fromWebSocket reports a highWaterMark overflow, and empty frames count as one byte. Deno WebSocket frames that arrive before the client closes are no longer lost.

  • Allow PostgreSQL PersistedQueue offers to continue past the 32-bit sequence limit.

  • Add SharedMemory allocation and schemas for shared typed arrays in workers.

  • Fix Workflow.addFinalizer finalizers running before the workflow ends when a durable timer or deferred completes while another step is still running.

  • Fix Xml.decode to fail with a Syntax error instead of Unsupported when an encoding declaration contradicts the bytes, and to reject a US-ASCII declaration after a UTF-8 byte order mark instead of accepting it.

  • Add a namespaces: "strict" option to Xml.decode and Xml.decodeString that reports the namespace and localName of each element and rejects documents that are not namespace-well-formed.

  • Add Xml.toEvents for writing an Xml.Element tree with Xml.encode or Xml.encodeString.

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.