Packages

effect

4.1.4 · 11 Nov 2026MIT67.1M / weekRepositoryHomepagenpmAtom feed

Your version

3.12.5

17 Jan 2025Where it was published

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

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, and itemsCount to all schemas where A extends ReadonlyArray, including NonEmptyArray.

    Example

    import { Schema } from "effect"
    
    // Previously, this would have caused an error
    const schema = Schema.NonEmptyArray(Schema.String).pipe(Schema.maxItems(2))
  • Schema: Correct BigInt and BigIntFromNumber identifier annotations to follow naming conventions

  • Fix 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 Issue definition from platform/HttpApiError to Schema (renamed as ArrayFormatterIssue).

  • Schema: Replace the TimeZoneFromSelf interface with a class definition and fix the arbitraries for DateTimeUtcFromSelf and DateTimeZonedFromSelf (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.