effect
4.1.4 · 11 Nov 2026MIT67.1M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
1 fixed
Security
2 advisories affect 3.13.6; 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
Arbitrary:
makecalled onSchema.Classnow respects property annotations, closes #4550.Previously, when calling
Arbitrary.makeon aSchema.Class, property-specific annotations (such asarbitrary) were ignored, leading to unexpected values in generated instances.Before
Even though
ahad anarbitraryannotation, the generated values were random:import { Arbitrary, FastCheck, Schema } from "effect" class Class extends Schema.Class<Class>("Class")({ a: Schema.NumberFromString.annotations({ arbitrary: () => (fc) => fc.constant(1) }) }) {} console.log(FastCheck.sample(Arbitrary.make(Class), 5)) /* Example Output: [ Class { a: 2.6624670822171524e-44 }, Class { a: 3.4028177873105996e+38 }, Class { a: 3.402820626847944e+38 }, Class { a: 3.783505853677006e-44 }, Class { a: 3243685 } ] */After
Now, the values respect the
arbitraryannotation and return the expected constant:import { Arbitrary, FastCheck, Schema } from "effect" class Class extends Schema.Class<Class>("Class")({ a: Schema.NumberFromString.annotations({ arbitrary: () => (fc) => fc.constant(1) }) }) {} console.log(FastCheck.sample(Arbitrary.make(Class), 5)) /* [ Class { a: 1 }, Class { a: 1 }, Class { a: 1 }, Class { a: 1 }, Class { a: 1 } ] */
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.