Skip to content

v0.4.0

Compare
Choose a tag to compare
@mweidner037 mweidner037 released this 06 Feb 00:31
· 93 commits to master since this release
  • 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.