Packages

effect

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

Your version

3.4.6

1 Jul 2024Where it was published

3.22.5 is the newest release of 3.x.

In short

1 new4 fixed

Security

2 advisories affect 3.4.6; 3.22.1 fixes them

Release note

Patch Changes

  • Micro: Align with Effect module (renamings and new combinators).

    General naming convention rule: <reference module (start with lowercase)><api (start with Uppercase)>.

    • Failure -> MicroCause

      • Failure.Expected<E> -> MicroCause.Fail<E>

      • Failure.Unexpected -> MicroCause.Die

      • Failure.Aborted -> MicroCause.Interrupt

      • FailureExpected -> causeFail

      • FailureUnexpected -> causeDie

      • FailureAborted -> causeInterrupt

      • failureIsExpected -> causeIsFail

      • failureIsExpected -> causeIsFail

      • failureIsUnexpected -> causeIsDie

      • failureIsAborted -> causeIsInterrupt

      • failureSquash -> causeSquash

      • failureWithTrace -> causeWithTrace

    • Result -> MicroExit

      • ResultAborted -> exitInterrupt

      • ResultSuccess -> exitSucceed

      • ResultFail -> exitFail

      • ResultFailUnexpected -> exitDie

      • ResultFailWith -> exitFailCause

      • resultIsSuccess -> exitIsSuccess

      • resultIsFailure -> exitIsFailure

      • resultIsAborted -> exitIsInterrupt

      • resultIsFailureExpected -> exitIsFail

      • resultIsFailureUnexpected -> exitIsDie

      • resultVoid -> exitVoid

    • DelayFn -> MicroSchedule

      • delayExponential -> scheduleExponential

      • delaySpaced -> scheduleSpaced

      • delayWithMax -> scheduleWithMaxDelay

      • delayWithMaxElapsed -> scheduleWithMaxElapsed

      • delayWithRecurs -> scheduleRecurs and make it a constructor

      • add scheduleAddDelay combinator

      • add scheduleUnion combinator

      • add scheduleIntersect combinator

    • Handle: abort -> interrupt

    • Handle: unsafeAbort -> unsafeInterrupt

    • provideServiceMicro -> provideServiceEffect

    • fromResult -> fromExit

    • fromResultSync -> fromExitSync

    • failWith -> failCause

    • failWithSync -> failCauseSync

    • asResult -> exit

    • filterOrFailWith -> filterOrFailCause

    • repeatResult -> repeatExit

    • catchFailure -> catchAllCause

    • catchFailureIf -> catchCauseIf

    • catchExpected -> catchAll

    • catchUnexpected -> catchAllDefect

    • tapFailure -> tapErrorCause

    • tapFailureIf -> tapErrorCauseIf

    • tapExpected -> tapError

    • tapUnexpected -> tapDefect

    • mapFailure -> mapErrorCause

    • matchFailureMicro -> matchCauseEffect

    • matchFailure -> matchCause

    • matchMicro -> matchEffect

    • onResult -> onExit

    • onResultIf -> onExitIf

    • onFailure -> onError

    • onAbort -> onInterrupt

    • abort -> interrupt

    • runPromiseResult -> runPromiseExit

    • runSyncResult -> runSyncExit

    • rename delay option to schedule

  • Micro: Rename timeout to timeoutOption, and add a timeout that fails with a TimeoutException

  • Support for the tacit usage of external handlers for Match.tag and Match.tagStartsWith functions

    type Value = { _tag: "A"; a: string } | { _tag: "B"; b: number };
    const handlerA = (_: { _tag: "A"; a: number }) => _.a;
    
    // $ExpectType string | number
    pipe(
      M.type<Value>(),
      M.tag("A", handlerA), // <-- no type issue
      M.orElse((_) => _.b),
    )(value);
  • Micro: Move MicroExit types to a namespace

  • Use Channel.acquireUseRelease for Channel.withSpan

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.