effect
4.1.4 · 11 Nov 2026MIT67.1M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
1 new2 fixed
Security
2 advisories affect 3.14.2; 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
SchemaAST: Add missing
getSchemaIdAnnotationAPIArbitrary: Fix bug where annotations were ignored.
Before
import { Arbitrary, Schema } from "effect" const schema = Schema.Int.annotations({ arbitrary: (_, ctx) => (fc) => { console.log("context: ", ctx) return fc.integer() } }).pipe(Schema.greaterThan(0), Schema.lessThan(10)) Arbitrary.make(schema) // No output ❌After
import { Arbitrary, Schema } from "effect" const schema = Schema.Int.annotations({ arbitrary: (_, ctx) => (fc) => { console.log("context: ", ctx) return fc.integer() } }).pipe(Schema.greaterThan(0), Schema.lessThan(10)) Arbitrary.make(schema) /* context: { maxDepth: 2, constraints: { _tag: 'NumberConstraints', constraints: { min: 0, minExcluded: true, max: 10, maxExcluded: true }, isInteger: true } } */Schema:
standardSchemaV1now includes the schema, closes #4494.This update fixes an issue where passing
Schema.standardSchemaV1(...)directly toJSONSchema.makewould throw aTypeError. The schema was missing from the returned object, causing the JSON schema generation to fail.Now
standardSchemaV1includes the schema itself, so it can be used withJSONSchema.makewithout issues.Example
import { JSONSchema, Schema } from "effect" const Person = Schema.Struct({ name: Schema.optionalWith(Schema.NonEmptyString, { exact: true }) }) const standardSchema = Schema.standardSchemaV1(Person) console.log(JSONSchema.make(standardSchema)) /* { '$schema': 'http://json-schema.org/draft-07/schema#', '$defs': { NonEmptyString: { type: 'string', description: 'a non empty string', title: 'nonEmptyString', minLength: 1 } }, type: 'object', required: [], properties: { name: { '$ref': '#/$defs/NonEmptyString' } }, additionalProperties: false } */
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.