Packages

effect

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

Your version

3.12.10

6 Feb 2025Where it was published

3.22.5 is the newest release of 3.x.

In short

4 fixed

Security

2 advisories affect 3.12.10; 3.22.1 fixes them

Release note

Patch Changes

  • Fix STM unification

  • Duration: Fix format output when the input is zero.

    Before

    import { Duration } from "effect"
    
    console.log(Duration.format(Duration.zero))
    // Output: ""

    After

    import { Duration } from "effect"
    
    console.log(Duration.format(Duration.zero))
    // Output: "0"
  • Enhance TagClass and ReferenceClass to enforce key type narrowing, closes #4409.

    The key property in TagClass and ReferenceClass now correctly retains its specific string value, just like in Effect.Service

    import { Context, Effect } from "effect"
    
    // -------------------------------------------------------------------------------------
    // `key` field
    // -------------------------------------------------------------------------------------
    
    class A extends Effect.Service<A>()("A", { succeed: { a: "value" } }) {}
    
    // $ExpectType "A"
    A.key
    
    class B extends Context.Tag("B")<B, { a: "value" }>() {}
    
    // $ExpectType "B"
    B.key
    
    class C extends Context.Reference<C>()("C", { defaultValue: () => 0 }) {}
    
    // $ExpectType "C"
    C.key
  • Make Array.makeBy dual

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.