effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
1 new1 fixed
Security
2 advisories affect 3.19.4; 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
Fix Types.DeepMutable mapping over functions
Add experimental PartitionedSemaphore module
A
PartitionedSemaphoreis a concurrency primitive that can be used to
control concurrent access to a resource across multiple partitions identified
by keys.The total number of permits is shared across all partitions, with waiting
permits equally distributed among partitions using a round-robin strategy.This is useful when you want to limit the total number of concurrent accesses
to a resource, while still allowing for fair distribution of access across
different partitions.import { Effect, PartitionedSemaphore } from "effect" Effect.gen(function* () { const semaphore = yield* PartitionedSemaphore.make<string>({ permits: 5 }) // Take the first 5 permits with key "A", then the following permits will be // equally distributed between all the keys using a round-robin strategy yield* Effect.log("A").pipe( Effect.delay(1000), semaphore.withPermits("A", 1), Effect.replicateEffect(15, { concurrency: "unbounded" }), Effect.fork ) yield* Effect.log("B").pipe( Effect.delay(1000), semaphore.withPermits("B", 1), Effect.replicateEffect(10, { concurrency: "unbounded" }), Effect.fork ) yield* Effect.log("C").pipe( Effect.delay(1000), semaphore.withPermits("C", 1), Effect.replicateEffect(10, { concurrency: "unbounded" }), Effect.fork ) return yield* Effect.never }).pipe(Effect.runFork)
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.