effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
4 new
Security
2 advisories affect 3.18.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
Add experimental Graph module with comprehensive graph data structure support
This experimental module provides:
Directed and undirected graph support
Immutable and mutable graph variants
Type-safe node and edge operations
Graph algorithms: DFS, BFS, shortest paths, cycle detection, etc.
Example usage:
import { Graph } from "effect" // Create a graph with mutations const graph = Graph.directed<string, number>((mutable) => { const nodeA = Graph.addNode(mutable, "Node A") const nodeB = Graph.addNode(mutable, "Node B") Graph.addEdge(mutable, nodeA, nodeB, 5) }) console.log( `Nodes: ${Graph.nodeCount(graph)}, Edges: ${Graph.edgeCount(graph)}` )Automatically set otel parent when present as external span
Add Effect.Semaphore.resize
Introduce ReadonlyTag as the covariant side of a tag, enables:
import type { Context } from "effect" import { Effect } from "effect" export class MyRequirement extends Effect.Service<MyRequirement>()( "MyRequirement", { succeed: () => 42 } ) {} export class MyUseCase extends Effect.Service<MyUseCase>()("MyUseCase", { dependencies: [MyRequirement.Default], effect: Effect.gen(function* () { const requirement = yield* MyRequirement return Effect.fn("MyUseCase.execute")(function* () { return requirement() }) }) }) {} export function effectHandler<I, Args extends Array<any>, A, E, R>( service: Context.ReadonlyTag<I, (...args: Args) => Effect.Effect<A, E, R>> ) { return Effect.fn("effectHandler")(function* (...args: Args) { const execute = yield* service yield* execute(...args) }) } export const program = effectHandler(MyUseCase)
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.