v0.9.0
Major:
- Rewrites
CRuntime.load
and all CRDTs'load
functions to allow loading at any time. If there is already a non-trivial state, the loaded state is merged with that one, in the style of state-based CRDTs. load
functions now emit events describing their changes (including incremental changes during merging). This eliminates the need for special cases to refresh the display after loading.
Minor API changes:
- Add
Position
type (alias for string) to IList. - Remove
info
inCRuntime.transact
. Instead, apps should use their own CMessenger. CRuntime
events: remove Load, instead emitting Transaction. Also removeisLoaded
.- CRDT meta: replace
vectorClockGet
withvectorClock
interface; inCollab.load
, use typeCRDTSavedStateMeta
instead ofCRDTMessageMeta
. - Remove option to return
null
fromCollab.save
. Also, add option to passnull
toCollab.load
, but with a different meaning from before (tied toCollab.canGC
).
Minor behavior changes:
CSet.add
is now a pure CRDT operation, hence can be used withRunLocallyLayer
.CSet.fromID
will remember deleted values (hence return non-undefined) until the end of the current Transaction. This avoids surprises where you try to reference a just-deleted value in an event handler (e.g., see the comments inCMap
's internal event handlers).- Deduplicate messages in
CausalMessageBuffer
.
Other:
- Collab tests for most concurrent ops, merging, and events.
- Add Istanbul code coverage checker to the crdts package. Run with
npm run coverage
.
Alpha software - API subject to change.