effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
10 new
Security
2 advisories affect 3.4.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
Make Option.liftPredicate dual
Add Effect.liftPredicate
Effect.liftPredicatetransforms aPredicatefunction into anEffectreturning the input value if the predicate returnstrueor failing with specified error if the predicate fails.import { Effect } from "effect"; const isPositive = (n: number): boolean => n > 0; // succeeds with `1` Effect.liftPredicate(1, isPositive, (n) => `${n} is not positive`); // fails with `"0 is not positive"` Effect.liftPredicate(0, isPositive, (n) => `${n} is not positive`);Add EventListener type to Stream to avoid use of dom lib
Add
lastNonEmptyfunction toChunkmodule, closes #2946Stream: Implement Success, Error, Context type accessors
Add Micro module
A lightweight alternative to Effect, for when bundle size really matters.
At a minimum, Micro adds 5kb gzipped to your bundle, and scales with the amount
of features you use.Add
ManagedRuntimetype utils (Context, andError)Add Either.liftPredicate
Add
Tuple.atapi, to retrieve an element at a specified index from a tuple.import { Tuple } from "effect"; assert.deepStrictEqual(Tuple.at([1, "hello", true], 1), "hello");Add
ensureutil for Array, used to normalizeA | ReadonlyArray<A>import { ensure } from "effect/Array"; // lets say you are not 100% sure if it's a member or a collection declare const someValue: { foo: string } | Array<{ foo: string }>; // $ExpectType ({ foo: string })[] const normalized = ensure(someValue);
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.