loro-crdt 1.16.0 → 1.16.2

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 CHANGED
@@ -1,5 +1,61 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 5a80c15: Fix shallow snapshots that exported successfully but could not be imported into an empty document. The shallow root is now always a critical version of the retained history. Previously two shapes picked a root that other retained changes were concurrent with: a version with an odd number of independent heads, and a past version when a branch that forked below it was merged later.
8
+ - c7bd1c3: Preserve deleted-container state required by the history retained in `forkAt`
9
+ and snapshot-at exports. Historical diffs and checkouts can traverse deleted
10
+ list and text descendants without a missing-state panic. Containers created
11
+ after the requested frontier remain excluded.
12
+
13
+ Restore the source frontier after snapshot-at validation errors and preserve
14
+ explicit detached mode when exporting a document at its head.
15
+
16
+ - c3ffde6: Fix a panic followed by a deadlock when subscribing to an event source while
17
+ it is emitting, e.g. calling `subscribeLocalUpdates` or `subscribe` from inside
18
+ a callback, or subscribing on one thread while another thread commits or
19
+ imports. A subscriber added during an emit is now registered for later events;
20
+ it does not receive the event that is already being delivered.
21
+ - e2e41a3: Fix `LoroText.getCursor` at UTF-16 boundaries around non-BMP characters.
22
+ - be0e1ac: Accept tree snapshot state whose sibling nodes are not in fractional index
23
+ order, such as `snapshot`/`shallow-snapshot` exports from loro.js 0.1.0/0.2.0
24
+ after a tree `move()` (loro-dev/loro#1088). The decoder now sorts siblings by
25
+ their (fractional index, idlp) position instead of panicking with
26
+ `assertion failed: last.0 < pos` on the first read. Tree state with duplicate
27
+ node ids or duplicate sibling positions is rejected as a decode error.
28
+
29
+ ## 1.16.1
30
+
31
+ ### Patch Changes
32
+
33
+ - d9ddfba: Make repeated concurrent imports fast: retreat the replay base to the latest
34
+ multi-head critical version instead of the single-head one (which is stuck at
35
+ the initial fork point on criss-cross sync DAGs), and let the text/list diff
36
+ calculators trust a certified-critical base instead of rebuilding their
37
+ trackers from the whole history on every concurrent import.
38
+ - 80a0e88: Make imports that are concurrent with the current version only on map/counter
39
+ containers as fast as ordinary linear imports.
40
+
41
+ Previously any concurrency between the new ops and the current version
42
+ (for example a single unmerged head from another peer) forced every later
43
+ import to retreat to a critical version and replay the whole branch, and the
44
+ map diff scanned every key of every touched map. Per-import cost grew with
45
+ both the branch length and the map size: 400 small imports on a 2000-note doc
46
+ with one stale head took ~2.4s natively; they now take ~70ms, flat per import
47
+ (a linear import of the same chain takes ~50ms).
48
+
49
+ The oplog now proves, per container, whether the concurrent old history
50
+ touches anything that needs positional context. When it only touches registers
51
+ the import replays from the current version; the affected maps are still
52
+ resolved from history so persisted state that drops tombstones (deleted roots,
53
+ dead containers) cannot influence the result. Map diffs in the conservative
54
+ path are also restricted to the keys the update touched.
55
+
56
+ - d9ddfba: Fix the richtext diff calculator's style table growing a duplicate entry for
57
+ every re-replayed style op (e.g. checkout walks after a retreat).
58
+
3
59
  ## 1.16.0
4
60
 
5
61
  ### Minor Changes