chore(deps): update dependency loro-crdt to v1 #727
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more here.
This PR contains the following updates:
^0.4.1->^1.0.0Release Notes
loro-dev/loro (loro-crdt)
v1.7.3Compare Source
Patch Changes
4ccf048: fix: propagate errors instead of unwrap #808v1.7.2Compare Source
Patch Changes
20d8309: fix: a get_dpeth issue that may be triggered when importing snapshot #805v1.7.1Compare Source
Patch Changes
6d308d1: fix: use null when export json update with undefined value1aad1d5: Add toJSON to LoroCounterv1.7.0Compare Source
Minor Changes
3a0db5b: feat: add APIs to fetch values associated with the top Undo and Redo stack entries (#790)undo.topUndoValue()andundo.topRedoValue()return thevaluefrom the top undo/redo item (orundefinedwhen empty).UndoManager::{top_undo_meta, top_redo_meta, top_undo_value, top_redo_value}to inspect top-of-stack metadata and values.This enables attaching human-readable labels via
onPush/onPopand retrieving them to keep Undo/Redo menu items up to date.9a98e8d: Distinguish explicit vs implicit empty commit behavior for commit options.commit()/commit_with(...)): if the transaction is empty, commit options (message/timestamp/origin) are swallowed and will NOT carry over.export,checkoutinternal barriers): if the transaction is empty, message/timestamp/origin are preserved for the next transaction.Rationale: align behavior with intent. Explicit commits “finalize now”, so empty commits should not leak options. Implicit commits act as processing barriers and should not destroy user-provided options for the next real change.
Note: This refines behavior without changing the API.
Patch Changes
0fe9681: fix: handle default values for fractionalIndex and index in LoroTreeNodev1.6.0Compare Source
Minor Changes
8c898ee: Perf: faster snapshot import speedv1.5.13Compare Source
Patch Changes
578bfe3: fix(undo): should not transform cursors w/o id #785v1.5.12Compare Source
Patch Changes
ec95b50: Fix local event errorv1.5.11Compare Source
Patch Changes
34180e7: Fix(js): delete an entry in map should emit an event that set the field as undefined instead of null0bb9786: Fix: avoid panic when importing data to ephemeral storev1.5.10Compare Source
Patch Changes
f8bef58: Fix local event error (#763)v1.5.9Compare Source
Patch Changes
c2e6d49: fix(wasm): serialize op with bigint support @synoetv1.5.8Compare Source
Patch Changes
19c064a: fix: snapshot origin of eventv1.5.7Compare Source
Patch Changes
70a3bf3: Feat: supportgroup_startandgroup_endfor UndoManager #72024a7f53: fix: panic when calling get_deep_value with an empty tree #740v1.5.6Compare Source
Patch Changes
60876bb: Feat: redactv1.5.5Compare Source
Patch Changes
0bfbb3b: fix: update EphemeralStore to support generic types (#718)v1.5.4Compare Source
Patch Changes
37c2a17: fix: checkout should renew txn if not detachedv1.5.3Compare Source
Patch Changes
ed4fe83: fix: from_snapshot with shallow snapshot err #712v1.5.2Compare Source
Patch Changes
81c7bb7: fix ephemeral store recursive use by adding mutex in the innerbf94a03: feat: add functionality to delete and hide empty root containers #708v1.5.1Compare Source
Patch Changes
742cf7d: Fix memory leak caused by wasm-bindgenv1.5.0Compare Source
Minor Changes
8dfcad4: # New Hooks:pre-commitandfirst-commit-from-peerdoc.subscribePreCommit(listener)Advanced Example: Creating a Merkle DAG
doc.subscribeFirstCommitFromPeer(listener)a997885: #EphemeralStore: An Alternative to AwarenessAwareness is commonly used as a state-based CRDT for handling ephemeral states in real-time collaboration scenarios, such as cursor positions and application component highlights. As application complexity grows, Awareness may be set in multiple places, from cursor positions to user presence. However, the current version of Awareness doesn't support partial state updates, which means even minor mouse movements require synchronizing the entire Awareness state.
Since Awareness is primarily used in real-time collaboration scenarios where consistency requirements are relatively low, we can make it more flexible. We've introduced
EphemeralStoreas an alternative toAwareness. Think of it as a simple key-value store that uses timestamp-based last-write-wins for conflict resolution. You can choose the appropriate granularity for your key-value pairs based on your application's needs, and only modified key-value pairs are synchronized.Examples
Patch Changes
742842f: fix: apply multiple styles via text delta at the end "\n" char #6924cb7ae3: feat: get ops from current txn as json #676v1.4.6Compare Source
Patch Changes
0b0ac7c: fix: entity index when the tree is emptyv1.4.5Compare Source
Patch Changes
aab07c6: feat: set default config for text style #6696cf06e5: fix: detached loro text issues #665v1.4.4Compare Source
Patch Changes
28d1264: feat(wasm): enhance toJsonWithReplacer to handle nested containers in replacer returned value28d1264: fix(wasm): add toJSON to LoroTextNow all containers have toJSON method.
v1.4.3Compare Source
Patch Changes
2a82396: feat: add new ways to control commit options (#656)2a82396: fix: mark err on detached LoroText (#659)v1.4.2Compare Source
Patch Changes
e0948d8: feat: add container existence check methods & avoid panic in wasm/js #6519955500: fix: an internal iter_change err that may cause fork_at panic #649v1.4.1Compare Source
Patch Changes
9090c4d: fix: memory leak issuev1.4.0Compare Source
Minor Changes
2f3364a: refactor!: use better data type for doc.diff #646Patch Changes
72699ae: fix: getting values by path in LoroTree (#643)v1.3.5Compare Source
Patch Changes
c2a61f3: fix: improve shallow snapshot and JSON export handling #639v1.3.4Compare Source
Patch Changes
b58e6bd: fix: should be able to call subscription after diffing #637v1.3.3Compare Source
Patch Changes
8fdb25e: fix: move tree node within the self parent with 16 siblings #635v1.3.2Compare Source
Patch Changes
a168063: refactor: hold doc reference in handler (#624)a168063: fix: a few LoroCounter errors (#626)v1.3.1Compare Source
Patch Changes
07500da: fix: map.keys() may return keys from deleted entries #618v1.3.0Compare Source
Minor Changes
ddafb7e: feat: diff, applyDiff, and revertTo #610Add new version-control-related primitives:
diff(from, to): calculate the difference between two versions. The returned results have similar structures to the differences in events.revertTo(targetVersion): revert the document back to the target version. The difference between this andcheckout(targetVersion)is this method will generate a series of new operations, which will transform the current doc into the same as the target version.applyDiff(diff): you can use it to apply the differences generated fromdiff(from, to).You can use these primitives to implement version-control functions like
squashandrevert.Examples
ac51ceb: feat: add exportJsonInIdSpan and make peer compression optional8039e44: feat: find id spans between #607Patch Changes
9c1005d: fix: should not merge remote changes due to small intervalv1.2.7Compare Source
Patch Changes
da24910: fix: should commit before travel_change_ancestors #599v1.2.6Compare Source
Patch Changes
d552955: Make getByPath work for "tree/0/key"df81aec: Better event orderingv1.2.5Compare Source
Patch Changes
9faa149: Fix detach error #592v1.2.4Compare Source
Patch Changes
5aa7985: Fixed LoroTree's incorrect index when moving a node within its current parentv1.2.3Compare Source
Patch Changes
42949c0: Fix VersionVector ownership issue in WASM binding1ca1275: feat: UndoManager's onPush now can access the change eventv1.2.2Compare Source
Patch Changes
3b7a738: Add getShallowValue and toJsonWIthReplacerv1.2.1Compare Source
Patch Changes
adb6ab8: fix: panic when returned non-boolean value from text.iter(f) #578v1.2.0Compare Source
Minor Changes
01fccc5: Return ImportStatus in the import_batch methodPatch Changes
d08a865: fix: getOrCreateContainer should not throw if value is null #576v1.1.4Compare Source
Patch Changes
0325061: Fix a deadloop case when importing updates (#570)v1.1.3Compare Source
Patch Changes
d6966ac: The fractional index in LoroTree is now enabled by default with jitter=0.To reduce the cost of LoroTree, if the
indexproperty in LoroTree is unused, users can stillcall
tree.disableFractionalIndex(). However, in the new version, after disabling the fractionalindex,
tree.moveTo(),tree.moveBefore(),tree.moveAfter(), andtree.createAt()willthrow an error
v1.1.2Compare Source
Patch Changes
70c4942: Add base64 build target35e7ea5: Add changeCount and opCount methodsv1.1.1Compare Source
Patch Changes
9abeb81: Add methods to modify VVee26952: Add isDeleted() method to each containerv1.1.0Compare Source
Minor Changes
6e878d2: Feat add API to query creators, the last editors/movers778ca54: Feat: allow users to query the changed containers in the target id rangePatch Changes
6616101: Perf: optimize importBatchWhen using importBatch to import a series of snapshots and updates, we should import the snapshot with the greatest version first.
6e878d2: Feat: getLastEditor on LoroMap8486234: Fix get encoded blob metav1.0.9Compare Source
Patch Changes
7bf6db7: Addpushto LoroText andpushContainerto LoroList LoroMovableList9b60d01: Define the behavior ofdoc.fork()when the doc is detachedIt will fork at the current state_frontiers, which is equivalent to calling
doc.fork_at(&doc.state_frontiers())v1.0.8Compare Source
Patch Changes
62a3a93: Merge two js packagesv1.0.7: v1.0Compare Source
We are very excited to announce the release of Loro v1.0, a major milestone.
It has a stable encoding format, faster document import and export speed, better version control capabilities, and a shallow snapshot. For more information, please check the blog.
The following are the specific API changes:
New
LoroDoc
getChange(id: ID): getChangeMetabyID.setDetachedEditing(flag: boolean): Enables editing in detached mode, which is disabled by default.isDetachedEditingEnabled(): Whether the editing is enabled in detached mode.setNextCommitMessage(msg: string): Set the commit message of the next commit.shallowSinceVV(): The doc only contains the history since this version.shallowSinceFrontiers(): The doc only contains the history since this version.export(mode: ExportMode): Export the document based on the specified ExportMode. see more details here.getDeepValueWithID(): Get deep value of the document with container id.subscribeLocalUpdates(callback:(bytes: Uint8Array) => void): Subscribe to updates from local edits.getPathToContainer(id: ContainerID): Get the path from the root to the container.JSONPath(jsonPath: string): Evaluate JSONPath against a LoroDoc.forkAt(frontiers: Frontiers): LoroDoc: Creates a new LoroDoc at a specified version (Frontiers)getPendingTxnLength():number: Get the number of operations in the pending transaction.travelChangeAncestors(ids: ID[], callback: (meta: ChangeMeta)->bool): Iterate over all changes including the input id in order, and stop iterating if the callback returns false.LoroText
updateByLine(text: string): Update the current text based on the provided text line by line like git.LoroList
toArray(): ValueOrContainer[]: Get elements of the list. If the value is a child container, the correspondingContainerwill be returned.clear(): Delete all elements in the list.LoroMovableList
toArray(): ValueOrContainer[]: Get elements of the list. If the value is a child container, the correspondingContainerwill be returned.clear(): Delete all elements in the list.LoroMap
clear(): Delete all key-value pairs in the map.LoroTree
enableFractionalIndex(jitter: number): Set whether to generate a fractional index for Tree Position.disableFractionalIndex(): Disable the fractional index generation for Tree Position whenyou don't need the Tree's siblings to be sorted. The fractional index will always be the default.
isFractionalIndexEnabled(): Whether the tree enables the fractional index generation.isNodeDeleted(id: TreeID): Returnundefinedif the node does not exist; otherwise, returntrueif the node is deleted.getNodes(prop: getNodesProp): LoroTreeNode[]: Get the flat array of the forest. Ifwith_deletedis true, the deleted nodes will be included.UndoManager
clear(): Clear the Undo and Redo stack ofUndoManagerChanges
LoroDoc
setFractionalIndexJitter()toLoroTree; you can set whether to enable or disable it for eachTree Container.import(),importWith(), andimportJsonUpdateswill returnImportStatus, which indicates which ops have been successfully applied and which ops are pending.doc.version()doc.frontiers()doc.oplogVersion()anddoc.oplogFrontiers()even if ops has not been committed, it indicates the latest version of all operations.LorotoLoroDoc.LoroTree
contains(id: TreeID): Return true even if the node exists in the internal state and has been deleted.nodes(): deleted nodes will be included now. You can useisDeleted()to filter.toJSON(): Now use the hierarchical approach to express the tree structure.Deprecation
LoroDoc
exportFrom(version)andexportSnapshot()are deprecated, useexport(mode: ExportMode)instead.v0.16.12Compare Source
Patch Changes
46e21fc: Fix tree move issues46e21fc]v0.16.11Compare Source
Patch Changes
dce00ab: Make loro-wasm work in cloudflare workerdce00ab]v0.16.10Compare Source
Patch Changes
7cf54e8: Fix batch importing with snapshot7cf54e8]v0.16.9Compare Source
Patch Changes
a761430: Fix build scripta761430]v0.16.8Compare Source
Patch Changes
38b4bcf: Add text update API🐛 Bug Fixes
📚 Documentation
🎨 Styling
⚙️ Miscellaneous Tasks
38b4bcf]v0.16.7Compare Source
Patch Changes
45c98d5: Better text APIs and bug fixes🚀 Features
🐛 Bug Fixes
📚 Documentation
⚙️ Miscellaneous Tasks
45c98d5]v0.16.6Compare Source
Patch Changes
1e94248: Add.fork()to duplicate the doc1e94248]v0.16.5Compare Source
Patch Changes
439e4e9: Update pkg desc439e4e9]v0.16.4Compare Source
Patch Changes
afac347: feat: implementCounterand expose it to js sideafac347]v0.16.3Compare Source
Patch Changes
6d47015: Make cursors transformation better in undo/redo loopdc55055: Perf(wasm) cache text.toDelta6d47015]dc55055]v0.16.2Compare Source
Patch Changes
34f6064: Better undo events & transform cursors by undo manager (#369)🧪 Testing
34f6064]v0.16.1Compare Source
Patch Changes
5cd80b0: Refine undo implUpdated dependencies [
5cd80b0]v0.16.0Compare Source
Minor Changes
c12c2b9: Movable Tree Children & Undo🐛 Bug Fixes
🧪 Testing
Feat
🐛 Bug Fixes
Patch Changes
c12c2b9]v0.15.4Compare Source
v0.15.3Compare Source
Patch Changes
43506cc: Fix unsound issue caused by wasm-bindgen🐛 Bug Fixes
📚 Documentation
43506cc]v0.15.2Compare Source
Patch Changes
e30678d: Perf: fix deletions merge🐛 Bug Fixes
⚡ Performance
⚙️ Miscellaneous Tasks
e30678d]v0.15.1Compare Source
Patch Changes
04c6290: Bug fixes and improvements.🐛 Bug Fixes
📚 Documentation
⚙️ Miscellaneous Tasks
04c6290]v0.15.0Compare Source
Minor Changes
35b9b6e: Movable List (#293)Loro's List supports insert and delete operations but lacks built-in methods for
setandmove. To simulate set and move, developers might combine delete and insert. However, this approach can lead to issues during concurrent operations on the same element, often resulting in duplicate entries upon merging.For instance, consider a list [0, 1, 2]. If user A moves the element '0' to position 1, while user B moves it to position 2, the ideal merged outcome should be either [1, 0, 2] or [1, 2, 0]. However, using the delete-insert method to simulate a move results in [1, 0, 2, 0], as both users delete '0' from its original position and insert it independently at new positions.
To address this, we introduce a MovableList container. This new container type directly supports move and set operations, aligning more closely with user expectations and preventing the issues associated with simulated moves.
Example
Patch Changes
35b9b6e]v0.14.6Compare Source
Patch Changes
24cf9b9: Bug Fix🐛 Bug Fixes
24cf9b9]v0.14.5Compare Source
Patch Changes
73e3ba5: Bug Fix🐛 Bug Fixes
🚜 Refactor
73e3ba5]v0.14.4Compare Source
Patch Changes
598d97e: ### 🚜 Refactor📚 Documentation
598d97e]v0.14.3Compare Source
Patch Changes
a1fc2e3: Feat: Awareness (#318)a1fc2e3]v0.14.2Compare Source
v0.14.1Compare Source
v0.14.0Compare Source
v0.13.1Compare Source
v0.13.0Compare Source
v0.12.0Compare Source
v0.11.1Compare Source
v0.11.0Compare Source
v0.10.1Compare Source
v0.10.0Compare Source
v0.9.4Compare Source
v0.9.3Compare Source
v0.9.2Compare Source
v0.9.1Compare Source
v0.9.0Compare Source
v0.8.0Compare Source
v0.7.1Compare Source
v0.7.0Compare Source
v0.6.5Compare Source
v0.6.4Compare Source
v0.6.3Compare Source
v0.6.2Compare Source
v0.6.1Compare Source
v0.6.0Compare Source
v0.5.0Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.