Skip to content

Releases: loro-dev/loro

[email protected]

29 Nov 06:27
Compare
Choose a tag to compare

Patch Changes

  • 0325061: Fix a deadloop case when importing updates (#570)

[email protected]

18 Nov 07:28
Compare
Choose a tag to compare

Patch Changes

  • d6966ac: The fractional index in LoroTree is now enabled by default with jitter=0.

    To reduce the cost of LoroTree, if the index property in LoroTree is unused, users can still
    call tree.disableFractionalIndex(). However, in the new version, after disabling the fractional
    index, tree.moveTo(), tree.moveBefore(), tree.moveAfter(), and tree.createAt() will
    throw an error

[email protected]

16 Nov 11:35
Compare
Choose a tag to compare

Patch Changes

  • 70c4942: Add base64 build target
  • 35e7ea5: Add changeCount and opCount methods

[email protected]

12 Nov 15:09
Compare
Choose a tag to compare

Patch Changes

  • 9abeb81: Add methods to modify VV
  • ee26952: Add isDeleted() method to each container

[email protected]

09 Nov 13:06
Compare
Choose a tag to compare

Minor Changes

  • 6e878d2: Feat add API to query creators, the last editors/movers
  • 778ca54: Feat: allow users to query the changed containers in the target id range

Patch Changes

  • 6616101: Perf: optimize importBatch

    When using importBatch to import a series of snapshots and updates, we should import the snapshot with the greatest version first.

  • 6e878d2: Feat: getLastEditor on LoroMap

  • 8486234: Fix get encoded blob meta

[email protected]

04 Nov 14:48
Compare
Choose a tag to compare

Patch Changes

  • 7bf6db7: Add push to LoroText and pushContainer to LoroList LoroMovableList

  • 9b60d01: Define the behavior of doc.fork() when the doc is detached

    It will fork at the current state_frontiers, which is equivalent to calling doc.fork_at(&doc.state_frontiers())

[email protected]

29 Oct 13:56
d3cdb20
Compare
Choose a tag to compare

Patch Changes

v1.0

23 Oct 15:51
19b7ed9
Compare
Choose a tag to compare

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): get ChangeMeta by ID.
  • 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 corresponding Container will 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 corresponding Container will 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 when
    you 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): Return undefined if the node does not exist; otherwise, return true if the node is deleted.
  • getNodes(prop: getNodesProp): LoroTreeNode[]: Get the flat array of the forest. If with_deleted is true, the deleted nodes will be included.

UndoManager

  • clear(): Clear the Undo and Redo stack of UndoManager

Changes

LoroDoc

  • Move setFractionalIndexJitter() to LoroTree; you can set whether to enable or disable it for each Tree Container.
  • import(), importWith(), and importJsonUpdates will return ImportStatus, which indicates which ops have been successfully applied and which ops are pending.
  • New Subscription for events.
  • In Loro 1.0, doc.version() doc.frontiers() doc.oplogVersion() and doc.oplogFrontiers() even if ops has not been committed, it indicates the latest version of all operations.
  • rename Loro to LoroDoc.

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 use isDeleted() to filter.
  • toJSON(): Now use the hierarchical approach to express the tree structure.

Deprecation

LoroDoc

  • exportFrom(version) and exportSnapshot() are deprecated, use export(mode: ExportMode) instead.

[email protected]

07 Sep 11:46
2437089
Compare
Choose a tag to compare

Patch Changes

[email protected]

07 Sep 11:46
2437089
Compare
Choose a tag to compare

Patch Changes