effect
4.1.4 · 11 Nov 2026MIT67.1M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
10 fixed
Security
2 advisories affect 3.12.5; 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: Fix bug adjusting array constraints for schemas with fixed and rest elements
This fix ensures that when a schema includes both fixed elements and a rest element, the constraints for the array are correctly adjusted. The adjustment now subtracts the number of values generated by the fixed elements from the overall constraints.
Schema: Improve error messages for invalid transformations
Before
import { Schema } from "effect" Schema.decodeUnknownSync(Schema.NumberFromString)("a") /* throws: ParseError: NumberFromString └─ Transformation process failure └─ Expected NumberFromString, actual "a" */After
import { Schema } from "effect" Schema.decodeUnknownSync(Schema.NumberFromString)("a") /* throws: ParseError: NumberFromString └─ Transformation process failure └─ Unable to decode "a" into a number */Schema: Extend Support for Array filters, closes #4269.
Added support for
minItems,maxItems, anditemsCountto all schemas whereAextendsReadonlyArray, includingNonEmptyArray.Example
import { Schema } from "effect" // Previously, this would have caused an error const schema = Schema.NonEmptyArray(Schema.String).pipe(Schema.maxItems(2))Schema: Correct
BigIntandBigIntFromNumberidentifier annotations to follow naming conventionsFix formatting of time zone offsets that round to 60 minutes
Ensure DateTimeZonedFromSelf arbitrary generates in the range supported by the time zone database
Ensure DateTime.Zoned produces valid dates
Relocate the
Issuedefinition fromplatform/HttpApiErrortoSchema(renamed asArrayFormatterIssue).Schema: Replace the
TimeZoneFromSelfinterface with a class definition and fix the arbitraries forDateTimeUtcFromSelfandDateTimeZonedFromSelf(fc.date({ noInvalidDate: true })).Improve performance of Effect.forkIn
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.