Skip to content

v0.9.0

Compare
Choose a tag to compare
@mweidner037 mweidner037 released this 02 Apr 13:33
· 37 commits to master since this release

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 in CRuntime.transact. Instead, apps should use their own CMessenger.
  • CRuntime events: remove Load, instead emitting Transaction. Also remove isLoaded.
  • CRDT meta: replace vectorClockGet with vectorClock interface; in Collab.load, use type CRDTSavedStateMeta instead of CRDTMessageMeta.
  • Remove option to return null from Collab.save. Also, add option to pass null to Collab.load, but with a different meaning from before (tied to Collab.canGC).

Minor behavior changes:

  • CSet.add is now a pure CRDT operation, hence can be used with RunLocallyLayer.
  • 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 in CMap'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.