Packages

effect

4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed

Your version

2.4.17

3 Apr 2024Where it was published

2.4.19 is the newest release of 2.x.

In short

4 new4 fixed

Security

2 advisories affect 2.4.17; 3.22.1 fixes them

Release note

Patch Changes

  • Add Inspectable.toStringUnknown/stringifyCircular

  • Remove handled errors from Effect.retryOrElse

  • Improve formatting of Runtime failures

  • Add Iterable module

    This module shares many apis compared to "effect/ReadonlyArray", but is fully lazy.

    import { Iterable, pipe } from "effect";
    
    // Only 5 items will be generated & transformed
    pipe(
      Iterable.range(1, 100),
      Iterable.map((i) => `item ${i}`),
      Iterable.take(5),
    );
  • Support Heterogeneous Effects in Effect Iterable apis

    Including:

    • Effect.allSuccesses

    • Effect.firstSuccessOf

    • Effect.mergeAll

    • Effect.reduceEffect

    • Effect.raceAll

    • Effect.forkAll

    For example:

    import { Effect } from "effect";
    
    class Foo extends Effect.Tag("Foo")<Foo, 3>() {}
    class Bar extends Effect.Tag("Bar")<Bar, 4>() {}
    
    // const program: Effect.Effect<(1 | 2 | 3 | 4)[], never, Foo | Bar>
    export const program = Effect.allSuccesses([
      Effect.succeed(1 as const),
      Effect.succeed(2 as const),
      Foo,
      Bar,
    ]);

    The above is now possible while before it was expecting all Effects to conform to the same type

  • Add Effect.filterMap api

    Which allows you to filter and map an Iterable of Effects in one step.

    import { Effect, Option } from "effect";
    
    // resolves with `["even: 2"]
    Effect.filterMap(
      [Effect.succeed(1), Effect.succeed(2), Effect.succeed(3)],
      (i) => (i % 2 === 0 ? Option.some(`even: ${i}`) : Option.none()),
    );
  • Use Inspectable.toStringUnknown for absurd runtime errors

  • Use const type parameter for Config.withDefault

    Which ensures that the fallback value type is not widened for literals.

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.