Packages

effect

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

Your version

3.21.0

20 Mar 2026Where it was published

3.22.5 is the newest release of 3.x.

In short

4 new1 fixed

Security

1 advisory affects 3.21.0; 3.22.1 fixes them

Release note

Minor Changes

  • Add Cron.prev and reverse iteration support, aligning next/prev lookup tables, fixing DST handling symmetry, and expanding cron backward/forward test coverage.

  • Add type-level utils to asserting layer types

  • RcMap: Support dynamic idleTimeToLive values per key

    The idleTimeToLive option can now be a function that receives the key and returns a duration, allowing different TTL values for different resources.

    const map =
      yield *
      RcMap.make({
        lookup: (key: string) => acquireResource(key),
        idleTimeToLive: (key: string) => {
          if (key.startsWith("premium:")) return Duration.minutes(10)
          return Duration.minutes(1)
        }
      })
  • Fix annotateCurrentSpan, add Effect.currentPropagatedSpan

Patch Changes

  • Add logs to first propagated span, in the following case before this fix the log would not be added to the p span because Effect.fn adds a fake span for the purpose of adding a stack frame.

    import { Effect } from "effect"
    
    const f = Effect.fn(function* () {
      yield* Effect.logWarning("FooBar")
      return yield* Effect.fail("Oops")
    })
    
    const p = f().pipe(Effect.withSpan("p"))

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.