Releases: brawaru/async-computed
v5.0.2
v5.0.1
v4.0.1
v4.0.0
4.0.0 (2022-12-24)
- refactor!: improved names and minification (b10676b)
BREAKING CHANGES
-
this change removes and renames some of the public APIs
therefore not compatible with the previous version. Functionality,
however, has not been affected and stays the same, so updating process
comes down to just using new names. The following changes were made: -
State
enum has been removed,Status
type is added which describes
all allowed statuses, which are now regular strings. -
"resolved"
status has been renamed to"fulfilled"
to match
Promises specification, which describes resolved promises as the ones
in which resolve function has been called, but they're not necessarily
fulfilled because resolution they may provide could be another Promise
that has not been resolved to any value. Fulfilled means that Promise
has finished chained execution and resolved to an actual value, which
is precisely when we update the object. -
ResolvedStateObject
has been renamed toFulfilledState
. -
StateObjectBase
has been renamed toStateBase
. The rationale to
remove 'Object' from names of all state objects was that they're known
to be objects, so having it a name doesn't provide any meaningful
information. -
In
StateBase
and all of its extendsstate
property has been
renamed tostatus
, and it is now one of the strings from a union
typeStatus
. -
In
StateBase
and all its extendsisPending
,isResolved
and
isRejected
getters were renamed topending
,fulfilled
,
rejected
. It makes usage of those objects in templates and
conditions look a bit cleaner and makes a bit more sense given that
isSomething
are usually functions that used to describe assertions. -
StateObject
type has been renamed toState
.
v3.1.0
v3.0.2
v3.0.1
v3.0.0
3.0.0 (2022-12-12)
Bug Fixes
Features
- use
this
to provide abort signal (acbf61d)
BREAKING CHANGES
- the abort signal is now provided through
this
Previously abort signal was provided through arguments and while it
worked for the most part, it made typings more complicated and required
you to use both arguments in getter method definition, even if didn't
want to use the signal. With this change, the signal is now provided
through object that is bound to this
on getter calls.
To migrate, simply replace all usages of signal
to this.signal
, as
well as remove all usages of AsyncComputedOptionsGetterOnly type: it is
removed and merged together into AsyncComputedOptions. If you don't use
watch
method or it does not return anything, you can ignore the
source
argument passed to the getter method.
v2.0.0
2.0.0 (2022-12-11)
Bug Fixes
- use 'rejected' for State.Rejected (38faad0)
BREAKING CHANGES
- State enum value for Rejected changed to 'rejected'
Previously it used 'error', which is a leftover from the previous
iterations of the code. It now uses 'rejected' to match the name of the
enum property and promise terms.