Packages

effect

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

Your version

3.17.0

21 Jul 2025Where it was published

3.22.5 is the newest release of 3.x.

In short

8 new

Security

2 advisories affect 3.17.0; 3.22.1 fixes them

Release note

Minor Changes

  • Added Random.fixed to create a version of the Random service with fixed
    values for testing.

  • Add Struct.entries function

  • Add Layer.mock

    Creates a mock layer for testing purposes. You can provide a partial
    implementation of the service, and any methods not provided will
    throw an UnimplementedError defect when called.

    import { Context, Effect, Layer } from "effect"
    
    class MyService extends Context.Tag("MyService")<
      MyService,
      {
        one: Effect.Effect<number>
        two(): Effect.Effect<number>
      }
    >() {}
    
    const MyServiceTest = Layer.mock(MyService, {
      two: () => Effect.succeed(2)
    })
  • Schedule output has been added into CurrentIterationMetadata

  • Remove global state index by version, make version mismatch a warning message

  • Array: Add findFirstWithIndex function

  • Add HashMap.countBy

    import { HashMap } from "effect"
    
    const map = HashMap.make([1, "a"], [2, "b"], [3, "c"])
    const result = HashMap.countBy(map, (_v, key) => key % 2 === 1)
    console.log(result) // 2
  • Add Effect.ensure{Success,Error,Requirements}Type, for constraining Effect types

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.