effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
9 new1 fixed
Security
2 advisories affect 3.7.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
Minor Changes
Preserve
Array.modifyArray.modifyOptionnon emptinessimprove: Type Fiber.awaitAll as Exit<A, E>.
New constructor Config.nonEmptyString
Preserve
Array.replaceArray.replaceOptionnon emptinessAdd
Effect.bindAllapiThis api allows you to combine
Effect.allwithEffect.bind. It is useful
when you want to concurrently run multiple effects and then combine their
results in a Do notation pipeline.import { Effect } from "effect" const result = Effect.Do.pipe( Effect.bind("x", () => Effect.succeed(2)), Effect.bindAll( ({ x }) => ({ a: Effect.succeed(x + 1), b: Effect.succeed("foo") }), { concurrency: 2 } ) ) assert.deepStrictEqual(Effect.runSync(result), { x: 2, a: 3, b: "foo" })Add
propagateInterruptionoption to Fiber{Handle,Set,Map}This option will send any external interrupts to the .join result.
Stream: Implement
raceoperator, which accepts two upstreams and returns a stream that mirrors the first upstream to emit an item and interrupts the other upstream.import { Stream, Schedule, Console, Effect } from "effect" const stream = Stream.fromSchedule(Schedule.spaced("2 millis")).pipe( Stream.race(Stream.fromSchedule(Schedule.spaced("1 millis"))), Stream.take(6), Stream.tap((n) => Console.log(n)) ) Effect.runPromise(Stream.runDrain(stream)) // Output each millisecond from the first stream, the rest streams are interrupted // 0 // 1 // 2 // 3 // 4 // 5Avoid automatic propagation of finalizer concurrency, closes #3440
Add Context.getOrElse api, for gettings a Tag's value with a fallback
Patch Changes
Add
Micro.isMicroCauseguard
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.