Skip to content

Update effect to v4 - #295

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-effect
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-effect

Conversation

@renovate

@renovate renovate Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@effect/platform-node (source) 0.108.2 → 4.0.4 age confidence
effect (source) 3.22.2 → 4.0.4 age confidence

Release Notes

Effect-TS/effect (@​effect/platform-node)

v4.0.4

Compare Source

Patch Changes

v4.0.3

Compare Source

Patch Changes

v4.0.2

Compare Source

Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Patch Changes
  • #​8598 988c467 Thanks @​tim-smart! - Close server WebSockets with 1000 on success, 1001 on interruption, or 1011 on failure, while preserving explicit close codes. HTTP request scopes retain the handler's failure exit through response handling and middleware.

  • #​8633 2c552f2 Thanks @​IMax153! - Effect 4.0 is the first stable release of Effect v4. It replaces the 4.0.0 beta and release-candidate series, whose per-release notes remain below under the 4.0.0-beta.* and 4.0.0-rc.* headings. To upgrade from Effect 3, follow the migration guide.

    Packaging and versioning

    • All Effect packages share one version number and are released together. Use the same version of effect and every @effect/* package.
    • @effect/platform, @effect/rpc, @effect/cluster, @effect/cli, @effect/ai, @effect/sql, @effect/workflow, @effect/experimental and similar packages are merged into effect. Separate packages remain only for platforms (@effect/platform-*), SQL drivers (@effect/sql-*), AI providers (@effect/ai-*), framework bindings (@effect/atom-*), OpenTelemetry, Vitest and tooling.
    • Modules such as effect/http, effect/http-api, effect/rpc, effect/cluster, effect/workflow, effect/ai, effect/cli, effect/sql and effect/schema import from effect/<area>. APIs tagged @stability unstable may have breaking changes in minor releases. APIs without a stability tag follow semver.
    • APIs that expose a third-party dependency are tagged @stability unstable, because that dependency's releases can change them. This covers NodeRedis, DenoRedis, BunRedis, @effect/platform-node/Undici and the undici dispatcher APIs, the ws options and re-exports in the platform packages, driver-specific options and clients in @effect/sql-clickhouse, @effect/sql-d1, @effect/sql-libsql, @effect/sql-mssql, @effect/sql-mysql2, @effect/sql-pglite and @effect/sql-sqlite-do, the provider clients, models and generated schemas in the @effect/ai-* packages, @effect/opentelemetry, and the vitest re-export in @effect/vitest.
    • effect has no runtime dependencies.
    • New packages in v4: @effect/platform-deno, @effect/sql-pglite, @effect/ai-openai-compat, @effect/ai-typesafe, @effect/atom-react, @effect/atom-solid, @effect/atom-vue, @effect/openapi-generator and @effect/doctest. @effect/docgen now lives in this repository.

    Core

    • The fiber runtime was rewritten for lower memory use and faster execution, with smaller bundles and better tree-shaking.
    • Services are defined with Context.Service, FiberRef is replaced by Context.Reference, Cause has a flat structure, and many combinators were renamed. See the migration guide for the full list.
    • Software transactional memory is built into Effect.tx, with TxRef, TxQueue, TxHashMap, TxPubSub, TxSemaphore and related Tx* data types.
    • Clock separates wall-clock time from monotonic time.
    • New modules include Semaphore, Latch, LayerRef, ErrorReporter, ByteSize, Newtype and Crypto. Arbitrary is now a native property-based testing module and no longer depends on fast-check.

    Schema

    • Schema v4 is a new implementation with faster parsing, class-based schemas, make constructors on every schema, and effectful decoding with services.
    • SchemaRepresentation powers JSON Schema (Draft-04, Draft-07, 2020-12 and OpenAPI 3.0/3.1) import and export, TypeScript code generation, and AI structured output.
    • SchemaBinary provides a compact binary codec and is the default wire format for cluster transports.
    • Optional JIT and AOT schema compilers are available as experimental modules.

    Platform, HTTP and RPC

    • HttpApi supports typed response headers, streaming and SSE responses, the HTTP QUERY method, HttpApiTest for in-memory testing, and much faster type checking for large APIs.
    • The HTTP modules add static file serving, response compression, rate-limited clients and graceful server shutdown.
    • Socket has a pull-based reader with backpressure and STARTTLS support. Network addresses are modeled by effect/net.
    • RPC serialization is schema-aware and supports server-originated requests and notifications.
    • @effect/platform-deno adds full Deno support. The Node, Bun, Deno and browser packages all provide the platform Crypto service, and the browser package adds IndexedDB support.

    Cluster and Workflow

    • Workflows can be declared with class syntax, and DurableQueue and an in-memory WorkflowEngine are available.
    • Runner memory can be bounded with ShardingConfig limits. Shutdown, entity movement and persisted replies are more reliable.

    SQL

    • @effect/sql-pg uses a built-in PostgreSQL client with pipelining, prepared statements and binary codecs, and no longer depends on pg.
    • @effect/sql-sqlite-node uses Node's built-in node:sqlite and requires Node 22.16 or newer.
    • SqlError exposes structured reasons such as UniqueViolation.

    AI

    • effect/ai adds EmbeddingModel, the DecisionModel classification and rating API, dynamic tools and tool approvals.
    • The MCP server supports protocol versions 2024-11-05 through 2026-07-28, including elicitation, sampling with tools, resource subscriptions and typed tool output.
    • Provider packages cover Anthropic, OpenAI, OpenAI-compatible APIs and OpenRouter.

    CLI, Atom, observability and testing

    • effect/cli adds global flags, command aliases and examples, an interactive wizard mode, and shell completions for Bash, Zsh and Fish.
    • effect/reactivity and the @effect/atom-* bindings add SSR hydration, stale-while-revalidate atoms and serializable RPC and HttpApi queries.
    • The OTLP exporters can be configured with standard OpenTelemetry environment variables, and @effect/opentelemetry aligns logs and spans with the OpenTelemetry specification.
    • @effect/vitest runs property tests with the native Arbitrary module and supports Vitest fixtures.

    Requirements

    • TypeScript 5.9 or newer. TypeScript 7 is recommended.
    • @effect/vitest and @effect/doctest require Vitest 5.
    • @effect/atom-react requires React 19.
    • @effect/platform-deno requires Deno 2.8.3 or newer.
  • Updated dependencies [cbfc7b4, 5a81a6f, 68b6394, 5250ca6, 5f9c9d1, 3278821, 83429b4, 0af6d0c, 927e01e, 10d8524, 35ac25a, 29e0aa7, 8783536, df77fff, ef7d77f, 035e369, f72790c, aa19472, 988c467, 735b77b, e5f7d12, 2c552f2]:

v0.108.3

Compare Source

Patch Changes
Effect-TS/effect (effect)

v4.0.4

Compare Source

Patch Changes
  • #​9030 7547a99 Thanks @​effect-bot! - 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.

  • #​9083 711719d Thanks @​effect-bot! - Bound import-time stack detection probes to the frames they inspect, restoring the caller's stack trace limit afterward.

  • #​9041 8f1ea52 Thanks @​tim-smart! - 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.

  • #​9010 c93485e Thanks @​effect-bot! - Support an explicit client servername for TLS socket upgrades without changing hostname behavior when omitted.

  • #​8990 37e088f Thanks @​bastiankistner! - 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.

  • #​8998 9314666 Thanks @​gchen0002! - Optimize Context.pick for zero or one service.

  • #​9048 a0a26b7 Thanks @​jayhemnani9910! - Fix zoned DateTime.add and DateTime.subtract to apply hours, minutes, seconds and milliseconds as elapsed time across DST transitions.

  • #​9008 cc843ea Thanks @​effect-bot! - 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.

  • #​8979 ab90be9 Thanks @​tim-smart! - Add experimental effect/graphql with typed operations, middleware, HTTP and subscription transports, partial results, serializable errors and cursor pagination.

  • #​9052 a59b971 Thanks @​Tarekkharsa! - Fix HttpClient.withRateLimiter reading a Retry-After HTTP date as a number of seconds.

  • #​9031 fccf660 Thanks @​effect-bot! - 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.

  • #​9081 1bfd8fd Thanks @​hsyntax! - 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.

  • #​9013 78e4c43 Thanks @​jayhemnani9910! - Fix Multipart.toPersisted failing for uploads named . or .. and for long multi-byte file names.

  • #​8991 fde67a1 Thanks @​fubhy! - Add NetAddress.loopbackAddresses.

  • #​8992 118deef Thanks @​fubhy! - Add Host.toFullyQualified, Host.toRelative, and Host.parseHostsFile.

  • #​9046 cea74c9 Thanks @​effect-bot! - Persist outgoing cluster messages while the locally assigned shard is waiting for its lock.

  • #​9056 b7c1ac6 Thanks @​tim-smart! - Prompt.fromResponseParts now keeps streamed text and reasoning in stream order, and keeps partial text from unended text blocks.

  • #​8997 f837966 Thanks @​effect-bot! - 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

  • #​9053 09738f4 Thanks @​Tarekkharsa! - Honor Retry-After in HttpClient.retryTransient.

  • #​9019 22e7129 Thanks @​effect-bot! - Allow configuring Scalar's preferred authentication security scheme through HttpApiScalar without a TypeScript cast.

  • #​9069 fdcb47e Thanks @​effect-bot! - Fix cluster Sharding startup accessing storage-loop state before initialization, preventing a scheduler-dependent ReferenceError and delayed initial storage reads.

  • #​9049 fc349a1 Thanks @​jayhemnani9910! - 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.

  • #​8979 ab90be9 Thanks @​tim-smart! - 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.

  • #​9065 892d14d Thanks @​Abdullah1738! - Fix quadratic parsing time in Sse.makeParser and Sse.decode for long lines split across many chunks.

  • #​9066 077c557 Thanks @​effect-bot! - Complete HTTP server spans synchronously before the request fiber exits, preventing completed spans from being lost during immediate runtime shutdown.

  • #​9029 4a999a3 Thanks @​effect-bot! - Clean up unused Anthropic bindings and make documentation-only imports type-only, preserving server-tool inputs and documentation links.

  • #​9062 797696a Thanks @​adam-r-kowalski! - 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.

  • #​9007 cf5179b Thanks @​effect-bot! - 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.

  • #​9037 e1c6053 Thanks @​effect-bot! - 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.

v4.0.3

Compare Source

Patch Changes
  • #​8977 b4e5af8 Thanks @​kitlangton! - Prevent crashes and premature interruption when Effect.cached, Effect.cachedWithTTL, and Effect.cachedInvalidateWithTTL are synchronously re-entered.

  • #​8982 b8d6e7a Thanks @​Yi-111-a! - Export CliOutput.displayWidth to measure terminal-cell widths using the same logic as built-in CLI help and tables.

  • #​8933 89d5c88 Thanks @​tim-smart! - Respect NO_COLOR in CLI prompts and the command wizard, suppressing color and style escapes while preserving cursor and redraw controls.

  • #​8941 66257d2 Thanks @​Tanner-Scadden! - 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.

  • #​8940 cd2ab19 Thanks @​Tanner-Scadden! - 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.

  • #​8897 ca068ce Thanks @​effect-bot! - Add separate migration and storage layers to cluster SQL storage so applications can use tables migrated by an owner con

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/major-effect branch 6 times, most recently from 5c2b43b to 601c4c6 Compare October 14, 2026 23:21
@renovate
renovate Bot force-pushed the renovate/major-effect branch from 601c4c6 to 19b335e Compare October 17, 2026 12:31
@GraemeF

GraemeF commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Held: this is a migration, not a bump.

Effect 4 merges @effect/platform into effect and rewrites Schema, so taking it touches most of the codebase. The maintainer decided to stay on Effect 3 for now and to plan the move to Effect 4 as its own piece of work once Effect 4 has had a few patch releases.

This PR stays open for Renovate to keep rebasing. It wakes when that migration lands. At that point it is either closed as superseded or reviewed afresh against what remains.

@renovate
renovate Bot force-pushed the renovate/major-effect branch 2 times, most recently from 0e5426f to 43e4e1f Compare October 19, 2026 06:16
@renovate
renovate Bot force-pushed the renovate/major-effect branch from 43e4e1f to c9296b0 Compare October 20, 2026 10:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant