@loro-dev/flock 4.4.4 → 4.5.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/README.md +9 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/src/_moon_flock.ts +4773 -6231
- package/src/index.ts +190 -29
- package/src/moonbit.d.ts +21 -10
package/README.md
CHANGED
|
@@ -53,6 +53,14 @@ unsubscribe();
|
|
|
53
53
|
- Track causal progress with `version()` and `getMaxPhysicalTime()` when orchestrating incremental syncs.
|
|
54
54
|
- Use `Flock.checkConsistency()` in tests to assert that two replicas converged to the same state.
|
|
55
55
|
|
|
56
|
+
## JSON Compatibility
|
|
57
|
+
|
|
58
|
+
Flock stores strict JSON data. Keys and values may use strings, finite numbers,
|
|
59
|
+
booleans, null, arrays, and plain objects. Values that structured clone can
|
|
60
|
+
represent but JSON cannot, such as `undefined`, `bigint`, functions, symbols,
|
|
61
|
+
`NaN`, and infinities, are rejected instead of being preserved or silently
|
|
62
|
+
dropped.
|
|
63
|
+
|
|
56
64
|
## Type Basics
|
|
57
65
|
|
|
58
66
|
- `Value`: JSON-compatible data (`string`, `number`, `boolean`, `null`, nested arrays/objects).
|
|
@@ -113,7 +121,7 @@ All types are exported from the package entry point for use in TypeScript projec
|
|
|
113
121
|
|
|
114
122
|
### Utilities
|
|
115
123
|
|
|
116
|
-
- `exportJson`, `importJson`, `kvToJson`, and `fromJson` all work with plain JavaScript objects
|
|
124
|
+
- `exportJson`, `importJson`, `kvToJson`, and `fromJson` all work with plain JavaScript objects that serialize cleanly through JSON.
|
|
117
125
|
- Keys are encoded using MoonBit’s memcomparable format; use simple scalars and natural ordering for predictable scans.
|
|
118
126
|
|
|
119
127
|
## Error Handling
|