effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
In short
5 new5 fixed
Security
2 advisories affect 2.4.19; 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
Patch Changes
Centralize error messages for bugs
Add a
RegExpmodule topackages/effect, closes #2488Ensure FIFO ordering when a Deferred is resolved
Make tracing spans cheaper to construct
Add Subscribable trait / module
Subscribable represents a resource that has a current value and can be subscribed to for updates.
The following data types are subscribable:
A
SubscriptionRefAn
Actorfrom the experimentalMachinemodule
Simplify scope internals
Ensure correct value is passed to mapping function in
mapAccumloop, closes #2506Add Readable module / trait
Readableis a common interface for objects that can be read from using aget
Effect.For example,
Ref's implementReadable:import { Effect, Readable, Ref } from "effect"; import assert from "assert"; Effect.gen(function* (_) { const ref = yield* _(Ref.make(123)); assert(Readable.isReadable(ref)); const result = yield* _(ref.get); assert(result === 123); });Added {Readable, Subscribable}.unwrap
Add
Duration.divideandDuration.unsafeDivide.import { Duration, Option } from "effect"; import assert from "assert"; assert.deepStrictEqual( Duration.divide("10 seconds", 2), Option.some(Duration.decode("5 seconds")), ); assert.deepStrictEqual(Duration.divide("10 seconds", 0), Option.none()); assert.deepStrictEqual(Duration.divide("1 nano", 1.5), Option.none()); assert.deepStrictEqual( Duration.unsafeDivide("10 seconds", 2), Duration.decode("5 seconds"), ); assert.deepStrictEqual( Duration.unsafeDivide("10 seconds", 0), Duration.infinity, ); assert.throws(() => Duration.unsafeDivide("1 nano", 1.5));
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.