effect
4.1.4 · 11 Nov 2026MIT67.1M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
2 fixed
Security
2 advisories affect 3.13.8; 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
Schema:
standardSchemaV1now returns all errors by default and supports custom options.The
standardSchemaV1now returns all validation errors by default (ParseOptions = { errors: "all" }). Additionally, it now accepts an optionaloverrideOptionsparameter, allowing you to customize the default parsing behavior as needed.ParseResult.ArrayFormatter: Correct
_tagfields forRefinementandTransformationissues, closes #4564.This update fixes an issue where
ParseResult.ArrayFormatterincorrectly labeled Refinement and Transformation errors asTypein the output.Before
import { Effect, ParseResult, Schema } from "effect" const schema = Schema.Struct({ a: Schema.NonEmptyString, b: Schema.NumberFromString }) const input = { a: "", b: "" } const program = Schema.decodeUnknown(schema, { errors: "all" })(input).pipe( Effect.catchTag("ParseError", (err) => ParseResult.ArrayFormatter.formatError(err).pipe( Effect.map((err) => JSON.stringify(err, null, 2)) ) ) ) program.pipe(Effect.runPromise).then(console.log) /* [ { "_tag": "Type", ❌ "path": [ "a" ], "message": "Expected a non empty string, actual \"\"" }, { "_tag": "Type", ❌ "path": [ "b" ], "message": "Unable to decode \"\" into a number" } ] */After
import { Effect, ParseResult, Schema } from "effect" const schema = Schema.Struct({ a: Schema.NonEmptyString, b: Schema.NumberFromString }) const input = { a: "", b: "" } const program = Schema.decodeUnknown(schema, { errors: "all" })(input).pipe( Effect.catchTag("ParseError", (err) => ParseResult.ArrayFormatter.formatError(err).pipe( Effect.map((err) => JSON.stringify(err, null, 2)) ) ) ) program.pipe(Effect.runPromise).then(console.log) /* [ { "_tag": "Refinement", ✅ "path": [ "a" ], "message": "Expected a non empty string, actual \"\"" }, { "_tag": "Transformation", ✅ "path": [ "b" ], "message": "Unable to decode \"\" into a number" } ] */
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.