effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
13 new2 fixed
Security
2 advisories affect 3.9.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
Adds HashMap.HashMap.Entry type helper
Add deno support to Inspectable
LatchimplementsEffect<void>with.awaitsemanticEffect.mapAccum & Array.mapAccum preserve non-emptiness
Poolis now a subtype ofEffect, equivalent toPool.getSupport providing an array of layers via Effect.provide and Layer.provide
Support ManagedRuntime in Effect.provide
ManagedRuntime<R, E>is subtype ofEffect<Runtime<R>, E, never>Tuple.maptransforms each element of tuple using the given function, treating tuple homomorphicallyimport { pipe, Tuple } from "effect" const result = pipe( // ^? [string, string, string] ["a", 1, false] as const, T.map((el) => { //^? "a" | 1 | false return el.toString().toUppercase() }) ) assert.deepStrictEqual(result, ["A", "1", "FALSE"])Add Array.pad function
Add an
isRegExptype guardImplement Effect.Service as a Tag and Layer with Opaque Type.
Namely the following is now possible:
class Prefix extends Effect.Service<Prefix>()("Prefix", { sync: () => ({ prefix: "PRE" }) }) {} class Postfix extends Effect.Service<Postfix>()("Postfix", { sync: () => ({ postfix: "POST" }) }) {} const messages: Array<string> = [] class Logger extends Effect.Service<Logger>()("Logger", { accessors: true, effect: Effect.gen(function* () { const { prefix } = yield* Prefix const { postfix } = yield* Postfix return { info: (message: string) => Effect.sync(() => { messages.push(`[${prefix}][${message}][${postfix}]`) }) } }), dependencies: [Prefix.Default, Postfix.Default] }) {} describe("Effect", () => { it.effect("Service correctly wires dependencies", () => Effect.gen(function* () { const { _tag } = yield* Logger expect(_tag).toEqual("Logger") yield* Logger.info("Ok") expect(messages).toEqual(["[PRE][Ok][POST]"]) const { prefix } = yield* Prefix expect(prefix).toEqual("PRE") const { postfix } = yield* Postfix expect(postfix).toEqual("POST") }).pipe(Effect.provide([Logger.Default, Prefix.Default, Postfix.Default])) ) })Resource<A, E>is subtype ofEffect<A, E>.ScopedRed<A>is subtype ofEffect<A>.
Patch Changes
Fix Unify for Deferred
Move ManagedRuntime.TypeId to fix circular imports
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.