json-patch-to-crdt 0.4.0 → 1.0.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 +132 -2
- package/dist/{compact-CXfvMNCT.js → compact-BUXv4MXQ.js} +1551 -381
- package/dist/{compact-BcwxBNx_.mjs → compact-CncfNnDy.mjs} +1470 -378
- package/dist/{depth-CpJSyZE5.d.mts → depth-C5m9qI-V.d.mts} +184 -22
- package/dist/{depth-D88VeWb-.d.ts → depth-vwQdqCBN.d.ts} +184 -22
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -2
- package/dist/index.mjs +2 -2
- package/dist/internals.d.mts +13 -5
- package/dist/internals.d.ts +13 -5
- package/dist/internals.js +15 -2
- package/dist/internals.mjs +2 -2
- package/package.json +2 -1
package/dist/internals.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_compact = require('./compact-
|
|
2
|
+
const require_compact = require('./compact-BUXv4MXQ.js');
|
|
3
3
|
|
|
4
4
|
exports.ClockValidationError = require_compact.ClockValidationError;
|
|
5
5
|
exports.DeserializeError = require_compact.DeserializeError;
|
|
@@ -7,14 +7,18 @@ exports.HEAD = require_compact.HEAD;
|
|
|
7
7
|
exports.JsonValueValidationError = require_compact.JsonValueValidationError;
|
|
8
8
|
exports.MAX_TRAVERSAL_DEPTH = require_compact.MAX_TRAVERSAL_DEPTH;
|
|
9
9
|
exports.MergeError = require_compact.MergeError;
|
|
10
|
+
exports.OperationCancelledError = require_compact.OperationCancelledError;
|
|
10
11
|
exports.PatchCompileError = require_compact.PatchCompileError;
|
|
11
12
|
exports.PatchError = require_compact.PatchError;
|
|
12
13
|
exports.ROOT_KEY = require_compact.ROOT_KEY;
|
|
14
|
+
exports.ResourceBudgetError = require_compact.ResourceBudgetError;
|
|
13
15
|
exports.TraversalDepthError = require_compact.TraversalDepthError;
|
|
14
16
|
exports.applyIntentsToCrdt = require_compact.applyIntentsToCrdt;
|
|
17
|
+
exports.applyNormalizedPatch = require_compact.applyNormalizedPatch;
|
|
15
18
|
exports.applyPatch = require_compact.applyPatch;
|
|
16
19
|
exports.applyPatchAsActor = require_compact.applyPatchAsActor;
|
|
17
20
|
exports.applyPatchInPlace = require_compact.applyPatchInPlace;
|
|
21
|
+
exports.applySafePatch = require_compact.applySafePatch;
|
|
18
22
|
exports.cloneClock = require_compact.cloneClock;
|
|
19
23
|
exports.cloneDoc = require_compact.cloneDoc;
|
|
20
24
|
exports.compactDocTombstones = require_compact.compactDocTombstones;
|
|
@@ -25,10 +29,14 @@ exports.crdtNodesToJsonPatch = require_compact.crdtNodesToJsonPatch;
|
|
|
25
29
|
exports.crdtToFullReplace = require_compact.crdtToFullReplace;
|
|
26
30
|
exports.crdtToJsonPatch = require_compact.crdtToJsonPatch;
|
|
27
31
|
exports.createClock = require_compact.createClock;
|
|
32
|
+
exports.createNormalizedState = require_compact.createNormalizedState;
|
|
33
|
+
exports.createSafeState = require_compact.createSafeState;
|
|
28
34
|
exports.createState = require_compact.createState;
|
|
29
35
|
exports.deserializeDoc = require_compact.deserializeDoc;
|
|
30
36
|
exports.deserializeState = require_compact.deserializeState;
|
|
31
37
|
exports.diffJsonPatch = require_compact.diffJsonPatch;
|
|
38
|
+
exports.diffNormalizedJsonPatch = require_compact.diffNormalizedJsonPatch;
|
|
39
|
+
exports.diffSafeJsonPatch = require_compact.diffSafeJsonPatch;
|
|
32
40
|
exports.docFromJson = require_compact.docFromJson;
|
|
33
41
|
exports.docFromJsonWithDot = require_compact.docFromJsonWithDot;
|
|
34
42
|
exports.dotToElemId = require_compact.dotToElemId;
|
|
@@ -63,6 +71,7 @@ exports.rgaPrevForInsertAtIndex = require_compact.rgaPrevForInsertAtIndex;
|
|
|
63
71
|
exports.serializeDoc = require_compact.serializeDoc;
|
|
64
72
|
exports.serializeState = require_compact.serializeState;
|
|
65
73
|
exports.stableJsonValueKey = require_compact.stableJsonValueKey;
|
|
74
|
+
exports.strictRfc6902PatchOptions = require_compact.strictRfc6902PatchOptions;
|
|
66
75
|
exports.stringifyJsonPointer = require_compact.stringifyJsonPointer;
|
|
67
76
|
exports.toJson = require_compact.toJson;
|
|
68
77
|
exports.tryApplyPatch = require_compact.tryApplyPatch;
|
|
@@ -75,6 +84,10 @@ exports.tryMergeDoc = require_compact.tryMergeDoc;
|
|
|
75
84
|
exports.tryMergeState = require_compact.tryMergeState;
|
|
76
85
|
exports.validateJsonPatch = require_compact.validateJsonPatch;
|
|
77
86
|
exports.validateRgaSeq = require_compact.validateRgaSeq;
|
|
87
|
+
exports.validateSerializedDoc = require_compact.validateSerializedDoc;
|
|
88
|
+
exports.validateSerializedState = require_compact.validateSerializedState;
|
|
78
89
|
exports.versionVectorCovers = require_compact.versionVectorCovers;
|
|
79
90
|
exports.vvHasDot = require_compact.vvHasDot;
|
|
80
|
-
exports.vvMerge = require_compact.vvMerge;
|
|
91
|
+
exports.vvMerge = require_compact.vvMerge;
|
|
92
|
+
exports.withLegacyMissingArrayParents = require_compact.withLegacyMissingArrayParents;
|
|
93
|
+
exports.withStrictRfc6902Parents = require_compact.withStrictRfc6902Parents;
|
package/dist/internals.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as stableJsonValueKey, A as createState, At as mergeVersionVectors, B as crdtToFullReplace, C as createSafeState, Ct as vvMerge, D as applyPatch, Dt as nextDotForActor, E as PatchError, Et as createClock, F as tryApplyPatchInPlace, Ft as OperationCancelledError, G as jsonPatchToCrdtSafe, H as docFromJson, I as validateJsonPatch, It as ResourceBudgetError, J as compileJsonPatchToIntent, K as tryJsonPatchToCrdt, L as applyIntentsToCrdt, M as toJson, Mt as versionVectorCovers, N as tryApplyPatch, Nt as MAX_TRAVERSAL_DEPTH, O as applyPatchAsActor, Ot as observeDot, P as tryApplyPatchAsActor, Pt as TraversalDepthError, Q as parseJsonPointer, R as cloneDoc, S as createNormalizedState, St as vvHasDot, T as diffSafeJsonPatch, Tt as cloneClock, U as docFromJsonWithDot, V as crdtToJsonPatch, W as jsonPatchToCrdt, X as getAtJson, Y as diffJsonPatch, Z as jsonEquals, _ as strictRfc6902PatchOptions, _t as rgaLinearizeIds, a as mergeState, at as newReg, b as applyNormalizedPatch, bt as compareDot, c as DeserializeError, ct as objRemove, d as serializeDoc, dt as HEAD, et as stringifyJsonPointer, f as serializeState, ft as rgaCompactTombstones, g as validateSerializedState, gt as rgaInsertAfterChecked, h as validateSerializedDoc, ht as rgaInsertAfter, i as mergeDoc, it as newObj, j as forkState, jt as observedVersionVector, k as applyPatchInPlace, kt as intersectVersionVectors, l as deserializeDoc, lt as objSet, m as tryDeserializeState, mt as rgaIdAtIndex, n as compactStateTombstones, nt as JsonValueValidationError, o as tryMergeDoc, ot as newSeq, p as tryDeserializeDoc, pt as rgaDelete, q as PatchCompileError, r as MergeError, rt as lwwSet, s as tryMergeState, st as objCompactTombstones, t as compactDocTombstones, tt as ROOT_KEY, u as deserializeState, ut as materialize, v as withLegacyMissingArrayParents, vt as rgaPrevForInsertAtIndex, w as diffNormalizedJsonPatch, wt as ClockValidationError, x as applySafePatch, xt as dotToElemId, y as withStrictRfc6902Parents, yt as validateRgaSeq, z as crdtNodesToJsonPatch } from "./compact-CncfNnDy.mjs";
|
|
2
2
|
|
|
3
|
-
export { ClockValidationError, DeserializeError, HEAD, JsonValueValidationError, MAX_TRAVERSAL_DEPTH, MergeError, PatchCompileError, PatchError, ROOT_KEY, TraversalDepthError, applyIntentsToCrdt, applyPatch, applyPatchAsActor, applyPatchInPlace, cloneClock, cloneDoc, compactDocTombstones, compactStateTombstones, compareDot, compileJsonPatchToIntent, crdtNodesToJsonPatch, crdtToFullReplace, crdtToJsonPatch, createClock, createState, deserializeDoc, deserializeState, diffJsonPatch, docFromJson, docFromJsonWithDot, dotToElemId, forkState, getAtJson, intersectVersionVectors, jsonEquals, jsonPatchToCrdt, jsonPatchToCrdtSafe, lwwSet, materialize, mergeDoc, mergeState, mergeVersionVectors, newObj, newReg, newSeq, nextDotForActor, objCompactTombstones, objRemove, objSet, observeDot, observedVersionVector, parseJsonPointer, rgaCompactTombstones, rgaDelete, rgaIdAtIndex, rgaInsertAfter, rgaInsertAfterChecked, rgaLinearizeIds, rgaPrevForInsertAtIndex, serializeDoc, serializeState, stableJsonValueKey, stringifyJsonPointer, toJson, tryApplyPatch, tryApplyPatchAsActor, tryApplyPatchInPlace, tryDeserializeDoc, tryDeserializeState, tryJsonPatchToCrdt, tryMergeDoc, tryMergeState, validateJsonPatch, validateRgaSeq, versionVectorCovers, vvHasDot, vvMerge };
|
|
3
|
+
export { ClockValidationError, DeserializeError, HEAD, JsonValueValidationError, MAX_TRAVERSAL_DEPTH, MergeError, OperationCancelledError, PatchCompileError, PatchError, ROOT_KEY, ResourceBudgetError, TraversalDepthError, applyIntentsToCrdt, applyNormalizedPatch, applyPatch, applyPatchAsActor, applyPatchInPlace, applySafePatch, cloneClock, cloneDoc, compactDocTombstones, compactStateTombstones, compareDot, compileJsonPatchToIntent, crdtNodesToJsonPatch, crdtToFullReplace, crdtToJsonPatch, createClock, createNormalizedState, createSafeState, createState, deserializeDoc, deserializeState, diffJsonPatch, diffNormalizedJsonPatch, diffSafeJsonPatch, docFromJson, docFromJsonWithDot, dotToElemId, forkState, getAtJson, intersectVersionVectors, jsonEquals, jsonPatchToCrdt, jsonPatchToCrdtSafe, lwwSet, materialize, mergeDoc, mergeState, mergeVersionVectors, newObj, newReg, newSeq, nextDotForActor, objCompactTombstones, objRemove, objSet, observeDot, observedVersionVector, parseJsonPointer, rgaCompactTombstones, rgaDelete, rgaIdAtIndex, rgaInsertAfter, rgaInsertAfterChecked, rgaLinearizeIds, rgaPrevForInsertAtIndex, serializeDoc, serializeState, stableJsonValueKey, strictRfc6902PatchOptions, stringifyJsonPointer, toJson, tryApplyPatch, tryApplyPatchAsActor, tryApplyPatchInPlace, tryDeserializeDoc, tryDeserializeState, tryJsonPatchToCrdt, tryMergeDoc, tryMergeState, validateJsonPatch, validateRgaSeq, validateSerializedDoc, validateSerializedState, versionVectorCovers, vvHasDot, vvMerge, withLegacyMissingArrayParents, withStrictRfc6902Parents };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "json-patch-to-crdt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Convert JSON Patch (RFC 6902) to and from a CRDT-friendly representation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"crdt",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"bench:crdt-diff": "bun run bench/crdt-diff.microbench.ts",
|
|
47
47
|
"bench:object-diff": "bun run bench/object-diff.microbench.ts",
|
|
48
48
|
"bench:sequential": "bun run bench/sequential-apply.microbench.ts",
|
|
49
|
+
"test:perf-gate": "bun test ./tests/perf-gate.ts",
|
|
49
50
|
"test:state-core": "bun test tests/state-core.test.ts",
|
|
50
51
|
"test:patch-diff-doc": "bun test tests/patch-diff-doc.test.ts",
|
|
51
52
|
"test:merge-compaction": "bun test tests/merge-compaction.test.ts",
|