Skip to content

Releases: loro-dev/loro

loro-wasm@0.15.1

02 May 08:56
307df25
Compare
Choose a tag to compare

Patch Changes

  • 04c6290: Bug fixes and improvements.

    🐛 Bug Fixes

    • Impl a few unimplemented! for movable tree (#335)
    • Refine ts type; reject invalid operations (#334)
    • Get cursor err on text and movable list (#337)
    • Missing MovableList in all container type (#343)
    • Upgrade generic-btree to allow large btree (#344)

    📚 Documentation

    • Add warn(missing_docs) to loro and loro-wasm (#339)
    • Minor fix on set_change_merge_interval api (#341)

    ⚙️ Miscellaneous Tasks

    • Skip the checking if not debug_assertions (#340)

loro-crdt@0.15.1

02 May 08:56
307df25
Compare
Choose a tag to compare

Patch Changes

  • 04c6290: Bug fixes and improvements.

    🐛 Bug Fixes

    • Impl a few unimplemented! for movable tree (#335)
    • Refine ts type; reject invalid operations (#334)
    • Get cursor err on text and movable list (#337)
    • Missing MovableList in all container type (#343)
    • Upgrade generic-btree to allow large btree (#344)

    📚 Documentation

    • Add warn(missing_docs) to loro and loro-wasm (#339)
    • Minor fix on set_change_merge_interval api (#341)

    ⚙️ Miscellaneous Tasks

    • Skip the checking if not debug_assertions (#340)
  • Updated dependencies [04c6290]

    • loro-wasm@0.15.1

loro-wasm@0.15.0

26 Apr 04:31
41d198d
Compare
Choose a tag to compare

Minor Changes

  • 35b9b6e: Movable List (#293)

    Loro's List supports insert and delete operations but lacks built-in methods for set and move. 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

    import { Loro } from "loro-crdt";
    import { expect } from "vitest";
    
    const doc = new Loro();
    const list = doc.getMovableList("list");
    list.push("a");
    list.push("b");
    list.push("c");
    expect(list.toArray()).toEqual(["a", "b", "c"]);
    list.set(2, "d");
    list.move(0, 1);
    const doc2 = new Loro();
    const list2 = doc2.getMovableList("list");
    expect(list2.length).toBe(0);
    doc2.import(doc.exportFrom());
    expect(list2.length).toBe(3);
    expect(list2.get(0)).toBe("b");
    expect(list2.get(1)).toBe("a");
    expect(list2.get(2)).toBe("d");

loro-crdt@0.15.0

26 Apr 04:31
41d198d
Compare
Choose a tag to compare

Minor Changes

  • 35b9b6e: Movable List (#293)

    Loro's List supports insert and delete operations but lacks built-in methods for set and move. 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

    import { Loro } from "loro-crdt";
    import { expect } from "vitest";
    
    const doc = new Loro();
    const list = doc.getMovableList("list");
    list.push("a");
    list.push("b");
    list.push("c");
    expect(list.toArray()).toEqual(["a", "b", "c"]);
    list.set(2, "d");
    list.move(0, 1);
    const doc2 = new Loro();
    const list2 = doc2.getMovableList("list");
    expect(list2.length).toBe(0);
    doc2.import(doc.exportFrom());
    expect(list2.length).toBe(3);
    expect(list2.get(0)).toBe("b");
    expect(list2.get(1)).toBe("a");
    expect(list2.get(2)).toBe("d");

Patch Changes

  • Updated dependencies [35b9b6e]
    • loro-wasm@0.15.0

loro-wasm@0.14.6

24 Apr 11:31
1b59909
Compare
Choose a tag to compare

Patch Changes

  • 24cf9b9: Bug Fix

    🐛 Bug Fixes

    • Attached container can be inserted to Map or List (#331)

loro-crdt@0.14.6

24 Apr 11:31
1b59909
Compare
Choose a tag to compare

Patch Changes

  • 24cf9b9: Bug Fix

    🐛 Bug Fixes

    • Attached container can be inserted to Map or List (#331)
  • Updated dependencies [24cf9b9]

    • loro-wasm@0.14.6

loro-wasm@0.14.5

18 Apr 11:58
4700ead
Compare
Choose a tag to compare

Patch Changes

  • 73e3ba5: Bug Fix

    🐛 Bug Fixes

    • (js) Allow convert from undefined to LoroValue (#323)

    🚜 Refactor

    • Refine ts type (#322)

loro-crdt@0.14.5

18 Apr 11:58
4700ead
Compare
Choose a tag to compare

Patch Changes

  • 73e3ba5: Bug Fix

    🐛 Bug Fixes

    • (js) Allow convert from undefined to LoroValue (#323)

    🚜 Refactor

    • Refine ts type (#322)
  • Updated dependencies [73e3ba5]

    • loro-wasm@0.14.5

loro-wasm@0.14.4

17 Apr 07:16
e8352ad
Compare
Choose a tag to compare

Patch Changes

  • 598d97e: ### 🚜 Refactor

    • Refine the TS Type of Awareness
    • Parse Uint8array to LoroValue::Binary (#320)

    📚 Documentation

    • Update how to publish new npm pkgs

loro-crdt@0.14.4

17 Apr 07:16
e8352ad
Compare
Choose a tag to compare

Patch Changes

  • 598d97e: ### 🚜 Refactor

    • Refine the TS Type of Awareness
    • Parse Uint8array to LoroValue::Binary (#320)

    📚 Documentation

    • Update how to publish new npm pkgs
  • Updated dependencies [598d97e]

    • loro-wasm@0.14.4