Packages

effect

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

Your version

3.3.0

6 Jun 2024Where it was published

3.22.5 is the newest release of 3.x.

In short

8 new

Security

2 advisories affect 3.3.0; 3.22.1 fixes them

Release note

Minor Changes

  • Add Stream.zipLatestAll api

  • Add queuing strategy option for Stream.toReadableStream

  • Add timeToLiveStrategy to Pool options

    The timeToLiveStrategy determines how items are invalidated. If set to
    "creation", then items are invalidated based on their creation time. If set
    to "usage", then items are invalidated based on pool usage.

    By default, the timeToLiveStrategy is set to "usage".

  • Add Layer.annotateLogs & Layer.annotateSpans

    This allows you to add log & span annotation to a Layer.

    import { Effect, Layer } from "effect";
    
    Layer.effectDiscard(Effect.log("hello")).pipe(
      Layer.annotateLogs({
        service: "my-service",
      }),
    );
  • Types: Implement TupleOf and TupleOfAtLeast types

    Predicate: implement isTupleOf and isTupleOfAtLeast type guards

  • Add concurrency & targetUtilization option to Pool.make & Pool.makeWithTTL

    This option allows you to specify the level of concurrent access per pool item.
    I.e. setting concurrency: 2 will allow each pool item to be in use by 2 concurrent tasks.

    targetUtilization determines when to create new pool items. It is a value
    between 0 and 1, where 1 means only create new pool items when all the existing
    items are fully utilized.

    A targetUtilization of 0.5 will create new pool items when the existing items are
    50% utilized.

  • Support this argument for {STM, Either, Option}.gen

  • Introduced Redacted<out T = string> module - Secret generalization
    Secret extends Redacted
    The use of the Redacted has been replaced by the use of the Redacted in packages with version 0.*.*

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.