crdt_lf 2.2.0
crdt_lf: ^2.2.0 copied to clipboard
Conflict-free replicated data type (CRDT) - Local-first implementation provided in dart
2.2.0 #
2.1.0 #
2.0.0 #
Date: 2025-09-16
Breaking changes
- Changed
CRDTFugueTextHandleroperations payload
Added #
- Created a set of mixins to be used by handlers to optimize performance during operation insertions.
- Thrown
HandlerAlreadyRegisteredExceptionwhen a handler is registered twice - Added
TransactionManagerto manage transactional batching of notifications and local changes emission 43 - Added
compound"system" to compact consecutive operations during transaction 45 - Added
CRDTORSetHandler42
Changed #
- On
importChangeslisteners ofupdatesare notified only one times at import end Handlersnow not invalidate cache when an operation is applied due to the new mixins system. This greatly improves the computation of the handler value as it is persisted much more often.- chore: improved handlers benchmark system
Fixed #
CRDTMapHandlerupdating an absent key is ignored
1.0.0 #
Date: 2025-08-18
Breaking changes
Create a set of exception classes to be used across the library. Replace StateError with CrdtException and its subclasses.
applyChange: throwsCausallyNotReadyExceptioninstead ofStateErrorwhen a change's dependencies are not met;- On import when a cycle is detected among changes throws
ChangesCycleExceptioninstead ofStateError; - On add node when a node already exists throws
DuplicateNodeExceptioninstead ofStateError; - On add node when a dependency is missing throws
MissingDependencyExceptioninstead ofStateError; - On Fugue tree insertion when a node already exists throws
DuplicateNodeExceptioninstead ofException.
Removed redundant hlc from Change. change.hlc is also available as getter 37
Hlc in version vector is now serialized as string instead of int64. This avoids precision loss when serialized as JSON for web interoperability.
Added #
documentIdtoCRDTDocument, specified document identity to remove ambiguity between peer and document 38toStringtoSnapshotandVersionVector- added a stream to
CRDTDocumentto be notified of every change (changes, snapshots, merges, ...) - added
mutableand method toVersionVectorto create mutable copies - added a export changes method to
CRDTDocumentto export changes that are newer than a given version vector
Changed #
- chore: setup .github/workflows and update coverage links 33
- chore: update readme with recommended approach for complex handler types
- chore: update topological sort implementation 3
- chore: added benchmarks
Fixed #
- Fix
CRDTFugueTextHandlerto ensure state is synchronized before performing operations 39 - Fix readme reference links
- Fix double hlc increment on
CRDTDocument.createChange - Fix snapshot initialization for handlers that return a non primitive value
0.8.0 #
0.7.1 #
0.7.0+1 #
0.7.0 #
Date: 2025-06-14
Added #
CRDTDocument.mergeSnapshotto merge a snapshot with the current snapshotCRDTDocument.importto import changes and snapshots with a single method and different strategies
Changed #
- On changes pruning, if a change has a dependency on a pruned change, the dependency is removed to preserve integrity
0.6.1 #
0.6.0 #
0.5.1 #
0.5.0 #
0.4.0 #
0.3.0 #
Date: 2025-04-21
Added #
CRDTDocumentexposelocalChangesstream to listen to local changes 18- flutter_example contains a routing with a basic example for each use case (currently only todo list)16
- Split Fugue algorithm from text handler 4