Skip to content

Releases: composablesys/collabs

v0.9.1

04 Apr 16:00
Compare
Choose a tag to compare
  • Clarify which iterators are safe under concurrent modification.
    • List CRDTs (which are not safe) will attempt to throw an error if they detect it
  • Doc updates: initial values, undo/redo
  • Benchmark updates

Alpha software; API subject to change.

v0.9.0

02 Apr 13:33
Compare
Choose a tag to compare

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.

v0.8.1

23 Feb 17:01
Compare
Choose a tag to compare
  • Revise all typedocs (class/method headers) in @collabs/core and @collabs/crdts, plus the commonly-used types in other packages. These should now be fully documented.
  • Add AbstractDoc advice and an example to the Guide.
  • Add some more exports to @collabs/collabs so that its typedocs are self-contained.

Alpha software - API subject to change.

v0.8.0

20 Feb 17:23
Compare
Choose a tag to compare

Refactor of core, crdts, and collabs packages to simplify the library and (hopefully) reduce learning curve.

Major

  • Simplify naming scheme for Collabs: the main CRDTs now have names like "CVar" or "CValueSet". Alternate semantics are either options on the main CRDTs or deleted.
  • Reduce "C*" names to avoid cluttering Collabs. (Interfaces -> I, e.g., CMap -> IMap; events & events records drop the C, e.g., CSetEvent -> SetEvent.)
  • In the collabs package, only re-export the "commonly-used" exports. For advanced use cases, import other stuff from core or crdts directly.
  • Rename CObject.addChild -> CObject.registerCollab, so that it is the same as CRuntime.
  • AbstractDoc that you can extend to wrap your CRuntime and top-level Collabs. This lets you carry them around in one var, like a Y.Doc.
  • Replace "batching" with "transactions" (CRuntime.transact method, CRuntime "Transaction" event).
  • Remove context and "generic" MessageMeta, which I found confusing & not very type seafe. Instead, there is UpdateMeta; its runtimeExtra property can be extended by the Runtime, but not by other ancestors.
  • CollabIDs: instead of make/get from CollabID class, use Parent.fromID and Parent.idOf (which replace getNamePath / getDescendant). Also, they're now JSON-serializable.
  • Make IList "positions" more useful, and remove the CCursor wrapper (instead, use positions directly).

Minor

  • Remove less useful serializers.
  • Namespace some utility functions with static classes or singletons.
  • Change load/save type - instead of serializing all children immediately, parents can pass this responsibility to the Runtime (see SavedStateTreeSerializer).
  • Add CConst.
  • Redo AbstractSet, etc. in a way that appears to be working type-wise. (Basically: give up on TS mixins, just use JS mixins and type them manually.)
  • Add Collab.finalize method. This avoids needing every CSet user to expose a "ValueDelete" event.
  • Rewrite CRuntime. It is now a simplified "flat" implementation, instead of several layers with confusing interactions.
  • Rewrite CText to use a CValueList internally, instead of re-implementing it.
  • Move the benchmark text trace into a JSON file instead of JS, so Github doesn't show us as a "majority JS" project.
  • Misc cleanup (e.g., all Collabs take an options object instead of misc optional constructor params).

Alpha software - API subject to change.

v0.7.0

01 Feb 15:21
f7835aa
Compare
Choose a tag to compare
  • Removed unused/low-priority methods and types
  • Removed Pre type and helper. Instead, use callbacks directly, as shown in the docs.
  • Misc bug fixes in demos
  • Added MultiValueMap, a new base implementation for register- and map-type CRDTs. This should be more memory efficient than using a LazyMutCMap mapping to a separate register per value.

Alpha software - API subject to change.

v0.6.1

15 Jul 01:34
Compare
Choose a tag to compare

Alpha software - API subject to change.

v0.6.0

03 May 21:15
Compare
Choose a tag to compare
  • Removed CollabSerializer; use CollabIDSerializer instead.
  • Fixed load bug in AddWinsCSet, ArchivingMutC…, and LWWMutCRegister caused by CollabSerializer.
  • Added option to pass null to RunLocallyLayer.runLocally instead of an existing MessageMeta, to perform the operation as if it was initiated locally.

Alpha software - API subject to change.

v0.5.1

14 Apr 01:06
Compare
Choose a tag to compare

Text and list optimizations (#218) and CollabID/DeletingMutCMap bug fix.

Alpha software - API subject to change.

v0.5.0

14 Mar 18:46
Compare
Choose a tag to compare

Misc cleanup and reorganization (#216).

Breaking changes:

  • Remove "Resettable" concept, except for ResettableCCounter (previously CCounter; now that it is a simple non-resettable counter).
  • Add CollabID to replace Collab serialization in DefaultSerializer (which now gives an informative error). This avoids a bug where deserializing a deleted Collab (e.g. due to a concurrent delete) raises an error that can't be worked around.
  • receiveInternal -> receive
  • CRegister -> CVariable
  • Tombstone -> Archiving

Package reorganization:

  • Split @collabs/collabs into @collabs/core and @collabs/crdts. @collabs/collabs is retained as a package that re-exports both of them, so it should be backwards-compatible.

Alpha software - API subject to change.

v0.4.0

06 Feb 00:31
Compare
Choose a tag to compare
  • Optimizations, most for networking (message size) #213

Breaking API changes:

  • Instead of using Uint8Array | string as the de facto message type, there is now a type Message = Uint8Array | string | SerializableMessage. Here SerializableMessage is a new interface that represents a message that is not serialized until it needs to be (i.e., at the end of the current batch), possibly mutating in the meantime. Used by CRTMetaLayer to handle incremental requests and VC increments caused by received messages.
  • CRDTExtraMeta -> CRDTMeta, likewise for similar names.
  • CRDTMeta: You now have to specifically "request" metadata that you want sent; otherwise it might be null or inaccurate. The easiest way to do this is through the requests argument to PrimitiveCRDT.sendCRDT. For most use cases (including all of our built-in non-experimental CRDTs), requesting { automatic: true } should suffice, but it requires careful consideration.
  • CRDTMeta.senderCounter no longer changes within transactions; instead, all messages within a transaction get exactly identical (===) CRDTMeta.

The only API change that might plausibly affect someone is the new Message type, which you'll have to use if you have a custom Collab (just replace Uint8Array | string with Message and continue casting messages to the actual type you sent).

Alpha software - API subject to change.