Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.2.5
->3.5.6
Release Notes
Effect-TS/effect (effect)
v3.5.6
Compare Source
Patch Changes
#3294
cc327a1
Thanks @tim-smart! - correctly exclude symbols from Record.keys#3289
4bfe4fb
Thanks @dilame! - ChangedStream.groupByKey
/Stream.grouped
/Stream.groupedWithin
JSDoc category fromutils
togrouping
#3295
2b14d18
Thanks @tim-smart! - fix YieldableError rendering on bunv3.5.5
Compare Source
Patch Changes
a9d7800
Thanks @tim-smart! - use "unbounded" buffer for Stream.fromEventListenerv3.5.4
Compare Source
Patch Changes
#3253
ed0dde4
Thanks @tim-smart! - update dependencies#3247
ca775ce
Thanks @tim-smart! - if performance.timeOrigin is 0, use performance.now() directly in ClockThis is a workaround for cloudflare, where performance.now() cannot be used in
the global scope to calculate the origin.
#3259
5be9cc0
Thanks @IMax153! - exposeChannel.isChannel
#3250
203658f
Thanks @gcanti! - add support forRefinement
s toPredicate.or
, closes #3243#3246
eb1c4d4
Thanks @tim-smart! - render nested causes in Cause.prettyv3.5.3
Compare Source
Patch Changes
#3234
edb0da3
Thanks @tim-smart! - do not add a error "cause" if the upstream error does not contain one#3236
c8d3fb0
Thanks @tim-smart! - set Logger.pretty message color to deepskyblue on browsers#3240
dabd028
Thanks @tim-smart! - fix process .isTTY detection#3230
786b2ab
Thanks @KhraksMamtsov! - support heterogenous argument inOption.firstSomeOf
#3238
fc57354
Thanks @leonitousconforti! - Align Stream.run public function signaturesv3.5.2
Compare Source
Patch Changes
#3228
639208e
Thanks @IMax153! - Render a more helpful error message when timing out an effect#3235
6684b4c
Thanks @tim-smart! - improve safari support for Logger.pretty#3235
6684b4c
Thanks @tim-smart! - fix span stack rendering when stack function returns undefined#3235
6684b4c
Thanks @tim-smart! - align UnsafeConsole group types with web apisv3.5.1
Compare Source
Patch Changes
55fdd76
Thanks @tim-smart! - fix Logger.pretty on bunv3.5.0
Compare Source
Minor Changes
#3048
a1f5b83
Thanks @tim-smart! - add renderErrorCause option to Cause.pretty#3048
60bc3d0
Thanks @tim-smart! - add RcRef moduleAn
RcRef
wraps a reference counted resource that can be acquired and released multiple times.The resource is lazily acquired on the first call to
get
and released when the last reference is released.#3048
5ab348f
Thanks @tim-smart! - allowing customizing Stream pubsub strategy#3048
60bc3d0
Thanks @tim-smart! - add Duration.isZero, for checking if a Duration is zero#3048
3e04bf8
Thanks @sukovanej! - AddSuccess
type util forConfig
.#3048
e7fc45f
Thanks @tim-smart! - add Logger.prettyLogger and Logger.prettyLogger.pretty
is a new logger that leverages the features of theconsole
APIs to provide a more visually appealing output.To try it out, provide it to your program:
#3048
a1f5b83
Thanks @tim-smart! - add .groupCollapsed to UnsafeConsole#3048
4626de5
Thanks @giacomoran! - export Random.make taking hashable values as seed#3048
f01e7db
Thanks @tim-smart! - addreplay
option to PubSub constructorsThis option adds a replay buffer in front of the given PubSub. The buffer will
replay the last
n
messages to any new subscriber.#3048
60bc3d0
Thanks @tim-smart! - add RcMap moduleAn
RcMap
can contain multiple reference counted resources that can be indexedby a key. The resources are lazily acquired on the first call to
get
andreleased when the last reference is released.
Complex keys can extend
Equal
andHash
to allow lookups by value.#3048
ac71f37
Thanks @dilame! - EnsureScope
is excluded fromR
in theChannel
/Stream
run*
functions.This fix ensures that
Scope
is now properly excluded from the resulting effect environment.The affected functions include
run
,runCollect
,runCount
,runDrain
and other non-scopedrun*
in bothStream
andChannel
modules.This fix brings the type declaration in line with the runtime implementation.
#3048
8432360
Thanks @dilame! - refactor(Stream/mergeLeft): renameself
/that
argument names toleft
/right
for clarityrefactor(Stream/mergeRight): rename
self
/that
argument names toleft
/right
for clarity#3048
e4bf1bf
Thanks @dilame! - feat(Stream): implement "raceAll" operator, which returns a stream that mirrors the first source stream to emit an item.#3048
13cb861
Thanks @dilame! - refactor(Stream): use new built-inTypes.TupleOf
instead ofStream.DynamicTuple
and deprecate it#3048
79d2d91
Thanks @tim-smart! - support ErrorOptions in YieldableError constructor#3048
9f66825
Thanks @tim-smart! - allow customizing the output buffer for the Stream.async* apisPatch Changes
#3048
a1f5b83
Thanks @tim-smart! - include Error.cause stack in log output#3048
a1f5b83
Thanks @tim-smart! - set stackTraceLimit to 1 in PrettyError to address performance issues#3048
79d2d91
Thanks @tim-smart! - ensure "cause" is rendered in Data.Error output#3048
e7fc45f
Thanks @tim-smart! - fix types of UnsafeConsole.groupv3.4.9
Compare Source
Patch Changes
#3210
7af137c
Thanks @tim-smart! - prevent reclaim of manually invalidated pool items#3204
ee4b3dc
Thanks @gcanti! - Updated the JSDocs for theStream
module by adding examples to key functions.#3202
097d25c
Thanks @tim-smart! - allow invalidated Pool items to be reclaimed with usage strategyv3.4.8
Compare Source
Patch Changes
#3181
a435e0f
Thanks @KhraksMamtsov! - refactorTrimEnd
&TrimStart
#3176
b5554db
Thanks @tim-smart! - allow Stream run fiber to close before trying to interrupt it#3175
a9c4fb3
Thanks @tim-smart! - ensure fibers are interrupted in Stream.mergeWithv3.4.7
Compare Source
Patch Changes
a5737d6
Thanks @tim-smart! - ensure PubSub.publishAll does not increase size while there are no subscribersv3.4.6
Compare Source
Patch Changes
#3096
5c0ceb0
Thanks @gcanti! - Micro: align withEffect
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 constructorscheduleAddDelay
combinatorscheduleUnion
combinatorscheduleIntersect
combinatorHandle
abort
->interrupt
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
delay
option toschedule
#3096
5c0ceb0
Thanks @gcanti! - Micro: renametimeout
totimeoutOption
, and add atimeout
that fails with aTimeoutException
#3121
33735b1
Thanks @KhraksMamtsov! - Support for the tacit usage of external handlers forMatch.tag
andMatch.tagStartsWith
functions#3096
5c0ceb0
Thanks @gcanti! - Micro: move MicroExit types to a namespace#3134
139d4b3
Thanks @tim-smart! - use Channel.acquireUseRelease for Channel.withSpanv3.4.5
Compare Source
Patch Changes
a047af9
Thanks @tim-smart! - fix using unions with Match.withReturnTypev3.4.4
Compare Source
Patch Changes
#3083
72638e3
Thanks @gcanti! - Micro: addNoSuchElementException
error and updatefromOption
to change the failure type fromOption.None<never>
toNoSuchElementException
#3095
d7dde2b
Thanks @tim-smart! - remove global AbortController from Micro#3085
9b2fc3b
Thanks @gcanti! - Micro: addzipWith
v3.4.3
Compare Source
Patch Changes
#3065
c342739
Thanks @KhraksMamtsov! - Supportthis
argument forMicro.gen
#3067
8898e5e
Thanks @KhraksMamtsov! - Cleanup signal "abort" event handler inMicro.runFork
#3082
ff78636
Thanks @gcanti! - Align theMicro.catchIf
signature withEffect.catchIf
#3078
c86bd4e
Thanks @KhraksMamtsov! - Support unification for Micro module#3079
bbdd365
Thanks @tim-smart! - update to typescript 5.5v3.4.2
Compare Source
Patch Changes
3da1497
Thanks @KhraksMamtsov! - Reuse centralized do-notation codev3.4.1
Compare Source
Patch Changes
66a1910
Thanks @gcanti! - add missingTypeLambda
toMicro
modulev3.4.0
Compare Source
Minor Changes
#2938
c0ce180
Thanks @LaureRC! - Make Option.liftPredicate dual#2938
61707b6
Thanks @LaureRC! - Add Effect.liftPredicateEffect.liftPredicate
transforms aPredicate
function into anEffect
returning the input value if the predicate returnstrue
or failing with specified error if the predicate fails.#2938
9c1b5b3
Thanks @tim-smart! - add EventListener type to Stream to avoid use of dom lib#2938
a35faf8
Thanks @gcanti! - AddlastNonEmpty
function toChunk
module, closes #2946#2938
ff73c0c
Thanks @dilame! - feat(Stream): implement Success, Error, Context type accessors#2938
984d516
Thanks @tim-smart! - add Micro moduleA lightweight alternative to Effect, for when bundle size really matters.
At a minimum, Micro adds 5kb gzipped to your bundle, and scales with the amount
of features you use.
#2938
8c3b8a2
Thanks @gcanti! - addManagedRuntime
type utils (Context
, andError
)#2938
017e2f9
Thanks @LaureRC! - Add Either.liftPredicate#2938
91bf8a2
Thanks @msensys! - AddTuple.at
api, to retrieve an element at a specified index from a tuple.#2938
c6a4a26
Thanks @datner! - addensure
util for Array, used to normalizeA | ReadonlyArray<A>
v3.3.5
Compare Source
Patch Changes
6c89408
Thanks @tim-smart! - ensure Config.Wrap only destructures plain objectsv3.3.4
Compare Source
Patch Changes
a67b8fe
Thanks @tim-smart! - use Math.random for Hash.randomv3.3.3
Compare Source
Patch Changes
#2999
06ede85
Thanks @KhraksMamtsov! - Added tests forChunk.toArray
andChunk.toReadonlyArray
with use cases in thepipe
#3000
7204ca5
Thanks @tim-smart! - fix support for Predicates in Predicate.composev3.3.2
Compare Source
Patch Changes
#2981
3572646
Thanks @tim-smart! - ensure multiline error messages are preserved in cause rendering#2970
1aed347
Thanks @gcanti! - UpdatedChunk.toArray
andChunk.toReadonlyArray
. Improved function signatures to preserve non-empty status of chunks during conversion.#2977
df4bf4b
Thanks @tim-smart! - fix discard option in Effect.all#2917
f085f92
Thanks @mikearnaldi! - Fix Unify for Streamv3.3.1
Compare Source
Patch Changes
#2952
eb98c5b
Thanks @KhraksMamtsov! - ChangeConfig.array
to returnArray<A>
instead ofReadonlyArray<A>
#2950
184fed8
Thanks @gcanti! - EnsureChunk.reverse
preservesNonEmpty
status, closes #2947#2954
6068e07
Thanks @jessekelly881! - Fix runtime error inStruct.evolve
by enhancing compile-time checks, closes #2953#2948
3a77e20
Thanks @gcanti! - Remove unnecessary===
comparison ingetEquivalence
functionsIn some
getEquivalence
functions that usemake
, there is an unnecessary===
comparison. Themake
function already handles this comparison.v3.3.0
Compare Source
Minor Changes
#2837
1f4ac00
Thanks @dilame! - addStream.zipLatestAll
api#2837
9305b76
Thanks @mattrossman! - Add queuing strategy option for Stream.toReadableStream#2837
0f40d98
Thanks @tim-smart! - addtimeToLiveStrategy
toPool
optionsThe
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".#2837
b761ef0
Thanks @tim-smart! - add Layer.annotateLogs & Layer.annotateSpansThis allows you to add log & span annotation to a Layer.
#2837
b53f69b
Thanks @dilame! - Types: implementTupleOf
andTupleOfAtLeast
typesPredicate: implement
isTupleOf
andisTupleOfAtLeast
type guards#2837
0f40d98
Thanks @tim-smart! - addconcurrency
&targetUtilization
option toPool.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 valuebetween 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 are50% utilized.
#2837
5bd549e
Thanks @KhraksMamtsov! - Supportthis
argument for{STM, Either, Option}.gen
#2837
67f160a
Thanks @KhraksMamtsov! - IntroducedRedacted<out T = string>
module -Secret
generalizationSecret extends Redacted
The use of the
Redacted
has been replaced by the use of theRedacted
in packages with version0.*.*
v3.2.9
Compare Source
Patch Changes
#2921
8c5d280
Thanks @tim-smart! - remove usage of performance.timeOrigin#2912
6ba6d26
Thanks @mikearnaldi! - Remove toJSON from PrettyError and fix message generation#2923
3f28bf2
Thanks @tim-smart! - only wrap objects with string keys in Config.Wrap#2914
5817820
Thanks @mikearnaldi! - Fix id extraction in Context.Tag.Identifierv3.2.8
Compare Source
Patch Changes
fb91f17
Thanks @mikearnaldi! - ensure Equal considers Date by valuev3.2.7
Compare Source
Patch Changes
6801fca
Thanks @mikearnaldi! - Ensure provide of runtime is additive on contextv3.2.6
Compare Source
Patch Changes
cc8ac50
Thanks @TylorS! - Support tuples in Types.DeepMutablev3.2.5
Compare Source
Patch Changes
#2823
608b01f
Thanks @gcanti! - Array: simplify signatures (ReadonlyArray<any> | Iterable<any> = Iterable<any>
)#2834
031c712
Thanks @tim-smart! - attach Stream.toReadableStream fibers to scope#2744
a44e532
Thanks @KhraksMamtsov! - makeArray.separate
,Array.getRights
,Array.getLefts
,Array.getSomes
heterogeneousv3.2.4
Compare Source
Patch Changes
#2801
1af94df
Thanks @tim-smart! - ensure pool calls finalizer for failed acquisitions#2808
e313a01
Thanks @gcanti! - Array: fixflatMapNullable
implementation and add descriptions / examplesv3.2.3
Compare Source
Patch Changes
45578e8
Thanks @tim-smart! - fix internal cutpoint name preservationv3.2.2
Compare Source
Patch Changes
#2787
5d9266e
Thanks @mikearnaldi! - Prohibit name clashes in Effect.TagThe following now correctly flags a type error given that the property
context
exists already inTag
:#2797
9f8122e
Thanks @mikearnaldi! - Improve internalization of functions to clean stack traces#2798
6a6f670
Thanks @mikearnaldi! - Avoid eager read of the stack when captured by a spanv3.2.1
Compare Source
Patch Changes
c1e991d
Thanks @tim-smart! - fix Config.Wrap for optional propertiesv3.2.0
Compare Source
Minor Changes
#2778
146cadd
Thanks @tim-smart! - Add Stream.toReadableStreamEffect / .toReadableStreamRuntime#2778
7135748
Thanks @tim-smart! - add Cause.prettyErrors apiYou can use this to extract
Error
instances from aCause
, that have clean stack traces and have had span information added to them.#2778
963b4e7
Thanks @tim-smart! - add Chunk.difference & Chunk.differenceWith#2778
64c9414
Thanks @tim-smart! - Improve causal rendering in vitest by rethrowing pretty errors#2778
7135748
Thanks @tim-smart! - add Effect.functionWithSpanAllows you to define an effectful function that is wrapped with a span.
#2778
2cbb76b
Thanks @tim-smart! - Add do notation for Array#2778
870c5fa
Thanks @tim-smart! - support $is & $match for Data.TaggedEnum with generics#2778
7135748
Thanks @tim-smart! - capture stack trace for tracing spansPatch Changes
#2778
7135748
Thanks @tim-smart! - add span stack trace to rendered causes#2778
64c9414
Thanks @tim-smart! - Consider Generator.next a cutpointv3.1.6
Compare Source
Patch Changes
#2761
17fc22e
Thanks @KhraksMamtsov! - Add{ once: true }
to all"abort"
event listeners forAbortController
to automatically remove handlers after execution#2762
810f222
Thanks @tim-smart! - fix Config.Wrap incorrectly wrapping functions & arrays#2773
596aaea
Thanks @tim-smart! - fix for Infinity delays in Schedulev3.1.5
Compare Source
Patch Changes
6ac4847
Thanks @tim-smart! - ensure exponential schedules don't reach Infinityv3.1.4
Compare Source
Patch Changes
e41e911
Thanks @mikearnaldi! - Call Equal.equals internally in order inputs were passed.v3.1.3
Compare Source
Patch Changes
1f6dc96
Thanks @sukovanej! - rebuild packagesv3.1.2
Compare Source
Patch Changes
2e1cdf6
Thanks @tim-smart! - ensure all type ids are annotated withunique symbol
v3.1.1
Compare Source
Patch Changes
e5e56d1
Thanks @tim-smart! - Allow structural regions in equality for testingv3.1.0
Compare Source
Minor Changes
#2543
c3c12c6
Thanks @github-actions! - add SortedMap.lastOption & partition apis#2543
ba64ea6
Thanks @github-actions! - addTypes.DeepMutable
, an alternative toTypes.Mutable
that makes all properties recursively mutable#2543
b5de2d2
Thanks @github-actions! - add Effect.annotateLogsScopedThis api allows you to annotate logs until the Scope has been closed.
#2543
a1c7ab8
Thanks @github-actions! - added Stream.fromEventListener, and BrowserStream.{fromEventListenerWindow, fromEventListenerDocument} for constructing a stream from addEventListener#2543
a023f28
Thanks @github-actions! - addkind
property toTracer.Span
This can be used to specify what kind of service created the span.
#2543
1c9454d
Thanks @github-actions! - add Effect.timeoutOptionReturns an effect that will return
None
if the effect times out, otherwConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.