Packages

effect

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

Your version

4.0.4

13 Oct 2026Where it was published

4.1.5 is the newest release of 4.x.

In short

8 new1 faster20 fixed

Release note

Patch Changes

  • Bound sparse array indices in SchemaGetter.makeTreeRecord, used by Schema.fromURLSearchParams and Schema.fromFormData. An indexed container with more than 20 holes is now returned as an object keyed by its index strings instead of a sparse array, and appending after the maximum array index no longer throws.

  • Bound import-time stack detection probes to the frames they inspect, restoring the caller's stack trace limit afterward.

  • Stop grouped RequestResolvers from retaining batch keys for the lifetime of the resolver. Equal keys are now matched by the pending batch map, so a key is dropped as soon as its batch stops pending, including after interruption.

  • Support an explicit client servername for TLS socket upgrades without changing hostname behavior when omitted.

  • Use decoded response aliases in generated HTTP clients. Render bare numbers with a standard leading finite check as Schema.Finite, preserving annotations and other checks.

  • Optimize Context.pick for zero or one service.

  • Fix zoned DateTime.add and DateTime.subtract to apply hours, minutes, seconds and milliseconds as elapsed time across DST transitions.

  • Add toolCallValidation: "deferred" for callers using disableToolCallResolution: true. Model-generated tool calls return with unknown parameters, including invalid parameters and undeclared tool names, even without a toolkit. Supported by the Anthropic, OpenAI, and OpenAI-compatible providers. Strict validation remains the default; provider-executed calls remain validated.

  • Add experimental effect/graphql with typed operations, middleware, HTTP and subscription transports, partial results, serializable errors and cursor pagination.

  • Fix HttpClient.withRateLimiter reading a Retry-After HTTP date as a number of seconds.

  • Add McpServer.layerHttpRequestScoped for serverless hosts such as Cloudflare Workers. Each POST is served by an MCP server owned by that request, so no fiber or timer outlives the request. The new layer accepts only sessionless protocol adapters such as v2026_07_28, with no subscription or session termination options. McpServer.layerHttp retains its long-lived server behavior.

  • Tighten colliding bounds in place when exporting JSON Schema, instead of moving them into allOf. This applies to numeric, length, item-count and property-count bounds, and an inclusive or exclusive bound implied by the other on the same side is dropped. For example, Schema.Natural now exports minimum: 0, and Schema.Int.check(Schema.isGreaterThan(0)) exports exclusiveMinimum: 0 without the safe-integer minimum.

  • Fix Multipart.toPersisted failing for uploads named . or .. and for long multi-byte file names.

  • Add NetAddress.loopbackAddresses.

  • Add Host.toFullyQualified, Host.toRelative, and Host.parseHostsFile.

  • Persist outgoing cluster messages while the locally assigned shard is waiting for its lock.

  • Prompt.fromResponseParts now keeps streamed text and reasoning in stream order, and keeps partial text from unended text blocks.

  • Release the durable waits of losing DurableDeferred.raceAll branches once the race settles, so a late completion such as a losing DurableClock.sleep no longer preempts and replays the continuing workflow

  • Honor Retry-After in HttpClient.retryTransient.

  • Allow configuring Scalar's preferred authentication security scheme through HttpApiScalar without a TypeScript cast.

  • Fix cluster Sharding startup accessing storage-loop state before initialization, preventing a scheduler-dependent ReferenceError and delayed initial storage reads.

  • Fix Sink.takeUntil and Sink.takeUntilEffect dropping the element after a match. They now stop at the match and return the remaining input as leftovers.

  • Add dispatchEmptyNamedEvents to Sse decode options. It also dispatches an event that sets an event: name but has no data: line, which protocols such as graphql-sse use for complete.

  • Fix quadratic parsing time in Sse.makeParser and Sse.decode for long lines split across many chunks.

  • Complete HTTP server spans synchronously before the request fiber exits, preventing completed spans from being lost during immediate runtime shutdown.

  • Clean up unused Anthropic bindings and make documentation-only imports type-only, preserving server-tool inputs and documentation links.

  • Merge outer headers and cookies into a copy of a raw Response in HttpServerResponse.toWeb, leaving the original headers unchanged. This supports immutable headers and prevents cookies from accumulating across requests that reuse a response. Responses with nothing to merge are returned unchanged.

  • Wake a suspended WorkflowEngine.execute caller as soon as its workflow has a final result, instead of waiting for the next suspendedRetrySchedule step. A replay that suspends again does not spend a step of the schedule. With ClusterWorkflowEngine, only callers on the runner that owns the execution are woken early; other callers keep relying on suspendedRetrySchedule.

  • HttpEffect.toWebHandler now interrupts a streamed response body when the request is aborted after its headers were sent, even if the body is no longer being read, which releases the request scope.

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.