loro-crdt 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/base64/index.js +93 -77
- package/base64/loro_wasm.d.ts +44 -18
- package/bundler/loro_wasm.d.ts +44 -18
- package/bundler/loro_wasm_bg.js +85 -69
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +6 -4
- package/nodejs/loro_wasm.d.ts +44 -18
- package/nodejs/loro_wasm.js +85 -69
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +6 -4
- package/package.json +1 -1
- package/web/loro_wasm.d.ts +50 -22
- package/web/loro_wasm.js +85 -69
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7dfda87: Make update imports atomic across oplog and document state application.
|
|
8
|
+
|
|
9
|
+
- `import` and `import_json_updates` now roll back imported oplog changes when state application fails, so malformed updates do not leave the document with oplog/state divergence.
|
|
10
|
+
- Pending changes that are activated during import are included in the rollback boundary when they can affect state application.
|
|
11
|
+
- Import rollback uses conditional guards to avoid adding fixed overhead to successful detached or no-op imports.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 64aa97c: Harden encoding, snapshot, and import paths against malformed input
|
|
16
|
+
|
|
17
|
+
- JSON schema import (`import_json_updates`): out-of-range compressed peer indices now return `DecodeError` instead of being silently accepted as raw peer IDs; mismatched `JsonOpContent` vs container type returns `DecodeError` instead of panicking.
|
|
18
|
+
- Outdated binary encoding decoder (`decode_op`): malformed op streams (missing delete iterators, type mismatches) now return `DecodeDataCorruptionError` instead of panicking.
|
|
19
|
+
- Fast snapshot decoder (`decode_snapshot_blob_meta`): truncated or oversized section lengths now return `DecodeDataCorruptionError` instead of panicking on slice indexing.
|
|
20
|
+
- Change store KV import (`import_all`): corrupted `VersionVector`/`Frontiers` metadata now returns `DecodeDataCorruptionError` instead of panicking.
|
|
21
|
+
- Value encoding (`LoroValueKind::from_u8`, `read_str`): invalid byte values and invalid UTF-8 now return `DecodeDataCorruptionError` instead of panicking.
|
|
22
|
+
- `LoroDoc::diff()`: checkout failures during diff calculation are now propagated as `LoroError` instead of panicking; state restore uses `unwrap()` to fail-fast on internal errors.
|
|
23
|
+
- `try_get_text/list/map/tree/movable_list/counter`: now return `None` for wrong root container types instead of panicking.
|
|
24
|
+
- Detached list insert out-of-bounds: returns `LoroError::OutOfBound` instead of panicking.
|
|
25
|
+
- Tree `mov_after`/`mov_before` on deleted node: returns `TreeNodeDeletedOrNotExist` instead of panicking.
|
|
26
|
+
- `JsonChange::op_len`: empty ops array returns `0` instead of panicking.
|
|
27
|
+
- `renew_peer_id`: avoids theoretical collision with `PeerID::MAX`.
|
|
28
|
+
|
|
29
|
+
- 0977ad1: Fix lock-order panics when JavaScript callbacks re-enter Loro APIs.
|
|
30
|
+
|
|
31
|
+
- `opCount()` no longer reacquires the OpLog lock while the current thread already holds a higher-order lock.
|
|
32
|
+
- `LoroText.iter()` snapshots text chunks before invoking the user callback, so callback code can safely read or mutate the document.
|
|
33
|
+
|
|
34
|
+
- ef100e6: Reduce memory spikes when exporting snapshots from shallow documents.
|
|
35
|
+
|
|
36
|
+
When a shallow document is re-exported from its existing shallow root with only a small tail of updates, Loro now reuses the stored shallow-root state instead of decoding all containers just to re-encode the same state.
|
|
37
|
+
|
|
38
|
+
- 933d5d6: feat: add clearRedo and clearUndo methods
|
|
39
|
+
#921
|
|
40
|
+
- 17dc6c0: Fix several edge-case contract violations in document, text, and JSONPath APIs.
|
|
41
|
+
|
|
42
|
+
- JSONPath `value(...)` comparisons now handle boolean values consistently with other scalar comparisons.
|
|
43
|
+
- Rich text mark expansion now follows `ExpandType::Before` and `ExpandType::Both` at documented insertion boundaries.
|
|
44
|
+
- Text delta slicing now validates invalid ranges and UTF-8/UTF-16 boundaries before slicing, and public deltas omit removed-style tombstones after unmarking.
|
|
45
|
+
- Detached list and movable-list out-of-bounds operations now return `LoroError::OutOfBound` instead of panicking.
|
|
46
|
+
|
|
47
|
+
## 1.11.1
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- 6f5b7a9: Fix production panic regressions
|
|
52
|
+
|
|
3
53
|
## 1.11.0
|
|
4
54
|
|
|
5
55
|
### Minor Changes
|