crdt_lf_hive 0.3.0
crdt_lf_hive: ^0.3.0 copied to clipboard
Hive adapters for CRDT LF library objects, providing persistence for Change and Snapshot objects.
0.3.0 #
Date: 2026-06-11
Breaking changes
ChangeAdapterno longer accepts theuseDataAdapterparameter, which is removed. The adapter now always serializesChangeobjects viaChange.toBytes()/Change.fromBytes().SnapshotAdapteris now a thin wrapper aroundSnapshot.toBytes()/Snapshot.fromBytes(). TheuseDataAdapterconstructor parameter has been removed:Snapshot.datais always serialized viaJsonValueCodec(its values must be JSON-serializable).- Storage format changed: existing Hive boxes written with
0.xadapters are not readable by this version. A one-time migration (read with old adapter, write with new) is required before upgrading. - Removed adapters that are no longer part of the persistence pipeline (changes and snapshots are stored as opaque binary blobs):
PeerIdAdapter/kPeerIdAdapterHybridLogicalClockAdapter/kHybridLogicalClockAdapterOperationIdAdapter/kOperationIdAdapterVersionVectorAdapter/kVersionVectorAdapterFugueElementIDAdapter/kFugueElementIDAdapterFugueValueNodeAdapter/kFugueValueNodeAdapter
CRDTHive.initializesignature reduced to({int? changeTypeId, int? snapshotTypeId}). TheuseDataAdapter,peerIdTypeId,hybridLogicalClockTypeId,operationIdTypeId,versionVectorTypeId,fugueElementIdTypeId,fugueValueNodeTypeIdparameters have been removed.- Updated
crdt_lfdependency to^3.0.0.
Changed #
ChangeAdapterrewritten to use the compact binary format introduced bycrdt_lf3.0.0. Stores a raw byte list per change instead of JSON-encoded fields, reducing storage size and eliminating runtime JSON parsing.SnapshotAdapterrewritten as a single-byte-list wrapper aroundSnapshot.toBytes()/Snapshot.fromBytes(). No more recursiveBinaryWriter/BinaryReadercalls into nested types.
Removed #
OperationIdAdapter,PeerIdAdapter,HybridLogicalClockAdapter,VersionVectorAdapter,FugueElementIDAdapter,FugueValueNodeAdapterand theirk*Adaptertype-id constants. WithChangeandSnapshotserialized as binary blobs, no nested Hive adapters are involved in the pipeline.useDataAdapterflag fromSnapshotAdapterandCRDTHive.initialize. UseSnapshot.datawith JSON-serializable values instead.