Packages

effect

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

Upgrading effect From 2.4.2 to 4.1.4

262 releases in betweennotes for 261

Other targets from 2.4.2Newest 2.x2.4.19Clears its 2 advisories3.22.1
  1. 2.4.2yours
  2. 17 releases
  3. 3.0.0major
  4. 231 releases
  5. 4.0.0major
  6. 11 releases
  7. 4.1.4target
  8. 30 pre
526+
changes to make
2
advisories fixed
433+
new
897+
fixes

Counted from 261 of 262 release notes, and the breaking changes of 4 pre-releases on the way to a major. Advisories are counted from the advisory database, in full.

Start here

Before you upgrade

Tick each one off as you go
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4
  • Breaking4.1.4

Security

Release by release

  1. 4.1.4

    Migration needed11 Nov 20264 new · 1 fix
    • Breaking

      Model: endpoints.

    • Breaking

      BYOKKey: declared_region, declared_zdr, is_byok_only, and is_required.

    • Breaking

      PublicEndpoint: native_tools, service_tier, supports_diarization, and supports_tool_choice.

    • Breaking

      Guardrail: include_byok_in_budgets.

  2. 4.1.3

    Migration needed10 Nov 202610 new · 34 fixes
    • Breaking

      A Tool.dynamic tool without a success schema must return a JSON value, even when toModelOutput replaces the model payload. Other values, such as a Date, now fail with ToolResultEncodingError. Declare a success schema, for example Schema.Date, or return a JSON value. Declare success: Schema.Void for a dynamic tool that returns undefined.

    • Breaking

      encodedResult of a Schema.Void tool, including Tool.make without a success schema, is now null instead of undefined.

    • Breaking

      Fix HttpStaticServer responding 200 instead of 304 when an If-None-Match entity-tag contains a comma.

    • Breaking

      Fix Effect.race, Effect.raceFirst, Effect.raceAll, Effect.raceAllFirst and Effect.timeoutOption sometimes letting a loser finish after the race settled, which could drop its result, such as an item taken from a Queue.

  3. 4.1.2

    2 Nov 20262 new · 23 fixes
    • New

      Add Json5.parse and Jsonc.parse to effect/encoding, returning a Result that fails with an EncodingError on invalid input.

    • New

      Add SchemaBinary.int32, uint32, int64 and uint64, opt-in schemas that write integers as fixed-width little-endian payloads. The 32-bit schemas decode to number and the 64-bit schemas to bigint. Out-of-range and non-integer values are rejected instead of wrapped.

    • Fixed

      Fix ByteSize decimal unit constructors such as megabytes(2.01) throwing or returning the wrong byte count, and reject fractional-byte quantities instead of rounding them.

    • Fixed

      Fix cluster entity defect restart backoff being shared by all entities of a type and never resetting.

  4. 4.1.1

    30 Oct 20269 new · 45 fixes
    • New

      Speed up Base64Url.decode and Base64Url.decodeString by decoding the URL-safe alphabet directly, instead of transliterating the input and decoding it again as standard Base64.

    • New

      Add onRejection to CircuitBreaker.execute. With "allow", a call the circuit would refuse with CircuitOpen or CircuitHalfOpen runs unrecorded instead, while a call the circuit admits, probe included, is recorded as usual. Calls that must always run can then still count towards the breaker's state. Defaults to "fail", which keeps the current behavior.

    • New

      Speed up DateTime construction by creating the partsUtc, adjustedEpochMilliseconds and partsAdjusted cache properties on first use. Reading and writing these fields is unchanged, but Object.hasOwn, Object.getOwnPropertyNames and Object.getOwnPropertyDescriptor no longer report them before the caches are populated, or at all on instances sealed or frozen before first use. Reading the parts of, or writing these fields on, an instance frozen before first use no longer throws.

    • New

      Add HttpClient.timeout, which fails requests that receive no response within the given duration with an HttpClientError wrapping a TransportError, so the timed client keeps the standard HttpClient service type and is retried by retryTransient. The timeout covers the wrapped client until it returns a response, which for a plain client is when the response headers arrive; body reads after that are not covered.

  5. 4.1.0

    Migration needed29 Oct 202612 new · 23 fixes
    • Breaking

      Use SecureRandom for randomness and UUIDs, and Digest with algorithm values such as Digest.sha256 for hashing. Replace effect/testing/TestCrypto with Layer.mock for the required services.

    • Breaking

      Provide crypto explicitly; it is no longer included in the runtime *Services bundles. NodeCrypto, BunCrypto, DenoCrypto and BrowserCrypto offer individual family layers and a combined layer, supplying SecureRandom where needed. Core modules offer layerWebCrypto.

    • Breaking

      Provide Digest.Digest instead of Crypto.Crypto to SqlMessageStorage and SingleRunner, and instead of EventLogEncryption to SqlEventLogServerEncrypted.makeStorage and layerStorage. Replace EventLogEncryption.sha256String with digest.digestHex(Digest.sha256, bytes).

    • Breaking

      Declare decision images as input fields with Decision.Image, and add Decision.locate, which answers with a bounding box around one target in an image field.

  6. 4.0.7

    Migration needed28 Oct 202616 new · 87 fixes
    • Breaking

      Ignore end, attribute, event, and addLinks calls on spans that have already ended. Logs and Effect.annotateCurrentSpan from fibers that outlive their span no longer modify the ended span, OtlpTracer no longer exports a span twice when end is called again, OtelSpan no longer triggers OpenTelemetry SDK warnings for late calls, and the DevTools tracer no longer sends events for ended spans.

    • New

      Add a scoped CliOutput.Presenter service for suppressing, redirecting, or replacing built-in CLI help, invalid-invocation, and version output.

    • New

      Add a toModelOutput option to Tool.make and Tool.dynamic for sending text, images and files to the model in place of the serialized tool result. Anthropic and OpenAI Responses send native content blocks; OpenAI-compatible APIs and OpenRouter send text with a placeholder for each file, via the new Prompt.toolModelOutputToText.

    • New

      Add a concurrency option to Arbitrary.checkEffect and global check configuration to run independent property evaluations concurrently. Results remain deterministic for deterministic generators and repeatable properties, while shrinking and replay stay sequential. The default concurrency is 1.

  7. 4.0.6

    Migration needed22 Oct 202617 new · 53 fixes
    • Breaking

      EncryptedEntry and EncryptedRemoteEntry are replaced by EncryptedBatch and EncryptedRemoteBatch, and WriteEntries.encryptedEntries becomes batches.

    • Breaking

      EventLogEncryption.encrypt and decrypt take the store id and work on batches, and the decodeChanges option of EventLogRemote.makeWith receives the store id.

    • Breaking

      EventLogServerEncrypted.Storage.write and changes use batches, PersistedEntry is removed, and SqlEventLogServerEncrypted no longer accepts insertBatchSize.

    • Breaking

      EventJournal.writeFromRemote now hands its effect the whole batch with conflicts read up front, and EventLog.HandlerTransaction runs a replayed batch's handlers in one transaction.

  8. 4.0.5

    15 Oct 20269 new · 32 fixes
    • New

      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 =.

    • New

      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.

    • New

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

    • New

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

18 other lines we could not sort, mostly version bumps
  • Replace gen_ai.system with gen_ai.provider.name. The system option, BaseAttributes and WellKnownSystem are removed in favor of provider: { name }, ProviderAttributes and WellKnownProviderName.

    4.0.2
  • LanguageModel spans are client spans and record gen_ai.output.type (text or json) for every provider. The OpenAI responseFormat telemetry option and WellKnownResponseFormat are removed.

    4.0.2
  • Move OpenAI service-tier and system-fingerprint attributes from gen_ai.openai.* to openai.*.

    4.0.2
  • Rename concurrency, toolChoice and objectName span attributes to effect.ai.concurrency, effect.ai.tool_choice and effect.ai.object_name. Tool choices record the resolved value, defaulting to "auto"; object choices are JSON-encoded.

    4.0.2
  • Include cached tokens in Anthropic gen_ai.usage.input_tokens and report cache reads and writes as gen_ai.usage.cache_read.input_tokens and gen_ai.usage.cache_write.input_tokens. The duplicate Anthropic cacheCreationInputTokens and cacheReadInputTokens response options are removed.

    4.0.2
  • Name statement spans by db.namespace, server.address[:server.port] or db.system.name, falling back to sql.execute. The rules are exported as Statement.spanName and Statement.spanTarget.

    4.0.2
  • Record Effect execution methods in effect.sql.method instead of db.operation.name.

    4.0.2
  • Use internal transaction spans with effect.sql.transaction.commit|savepoint|rollback events.

    4.0.2
  • Name D1 batches of two or more statements BATCH, or BATCH {target} when a target is set, with db.operation.name set to BATCH and db.operation.batch.size.

    4.0.2
  • Removed some unnecessary single-arg pipe calls

    3.16.14

14 internal lines (docs, tests, tooling) left out.

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.