Packages

effect

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

Your version

2.4.3

11 Mar 2024Where it was published

2.4.19 is the newest release of 2.x.

In short

2 new

Security

2 advisories affect 2.4.3; 3.22.1 fixes them

Release note

Patch Changes

  • Add ManagedRuntime module, to make incremental adoption easier

    You can use a ManagedRuntime to run Effect's that can use the
    dependencies from the given Layer. For example:

    import { Console, Effect, Layer, ManagedRuntime } from "effect";
    
    class Notifications extends Effect.Tag("Notifications")<
      Notifications,
      { readonly notify: (message: string) => Effect.Effect<void> }
    >() {
      static Live = Layer.succeed(this, {
        notify: (message) => Console.log(message),
      });
    }
    
    async function main() {
      const runtime = ManagedRuntime.make(Notifications.Live);
      await runtime.runPromise(Notifications.notify("Hello, world!"));
      await runtime.dispose();
    }
    
    main();
  • Add Layer.toRuntimeWithMemoMap api

    Similar to Layer.toRuntime, but allows you to share a Layer.MemoMap between
    layer builds.

    By sharing the MemoMap, layers are shared between each build - ensuring layers
    are only built once between multiple calls to Layer.toRuntimeWithMemoMap.

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.