Effect 3.5 (Release)
Effect 3.5.0 has been released! This release includes a number of new features and improvements. Here’s a summary of what’s new:
If you add a cause
property to Data.Error
or Data.TaggedError
, it will now be properly
forwarded to the cause
property of the Error
instance.
If you Effect.log
a Cause
containing an error with a cause
property, it will now be
visible in the log output.
The @effect/sql-d1
package has been released. This package provides @effect/sql
support
for Cloudflare’s D1 database.
RcRef
and RcMap
are new reference counted types that can be used to manage resources.
The wrapped resource will be acquired on the first access and released when no longer in use.
RcRef
can be used to manage a single resource, and RcMap
can be used to manage
multiple resources referenced by a key.
Logger.pretty
is a new logger that leverages the features of the console
APIs to provide a more visually appealing output.
To try it out, provide it to your program:
In Effect 4.0, Logger.pretty
will become default logger.
The replay
option adds a replay buffer in front of the given PubSub. The buffer will
replay the last n
messages to any new subscriber.
Stream.raceAll
races the given streams, with the first stream to emit an item declared the
winner. The resulting stream will emit the items from the winning stream.
Random.make
creates a new instance of the Random service from a seed value.
It will calculate the hash of the seed value, and use that to seed the random number generator.
You can now customize the output buffer options for Stream.async*
:
You can now customize the strategy and capacity of the underlying PubSub in the following Stream apis:
Stream.toPubSub
Stream.broadcast*
Stream
&Channel
run* methods now excludeScope
from theR
type.- Use of
Stream.DynamicTuple
has been replaced withTypes.TupleOf
. - Use
left
/right
naming instead ofself
/that
inStream.mergeRight
&Stream.mergeLeft
.
There were several other smaller changes made. Take a look through the CHANGELOG to see them all: CHANGELOG.
Don’t forget to join our Discord Community to follow the last updates and discuss every tiny detail!