effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
3.22.5 is the newest release of 3.x.
In short
1 breaking1 faster6 fixed
- Breaking
Serialize
Cause.Failundererrorinstead offailure, matching itserrorproperty.
Release note
Patch Changes
Serialize
Cause.Failundererrorinstead offailure, matching itserrorproperty.This changes the output of
toJSON,JSON.stringifyand Node inspection for causes, including nestedSequential/Parallelcauses andExit.Failure, as well as log messages that contain aCauseorExitvalue. Thecausefield of built-in loggers is rendered withCause.prettyand is unaffected. Code that readsfailurefrom serialized causes should readerrorinstead.Allow interrupting
Effect.cachedWithTTLandEffect.cachedInvalidateWithTTLwhile the cached effect is running. Interrupting the caller now interrupts that run and leaves nothing cached, so the next call runs the effect again.Fix
Duration.decodeandDuration.timesthrowing on fractional values.Duration.decodethrew on fractionalnanosandmicrosinputs such as"1.5 micros", andDuration.timesthrew when a nanosecond-backedDurationwas multiplied by a non-integer. Both now round to whole nanoseconds, soDuration.decode("1.5 micros")is 1500 nanos andDuration.times(Duration.nanos(2n), 2.5)is 5 nanos.Support
Effect.fnbodies whose generators were transpiled into functions that return an iterator, such asbabel-preset-expooutput.Avoid throwing when
Error.stackTraceLimitis non-writable (frozen intrinsics / SES / deterministic sandboxes such as Temporal).Logger.jsonLoggernow includesnameandmessagewhen logging anError, instead of{}.Remove the
AbortSignallistener added byEffect.runPromise/Runtime.runPromiseExitonce the fiber completes, fixingMaxListenersExceededWarningwhen a signal is reused across runs (e.g.it.effect.prop).Return
selffromBigDecimal.normalizefor already-normalized values
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.