effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
1 breaking14 new4 fixed
- Breaking
Release Effect 3.0 🎉
Security
2 advisories affect 3.0.0; 3.22.1 fixes them
- HighEffect: ReDoS in Schema.TemplateLiteral compiled regexGHSA-7589-6fvf-x4pw · 19 Nov 2026Fixed in 3.22.1
- HighEffect `AsyncLocalStorage` context lost/contaminated inside Effect fibers under concurrent load with RPCGHSA-38f7-945m-qr2g · 20 Mar 2026Fixed in 3.20.0
Release note
Major Changes
- Breaking
Release Effect 3.0 🎉
Minor Changes
Close FiberHandle/FiberSet/FiberMap when it is released
When they are closed, fibers can no longer be added to them.
Add preregisteredWords option to frequency metric key type
You can use this to register a list of words to pre-populate the value of the
metric.import { Metric } from "effect"; const counts = Metric.frequency("counts", { preregisteredWords: ["a", "b", "c"], }).register();Bump TypeScript min requirement to version 5.4
Add unique identifier to Tracer.ParentSpan tag
Renamed
ReadonlyArrayandReadonlyRecordmodules for better discoverability.The signatures of the
HaltStrategy.matchStreamHaltStrategy.matchfunctions have been changed to the generally accepted onesSupport variadic arguments in Effect.log
This makes Effect.log more similar to console.log:
Effect.log("hello", { foo: "bar" }, Cause.fail("error"));Fix ConfigError
_tag, with the previous implementation catching theConfigErrorwithEffect.catchTagwould showAnd,Or, etc.Replace use of
unitterminology withvoidFor all the data types.
Effect.unit; // => Effect.void Stream.unit; // => Stream.void // etc
Either: Fix
getEquivalenceparameter order fromEither.getEquivalence(left, right)toEither.getEquivalence({ left, right })Use LazyArg for Effect.if branches
Instead of:
Effect.if(true, { onTrue: Effect.succeed("true"), onFalse: Effect.succeed("false"), });You should now write:
Effect.if(true, { onTrue: () => Effect.succeed("true"), onFalse: () => Effect.succeed("false"), });Replaced custom
NoInfertype with the nativeNoInfertype from TypeScript 5.4Cache<Key, Error, Value>has been changed toCache<Key, Value, Error = never>.ScopedCache<Key, Error, Value>has been changed toScopedCache<Key, Value, Error = never>.Lookup<Key, Environment, Error, Value>has been changed toLookup<Key, Value, Error = never, Environment = never>
Patch Changes
Don't run resolver if there are no incomplete requests
Add FiberMap.has/unsafeHas api
Add String casing transformation apis
snakeToCamelsnakeToPascalsnakeToKebabcamelToSnakepascalToSnakekebabToSnake
Add FiberHandle module, for holding a reference to a running fiber
import { Effect, FiberHandle } from "effect"; Effect.gen(function* (_) { const handle = yield* _(FiberHandle.make()); // run some effects yield* _(FiberHandle.run(handle, Effect.never)); // this will interrupt the previous fiber yield* _(FiberHandle.run(handle, Effect.never)); // this will not run, as a fiber is already running yield* _(FiberHandle.run(handle, Effect.never, { onlyIfMissing: true })); yield* _(Effect.sleep(1000)); }).pipe( Effect.scoped, // The fiber will be interrupted when the scope is closed );Change return type of Fiber.joinAll to return an array
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.