loro/crates/loro-wasm/CHANGELOG.md

824 lines
16 KiB
Markdown
Raw Normal View History

2023-11-12 13:10:24 +00:00
# Changelog
2024-12-10 07:03:19 +00:00
## 1.2.0
### Minor Changes
- 01fccc5: Return ImportStatus in the import_batch method
### Patch Changes
- d08a865: fix: getOrCreateContainer should not throw if value is null #576
2024-11-29 05:03:13 +00:00
## 1.1.4
### Patch Changes
- 0325061: Fix a deadloop case when importing updates (#570)
2024-11-18 06:35:02 +00:00
## 1.1.3
### 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
2024-11-16 11:32:28 +00:00
## 1.1.2
### Patch Changes
- 70c4942: Add base64 build target
- 35e7ea5: Add changeCount and opCount methods
2024-11-12 13:18:06 +00:00
## 1.1.1
### Patch Changes
- 9abeb81: Add methods to modify VV
- ee26952: Add isDeleted() method to each container
2024-11-09 13:02:17 +00:00
## 1.1.0
### 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
2024-11-04 14:36:34 +00:00
## 1.0.9
### 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())`
## 1.0.8
### Patch Changes
- 62a3a93: Merge two js packages
## 1.0.8-alpha.3
### Patch Changes
- Fix build for bundler
## 1.0.8-alpha.2
### Patch Changes
- Fix build script for web target
## 1.0.8-alpha.1
### Patch Changes
- Include the build for web
## 1.0.8-alpha.0
### Patch Changes
- Refactor simplify js binding
2024-10-23 15:42:18 +00:00
## 1.0.7
### Patch Changes
- Skip published version
2024-10-23 15:35:41 +00:00
## 1.0.1
### Patch Changes
- Release v1.0.1
## 1.0.0
### Patch Changes
- dd3bd92: Release v1.0
2024-10-22 14:58:01 +00:00
## 1.0.0-beta.5
### Patch Changes
- - Fork at should restore detached state (#523)
- Subscription convert error (#525)
2024-10-19 15:22:20 +00:00
## 1.0.0-beta.4
### Patch Changes
- Fix: ForkAt should inherit the config and auto commit from the original doc
2024-10-19 09:13:01 +00:00
## 1.0.0-beta.3
### Patch Changes
- - Wasm api 1.0 (#521)
- Rename wasm export from (#519)
- Rename tree event (#520)
2024-10-17 06:16:02 +00:00
## 1.0.0-beta.2
### Patch Changes
- _(wasm)_ Add methods to encode and decode Frontiers (#517)
- Avoid auto unsubscribe (due to gc) in js env (#516)
2024-10-16 08:29:52 +00:00
## 1.0.0-beta.1
### Patch Changes
- Performance improvement and bug fixes
### 🚀 Features
- Redact (#504)
### 🐛 Bug Fixes
- Ffi Subscription (#505)
- Ffi remove try unwrap (#506)
- Movable list undo impl (#509)
- Tracker skip applied deletion error (#512)
- IsContainerDeleted cache err (#513)
### 📚 Documentation
- Refine wasm docs
### ⚡ Performance
- Optimize shrink frontiers
- Optimize batch container registrations on arena (#510)
- Optimize high concurrency performance (#514)
- Use better data structure for frontiers (#515)
### Perf
- Commit speed & text insert cache (#511)
2024-10-09 11:30:25 +00:00
## 1.0.0-alpha.5
### Patch Changes
- ## Fix
- Use release build
## Test
- Add compatibility tests (#503)
2024-10-09 04:01:01 +00:00
## 1.0.0-alpha.4
### Patch Changes
- ### 🚀 Features
- _(wasm)_ Commit message & get pending ops length (#477)
- Update text by line (#480)
- Add clear methods (#478)
- Travel change's ancestors (#483)
- Compact state store
- Add FFI for Loro (#420)
- Add dag allocation tree algorithm (#415)
- Add import status (#494)
### 🐛 Bug Fixes
- Get correct tree_cache current vv when retreating (#476)
- Gc snapshot error (#481)
- Checkout into middle of marks
- Checkout diff-calc cache issue
- Return err if snapshot container has unknown container (#488)
- Do not set peer id with max (#491)
- Fork error (#493)
- FFI new sub import status (#497)
- Create event cannot find parent (#498)
### 🚜 Refactor
- [**breaking**] Don't wait for `commit` to update version info
- Avoid footgun of impl ord for cid
- Loro import function should return LoroEncodeError (#487)
- [**breaking**] Better event api (#489)
- Change the first param of travel change from id to ids (#492)
- [**breaking**] List state snapshot schema for v1.0 (#485)
### ⚡ Performance
- Make shrink frontiers faster when the peer num is large (#482)
- Optimize tree cache find children speed
- Avoid memory leak when forking repeatedly (#500)
- Optimize kv export_all by reusing encoded block (#501)
- Optimize speed of large maps (#496)
- Optimize diff calc cache use (#475)
### 🧪 Testing
- Make awareness more robust
- Bench large folder with 1M files & 100M ops (#495)
### ⚙️ Miscellaneous Tasks
- Use cached diff calc
2024-09-24 10:10:02 +00:00
## 1.0.0-alpha.3
### Patch Changes
- ### 🐛 Bug Fixes
- Cursor behavior when using gc-snapshot (#472)
- _(wasm)_ Type err
### ⚙️ Miscellaneous Tasks
- Make tree parent id pub on loro crate
### Feat
- Allow editing on detached mode (#473)
### Fix
- Get tree's alive children correctly (#474)
- Should not emit event when exporting gc-snapshot (#471)
2024-09-23 02:20:28 +00:00
## 1.0.0-alpha.2
### Patch Changes
- ### 🚀 Features
- Fork doc at the target version (#469)
### 🚜 Refactor
- BREAKING CHANGE: Use hierarchy value for tree value (#470)
2024-09-20 10:16:49 +00:00
## 1.0.0-alpha.1
### Patch Changes
- ### 🚀 Features
- Get shallow value of doc (#463)
- Add state only snapshot & refine check slow test
- Add new cid method to js binding
- Jsonpath experimental support (#466)
### 🐛 Bug Fixes
- Raise error if perform action on a deleted container (#465)
- Raise error if moving a deleted node
- Export snapshot error on a gc doc
### 🚜 Refactor
- Tree contains & isDeleted (#467)
### 🧪 Testing
- Check state correctness on shallow doc
2024-09-20 10:16:49 +00:00
## 1.0.0-alpha.0
- Better encode schema that can be 100x faster
- Less memory usage
- You can trim needless history in snapshot now
- Better architecture and extensibility
## 0.16.12
### Patch Changes
- 46e21fc: Fix tree move issues
## 0.16.11
### Patch Changes
- dce00ab: Make loro-wasm work in cloudflare worker
## 0.16.10
### Patch Changes
- 7cf54e8: Fix batch importing with snapshot
## 0.16.9
### Patch Changes
- a761430: Fix build script
## 0.16.8
### Patch Changes
- 38b4bcf: Add text update API
- Remove the patch for crypto
- Add text update API (#404)
- Check invalid root container name (#411)
### 🐛 Bug Fixes
- Workaround lldb bug make loro crate debuggable (#414)
- Delete the **bring back** tree node from the undo container remap (#423)
### 📚 Documentation
- Fix typo
- Refine docs about event (#417)
### 🎨 Styling
- Use clippy to perf code (#407)
### ⚙️ Miscellaneous Tasks
- Add test tools (#410)
## 0.16.7
### Patch Changes
- 45c98d5: Better text APIs and bug fixes
### 🚀 Features
- Add insert_utf8 and delete_utf8 for Rust Text API (#396)
- Add text iter (#400)
- Add more text api (#398)
### 🐛 Bug Fixes
- Tree undo when processing deleted node (#399)
- Tree diff calc children should be sorted by idlp (#401)
- When computing the len of the map, do not count elements that are None (#402)
### 📚 Documentation
- Update wasm docs
- Rm experimental warning
### ⚙️ Miscellaneous Tasks
- Update fuzz config
- Pnpm
- Rename position to fractional_index (#381)
2024-06-26 13:06:50 +00:00
## 0.16.6
### Patch Changes
- 1e94248: Add `.fork()` to duplicate the doc
2024-06-21 04:10:01 +00:00
## 0.16.5
### Patch Changes
- 439e4e9: Update pkg desc
## 0.16.4
### Patch Changes
- afac347: feat: implement `Counter` and expose it to js side
2024-06-07 06:14:26 +00:00
## 0.16.4-alpha.0
### Patch Changes
- Export/import JSON schema
## 0.16.3
### Patch Changes
- 6d47015: Make cursors transformation better in undo/redo loop
- dc55055: Perf(wasm) cache text.toDelta
## 0.16.2
### Patch Changes
- 34f6064: Better undo events & transform cursors by undo manager (#369)
#### 🧪 Testing
- Enable compatibility test (#367)
## 0.16.1
### Patch Changes
- 5cd80b0: Refine undo impl
- Add "undo" origin for undo and redo event
- Allow users to skip certain local operations
- Skip undo/redo ops that are not visible to users
- Add returned bool value to indicate whether undo/redo is executed
## 0.16.0
### Minor Changes
- c12c2b9: Movable Tree Children & Undo
#### 🐛 Bug Fixes
- Refine error message on corrupted data (#356)
- Add MovableList to CONTAINER_TYPES (#359)
- Better jitter for fractional index (#360)
#### 🧪 Testing
- Add compatibility tests (#357)
#### Feat
- Make the encoding format forward and backward compatible (#329)
- Undo (#361)
- Use fractional index to order the children of the tree (#298)
#### 🐛 Bug Fixes
- Tree fuzz sort value (#351)
- Upgrade wasm-bindgen to fix str free err (#353)
## 0.15.3
### Patch Changes
- 43506cc: Fix unsound issue caused by wasm-bindgen
#### 🐛 Bug Fixes
- Fix potential movable list bug (#354)
- Tree fuzz sort value (#351)
- Upgrade wasm-bindgen to fix str free err (#353)
#### 📚 Documentation
- Simplify readme (#352)
2024-05-04 03:37:35 +00:00
## 0.15.2
### Patch Changes
- e30678d: Perf: fix deletions merge
#### 🐛 Bug Fixes
- _(wasm)_ Movable list .kind() (#342)
#### ⚡ Performance
- Delete span merge err (#348)
#### ⚙️ Miscellaneous Tasks
- Warn missing debug impl (#347)
<!-- generated by git-cliff -->
## 0.15.1
### 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)
<!-- generated by git-cliff -->
## 0.15.0
### 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
```ts
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");
```
## 0.14.6
### Patch Changes
- 24cf9b9: Bug Fix
#### 🐛 Bug Fixes
- Attached container can be inserted to `Map` or `List` (#331)
## 0.14.5
### Patch Changes
- 73e3ba5: Bug Fix
#### 🐛 Bug Fixes
- _(js)_ Allow convert from undefined to LoroValue (#323)
#### 🚜 Refactor
- Refine ts type (#322)
## 0.14.4
### Patch Changes
- 598d97e: ### 🚜 Refactor
- Refine the TS Type of Awareness
- Parse Uint8array to LoroValue::Binary (#320)
### 📚 Documentation
- Update how to publish new npm pkgs
## 0.14.3
### Patch Changes
- a1fc2e3: Feat: Awareness (#318)
2024-04-10 04:30:21 +00:00
## 0.14.2
### Patch Changes
- Refactor rename `StablePosition` to `Cursor`
- Rename stable pos to cursor (#317)
<!-- generated by git-cliff -->
2024-04-09 08:10:28 +00:00
## 0.14.1
### Patch Changes
- Supports Cursors
#### 🚀 Features
- Cursors (#290)
2024-04-04 18:25:25 +00:00
## 0.14.0
### Minor Changes
- Improved API
### 🚀 Features
- Access value/container by path (#308)
- Decode import blob meta (#307)
### 🐛 Bug Fixes
- Decode iter return result by updating columnar to 0.3.4 (#309)
### 🚜 Refactor
- Replace "local" and "fromCheckout" in event with "triggeredBy" (#312)
- Add concrete type for each different container (#313)
- _(ts)_ Make types better (#315)
### 📚 Documentation
- Refine wasm docs (#304)
- Clarify that peer id should be convertible to a u64 (#306)
### ⚙️ Miscellaneous Tasks
- Add coverage report cli (#311)
2024-03-30 18:12:06 +00:00
## 0.13.1
### Patch Changes
- Fix type errors and conversion from js->rust error
2024-03-30 03:44:18 +00:00
## 0.13.0
### Minor Changes
- BREAKING CHANGE: `detached` mode for Containers #300
Now creating sub-containers is much easier.
A container can be either attached to a document or detached. When it's detached, its history/state is not persisted. You can attach a container to a document by inserting it into an existing attached container. Once a container is attached, its state, along with all of its descendants's states, will be recreated in the document. After attaching, the container and its descendants will each have their corresponding "attached" version of themselves.
When a detached container x is attached to a document, you can use `x.getAttached()` to obtain the corresponding attached container.
When we use const text = new LoroList(), it's not attached to a doc. But we can insert it into a doc by map.insertContainer(”t”, text), where the map is attached. But if we want the operations on the text to be recorded to the doc, we now need to get its attached version. So we can use “let attachedText = text.getAttached()”
2024-03-27 15:53:34 +00:00
## 0.12.0
### Minor Changes
- Add getParent and getOrCreate
2024-02-17 06:42:37 +00:00
## 0.11.1
### Patch Changes
- Fix batch import
2024-02-10 14:25:05 +00:00
## 0.11.0
### Minor Changes
- Fix a few bugs and include BREAKING CHANG refactors
- fix: should not reset the state when calling checkout to latest (#265)
- refactor: only send a event for one `import`/`transaction`/`checkout` (#263)
- perf: optimize snapshot encoding speed (#264)
- feat: remove deleted set in tree state and optimize api (#259)
2024-01-24 02:01:30 +00:00
## 0.10.1
### Patch Changes
- fix: remove checking after checkout
2024-01-22 05:00:42 +00:00
## 0.10.0
### Minor Changes
- New encoding schema
- BREAKING CHANGE: refactor: Optimizing Encoding Representation for Child Container Creation to Reduce Document Size (#247)
- feat: compare frontiers causal order (#257)
- docs: update docs about rich text style (#258)
2024-01-21 12:04:31 +00:00
## 0.9.4
### Patch Changes
- Fix a few richtext time travel issues
2024-01-19 16:59:07 +00:00
## 0.9.3
### Patch Changes
- feat: add getChangeAtLamport
2024-01-19 14:23:24 +00:00
## 0.9.2
### Patch Changes
- Fix a few rich text issue
- fix: time travel back should be able to nullify rich text span (#254)
- fix: formalize apply delta method (#252)
- fix: how to find best insert pos for richtext & expand type reverse behavior (#250)
2024-01-18 05:30:26 +00:00
## 0.9.1
### Patch Changes
- Fix use consistnt peer id repr and expose VersionVector type
2024-01-17 15:00:50 +00:00
## 0.9.0
### Minor Changes
- Refine the rich text CRDT in Loro
2024-01-05 08:11:09 +00:00
## 0.8.0
### Minor Changes
- Stabilize encoding and fix several issues related to time travel
feat: stabilizing encoding (#219) This PR implements a new encode schema that is more extendible and more compact. It’s also simpler and takes less binary size and maintaining effort. It is inspired by the [Automerge Encoding Format](https://automerge.org/automerge-binary-format-spec/). The main motivation is the extensibility. When we integrate a new CRDT algorithm, we don’t want to make a breaking change to the encoding or keep multiple versions of the encoding schema in the code, as it will make our WASM size much larger. We need a stable and extendible encoding schema for our v1.0 version. This PR also exposes the ops that compose the current container state. For example, now you can make a query about which operation a certain character quickly. This behavior is required in the new snapshot encoding, so it’s included in this PR. # Encoding Schema ## Header The header has 22 bytes. - (0-4 bytes) Magic Bytes: The encoding starts with `loro` as magic bytes. - (4-20 bytes) Checksum: MD5 checksum of the encoded data, including the header starting from 20th bytes. The checksum is encoded as a 16-byte array. The `checksum` and `magic bytes` fields are trimmed when calculating the checksum. - (20-21 bytes) Encoding Method (2 bytes, big endian): Multiple encoding methods are available for a specific encoding version. ## Encode Mode: Updates In this approach, only ops, specifically their historical record, are encoded, while document states are excluded. Like Automerge's format, we employ columnar encoding for operations and changes. Previously, operations were ordered by their Operation ID (OpId) before columnar encoding. However, sorting operations based on their respective containers initially enhance compression potential. ## Encode Mode: Snapshot This mode simultaneously captures document state and historical data. Upon importing a snapshot into a new document, initialization occurs directly from the snapshot, bypassing the need for CRDT-based recalculations. Unlike previous snapshot encoding methods, the current binary output in snapshot mode is compatible with the updates mode. This enhances the efficiency of importing snapshots into non-empty documents, where initialization via snapshot is infeasible. Additionally, when feasible, we leverage the sequence of operations to construct state snapshots. In CRDTs, deducing the specific ops constituting the current container state is feasible. These ops are tagged in relation to the container, facilitating direct state reconstruction from them. This approach, pioneered by Automerge, significantly improves compression efficiency.
2024-01-02 09:03:24 +00:00
## 0.7.2-alpha.4
### Patch Changes
- Fix encoding value err
## 0.7.2-alpha.3
### Patch Changes
- Fix export compressed snapshot
## 0.7.2-alpha.2
### Patch Changes
- Add compressed method
## 0.7.2-alpha.1
### Patch Changes
- Fix v0 exports
## 0.7.2-alpha.0
### Patch Changes
- Add experimental encode methods
## 0.7.1
### Patch Changes
- Fix a few richtext errors
2023-12-08 09:00:55 +00:00
## 0.7.0
### Minor Changes
- refactor: remove setPanicHook and call it internally when loaded
2023-12-07 07:27:22 +00:00
## 0.6.5
### Patch Changes
- Fix checkout err on seq data
2023-12-06 15:39:55 +00:00
## 0.6.4
### Patch Changes
- Fix time travel issue #211
2023-12-05 05:58:00 +00:00
## 0.6.1
### Patch Changes
- 6753c2f: Refine loro-crdt api
2023-12-05 05:38:09 +00:00
## 0.6.0
### Minor Changes
2023-11-12 13:10:24 +00:00
2023-12-05 05:38:09 +00:00
- Improve API of event
2023-11-12 13:10:24 +00:00
2023-12-05 05:38:09 +00:00
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.