@verdant-web/common 2.7.2 → 2.8.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/dist/esm/diffing.d.ts +39 -0
- package/dist/esm/diffing.js +257 -0
- package/dist/esm/diffing.js.map +1 -0
- package/dist/esm/diffing.test.d.ts +1 -0
- package/dist/esm/diffing.test.js +896 -0
- package/dist/esm/diffing.test.js.map +1 -0
- package/dist/esm/index.d.ts +20 -19
- package/dist/esm/index.js +17 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/migration.js +1 -1
- package/dist/esm/migration.js.map +1 -1
- package/dist/esm/migration.test.d.ts +1 -0
- package/dist/esm/migration.test.js +98 -0
- package/dist/esm/migration.test.js.map +1 -0
- package/dist/esm/operation.d.ts +7 -21
- package/dist/esm/operation.js +28 -266
- package/dist/esm/operation.js.map +1 -1
- package/dist/esm/operation.test.js +122 -592
- package/dist/esm/operation.test.js.map +1 -1
- package/dist/esm/patch.d.ts +13 -13
- package/dist/esm/patch.js +41 -16
- package/dist/esm/patch.js.map +1 -1
- package/dist/esm/timestamp.d.ts +1 -0
- package/dist/esm/timestamp.js +3 -0
- package/dist/esm/timestamp.js.map +1 -1
- package/dist/esm/undo.js +15 -2
- package/dist/esm/undo.js.map +1 -1
- package/dist/esm/undo.test.d.ts +1 -0
- package/dist/esm/undo.test.js +20 -0
- package/dist/esm/undo.test.js.map +1 -0
- package/dist/esm/utils.js +13 -3
- package/dist/esm/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/diffing.test.ts +939 -0
- package/src/diffing.ts +325 -0
- package/src/index.ts +21 -20
- package/src/migration.test.ts +112 -0
- package/src/migration.ts +2 -1
- package/src/operation.test.ts +148 -623
- package/src/operation.ts +37 -371
- package/src/patch.ts +68 -11
- package/src/timestamp.ts +4 -1
- package/src/undo.test.ts +21 -0
- package/src/undo.ts +15 -2
- package/src/utils.ts +13 -3
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Operation } from './operation.js';
|
|
2
|
+
import { PatchCreator } from './patch.js';
|
|
3
|
+
export type DiffContext = {
|
|
4
|
+
patches: Operation[];
|
|
5
|
+
/**
|
|
6
|
+
* If an object is merged with another and the new one does not
|
|
7
|
+
* have an OID assigned, assume it is the same identity as previous
|
|
8
|
+
*/
|
|
9
|
+
mergeUnknownObjects?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* If an incoming value is not assigned on the new object, use the previous value.
|
|
12
|
+
* If false, undefined properties will erase the previous value.
|
|
13
|
+
*/
|
|
14
|
+
merge?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Authorization to apply to all created operations
|
|
17
|
+
*/
|
|
18
|
+
authz?: string;
|
|
19
|
+
patchCreator: PatchCreator;
|
|
20
|
+
};
|
|
21
|
+
export declare function diffToPatches(from: any, to: any, getNow: () => string, createSubId?: () => string, _?: any, // legacy, TODO: remove
|
|
22
|
+
options?: {
|
|
23
|
+
mergeUnknownObjects?: boolean;
|
|
24
|
+
merge?: boolean;
|
|
25
|
+
/** @deprecated - use 'merge' */
|
|
26
|
+
defaultUndefined?: boolean;
|
|
27
|
+
authz?: string;
|
|
28
|
+
}): Operation[];
|
|
29
|
+
export declare function diff(from: any, to: any, ctx: DiffContext): void;
|
|
30
|
+
/**
|
|
31
|
+
* Deep diff lists of any kind of item. Adds patches for the changes
|
|
32
|
+
* to the context patch list.
|
|
33
|
+
* @param from - the original list snapshot. must be the full snapshot, no references.
|
|
34
|
+
* @param to - the new list snapshot. must be the full snapshot, no references.
|
|
35
|
+
* @param ctx - the diff context to add patches to.
|
|
36
|
+
*/
|
|
37
|
+
export declare function diffLists(from: any[], to: any[], ctx: DiffContext): void;
|
|
38
|
+
export declare function diffObjects(from: any, to: any, ctx: DiffContext): void;
|
|
39
|
+
export declare function deleteWithSubObjects(root: any, ctx: DiffContext): void;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { VerdantError } from './error.js';
|
|
2
|
+
import { areOidsRelated, assignOid, getOid, maybeGetOid, } from './oids.js';
|
|
3
|
+
import { isOidKey } from './oidsLegacy.js';
|
|
4
|
+
import { PatchCreator } from './patch.js';
|
|
5
|
+
import { compareRefs, isRef } from './refs.js';
|
|
6
|
+
import { cloneDeep, isObject } from './utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* Compares two anythings and determines if they
|
|
9
|
+
* represent the same thing. Works for primitives,
|
|
10
|
+
* refs, and objects with OIDs.
|
|
11
|
+
*/
|
|
12
|
+
function areTheSameIdentity(a, b) {
|
|
13
|
+
if (a === b)
|
|
14
|
+
return true;
|
|
15
|
+
if (isRef(a) && isRef(b))
|
|
16
|
+
return compareRefs(a, b);
|
|
17
|
+
const aOid = maybeGetOid(a);
|
|
18
|
+
const bOid = maybeGetOid(b);
|
|
19
|
+
if (aOid && bOid && aOid === bOid)
|
|
20
|
+
return true;
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Enforces OID rules on subobjects being added to an entity.
|
|
25
|
+
* - Every sub-object must have an OID
|
|
26
|
+
* - The sub-object's OID must relate to the parent OID
|
|
27
|
+
*/
|
|
28
|
+
function enforceAssignedOid(parentOid, newObject, existingObjectOid, ctx) {
|
|
29
|
+
if (!isDiffableObject(newObject)) {
|
|
30
|
+
// nothing to do, the new value cannot have an oid as it is not
|
|
31
|
+
// a sub-object.
|
|
32
|
+
return newObject;
|
|
33
|
+
}
|
|
34
|
+
const oid = maybeGetOid(newObject);
|
|
35
|
+
if (!oid) {
|
|
36
|
+
// if merge unknown objects is enabled, we can assume the new object is the same
|
|
37
|
+
// as the existing object (if present) and use its oid. otherwise we assign a new one.
|
|
38
|
+
if (ctx.mergeUnknownObjects && existingObjectOid) {
|
|
39
|
+
assignOid(newObject, existingObjectOid);
|
|
40
|
+
}
|
|
41
|
+
// NOTE: new OID assignments are done in patchCreator.
|
|
42
|
+
// else {
|
|
43
|
+
// assignOid(
|
|
44
|
+
// newObject,
|
|
45
|
+
// createSubOid(parentOid, ctx.patchCreator.createSubId),
|
|
46
|
+
// );
|
|
47
|
+
// }
|
|
48
|
+
}
|
|
49
|
+
else if (!areOidsRelated(parentOid, oid)) {
|
|
50
|
+
// when there's any doubt, clone the whole object. false -> do not copy OIDs
|
|
51
|
+
const clone = cloneDeep(newObject, false);
|
|
52
|
+
// NOTE: new OID assignments are done in patchCreator.
|
|
53
|
+
// const cloneOid = createSubOid(parentOid, ctx.patchCreator.createSubId);
|
|
54
|
+
// assignOid(clone, cloneOid);
|
|
55
|
+
return clone;
|
|
56
|
+
}
|
|
57
|
+
return newObject;
|
|
58
|
+
}
|
|
59
|
+
function isDiffableObject(val) {
|
|
60
|
+
return isObject(val) && !isRef(val);
|
|
61
|
+
}
|
|
62
|
+
export function diffToPatches(from, to, getNow, createSubId, _, // legacy, TODO: remove
|
|
63
|
+
options) {
|
|
64
|
+
var _a;
|
|
65
|
+
const ctx = {
|
|
66
|
+
patches: [],
|
|
67
|
+
mergeUnknownObjects: options === null || options === void 0 ? void 0 : options.mergeUnknownObjects,
|
|
68
|
+
merge: (_a = options === null || options === void 0 ? void 0 : options.merge) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.defaultUndefined,
|
|
69
|
+
authz: options === null || options === void 0 ? void 0 : options.authz,
|
|
70
|
+
patchCreator: new PatchCreator(getNow, createSubId),
|
|
71
|
+
};
|
|
72
|
+
diff(from, to, ctx);
|
|
73
|
+
return ctx.patches;
|
|
74
|
+
}
|
|
75
|
+
export function diff(from, to, ctx) {
|
|
76
|
+
if (Array.isArray(from) && Array.isArray(to)) {
|
|
77
|
+
diffLists(from, to, ctx);
|
|
78
|
+
}
|
|
79
|
+
else if (Array.isArray(from) || Array.isArray(to)) {
|
|
80
|
+
throw new VerdantError(VerdantError.Code.Unexpected, undefined, 'Cannot diff between array and non-array');
|
|
81
|
+
}
|
|
82
|
+
else if (isDiffableObject(from) && isDiffableObject(to)) {
|
|
83
|
+
diffObjects(from, to, ctx);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Deep diff lists of any kind of item. Adds patches for the changes
|
|
88
|
+
* to the context patch list.
|
|
89
|
+
* @param from - the original list snapshot. must be the full snapshot, no references.
|
|
90
|
+
* @param to - the new list snapshot. must be the full snapshot, no references.
|
|
91
|
+
* @param ctx - the diff context to add patches to.
|
|
92
|
+
*/
|
|
93
|
+
export function diffLists(from, to, ctx) {
|
|
94
|
+
// from object must be registered with an OID.
|
|
95
|
+
const oid = getOid(from);
|
|
96
|
+
// this copy will be mutated to align with inserts, making things easier to compare.
|
|
97
|
+
const fromCopy = [...from];
|
|
98
|
+
// first, normalize incoming data according to OID rules. this is done early
|
|
99
|
+
// so future equality checks are according to configuration like mergeUnknownObjects.
|
|
100
|
+
// for example, if a bare (no oid) object is supplied for an item and mergeUnknownObjects
|
|
101
|
+
// is set, this will assign it the same OID as the existing item at that index, so it will
|
|
102
|
+
// pass equality checks for insertion range, etc.
|
|
103
|
+
for (let i = 0; i < to.length; i++) {
|
|
104
|
+
const value = to[i];
|
|
105
|
+
const oldValue = from[i];
|
|
106
|
+
to[i] = enforceAssignedOid(oid, value, maybeGetOid(oldValue), ctx);
|
|
107
|
+
}
|
|
108
|
+
// track whether the new list has gaps in it. a gap
|
|
109
|
+
// means we can no longer use list-push for new items.
|
|
110
|
+
let noGaps = true;
|
|
111
|
+
for (let i = 0; i < to.length; i++) {
|
|
112
|
+
const value = to[i];
|
|
113
|
+
const oldValue = fromCopy[i];
|
|
114
|
+
if (value === undefined) {
|
|
115
|
+
noGaps = false;
|
|
116
|
+
}
|
|
117
|
+
// we decide if this item is being added to the end of the list if:
|
|
118
|
+
// - there were no empty spaces before it in the new list
|
|
119
|
+
// - the index is beyond the scope of the original list.
|
|
120
|
+
// the second condition is carefully selected since it accounts for
|
|
121
|
+
// the prior list having gaps, too. length should represent the final
|
|
122
|
+
// defined item even if gaps were there previously. we don't want to
|
|
123
|
+
// accidentally 'push' into a gap, which would put the item in the wrong place.
|
|
124
|
+
const isEndOfList = noGaps && i >= fromCopy.length;
|
|
125
|
+
if (isEndOfList) {
|
|
126
|
+
// this will initialize all sub-objects in the item, too
|
|
127
|
+
ctx.patches.push(...ctx.patchCreator.createListPush(oid, value, ctx.authz));
|
|
128
|
+
}
|
|
129
|
+
else if (areTheSameIdentity(value, oldValue)) {
|
|
130
|
+
// the identity of this item hasn't changed, but we
|
|
131
|
+
// still have to diff the contents.
|
|
132
|
+
diff(oldValue, value, ctx);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
// the identity of this item has changed. we can now evaluate
|
|
136
|
+
// whether we should replace the original item or insert a new
|
|
137
|
+
// item.
|
|
138
|
+
// we can insert an item if the items which used to be at this
|
|
139
|
+
// index and the one before it are still in the list next to the
|
|
140
|
+
// new item.
|
|
141
|
+
// i.e. [0,1,2,3] -> [0,1,4,2,3] can insert 4 at index 2.
|
|
142
|
+
// theoretically we could support inserting a group of items,
|
|
143
|
+
// like [0,1,2,3] -> [0,1,4,5,6,2,3], but in practice this is much
|
|
144
|
+
// harder to detect.
|
|
145
|
+
const isPreviousItemStillThere = i === 0 || areTheSameIdentity(to[i - 1], fromCopy[i - 1]);
|
|
146
|
+
const isNextItemStillThere = i === to.length - 1 ||
|
|
147
|
+
areTheSameIdentity(to[i + 1],
|
|
148
|
+
// only "i" here because in the prior list, this was the item
|
|
149
|
+
// at the insertion point.
|
|
150
|
+
fromCopy[i]);
|
|
151
|
+
if (isPreviousItemStillThere && isNextItemStillThere) {
|
|
152
|
+
ctx.patches.push(...ctx.patchCreator.createListInsert(oid, i, value, ctx.authz));
|
|
153
|
+
// mutate from copy to mirror this insert so further comparisons
|
|
154
|
+
// are correct. we just insert an undefined.
|
|
155
|
+
fromCopy.splice(i, 0, undefined);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
// if we can't insert, we have to replace the item.
|
|
159
|
+
ctx.patches.push(...ctx.patchCreator.createListSet(oid, i, value, ctx.authz));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// remove any remaining items at the end of the array
|
|
164
|
+
const deletedItemsAtEnd = fromCopy.length - to.length;
|
|
165
|
+
if (deletedItemsAtEnd > 0) {
|
|
166
|
+
// if sub-items were objects, we need to delete them all
|
|
167
|
+
// this should recursively delete children of these items
|
|
168
|
+
// also!
|
|
169
|
+
for (let i = to.length; i < fromCopy.length; i++) {
|
|
170
|
+
const value = fromCopy[i];
|
|
171
|
+
deleteWithSubObjects(value, ctx);
|
|
172
|
+
}
|
|
173
|
+
// push the list-delete for the deleted items
|
|
174
|
+
ctx.patches.push(...ctx.patchCreator.createListDelete(oid, to.length, deletedItemsAtEnd, ctx.authz));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export function diffObjects(from, to, ctx) {
|
|
178
|
+
const oldKeys = new Set(Object.keys(from));
|
|
179
|
+
const oid = getOid(from);
|
|
180
|
+
for (const key in to) {
|
|
181
|
+
const value = to[key];
|
|
182
|
+
if (value === undefined && ctx.merge)
|
|
183
|
+
continue;
|
|
184
|
+
oldKeys.delete(key);
|
|
185
|
+
if (isOidKey(key))
|
|
186
|
+
continue; // legacy
|
|
187
|
+
const oldValue = from[key];
|
|
188
|
+
if (!isDiffableObject(value)) {
|
|
189
|
+
if (!areTheSameIdentity(value, oldValue)) {
|
|
190
|
+
// the value has changed for this key
|
|
191
|
+
// if the value is undefined (merge is off), delete instead of
|
|
192
|
+
// set.
|
|
193
|
+
if (value === undefined) {
|
|
194
|
+
ctx.patches.push(...ctx.patchCreator.createRemove(oid, key, ctx.authz));
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
ctx.patches.push(...ctx.patchCreator.createSet(oid, key, value, ctx.authz));
|
|
198
|
+
}
|
|
199
|
+
// if there was an old value at this key, delete it.
|
|
200
|
+
deleteWithSubObjects(oldValue, ctx);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
// two primitive, non-diffable values of the
|
|
204
|
+
// same identity are considered equal.
|
|
205
|
+
// we have nothing to do here.
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
// make sure incoming object has a valid OID assigned,
|
|
210
|
+
// and/or copy the existing value's OID if mergeUnknownObjects is
|
|
211
|
+
// true.
|
|
212
|
+
enforceAssignedOid(oid, value, maybeGetOid(oldValue), ctx);
|
|
213
|
+
if (!oldValue) {
|
|
214
|
+
// set the new value on this key
|
|
215
|
+
ctx.patches.push(...ctx.patchCreator.createSet(oid, key, value, ctx.authz));
|
|
216
|
+
}
|
|
217
|
+
else if (!areTheSameIdentity(value, oldValue)) {
|
|
218
|
+
// overwrite the key with the changed value
|
|
219
|
+
ctx.patches.push(...ctx.patchCreator.createSet(oid, key, value, ctx.authz));
|
|
220
|
+
// and we must also fully delete the
|
|
221
|
+
// old object and its children
|
|
222
|
+
deleteWithSubObjects(oldValue, ctx);
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
// finally, this is the case when the identity of
|
|
226
|
+
// the new and old values are the same -- we still
|
|
227
|
+
// have to diff the contents.
|
|
228
|
+
diff(oldValue, value, ctx);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// this set now only contains keys which were not in the new object
|
|
233
|
+
if (!ctx.merge) {
|
|
234
|
+
for (const key of oldKeys) {
|
|
235
|
+
if (isOidKey(key))
|
|
236
|
+
continue;
|
|
237
|
+
// remove the key entirely
|
|
238
|
+
ctx.patches.push(...ctx.patchCreator.createRemove(oid, key, ctx.authz));
|
|
239
|
+
// push the deletes for the contents of the item
|
|
240
|
+
deleteWithSubObjects(from[key], ctx);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
export function deleteWithSubObjects(root, ctx) {
|
|
245
|
+
if (!isDiffableObject(root)) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
const oid = maybeGetOid(root);
|
|
249
|
+
if (oid) {
|
|
250
|
+
ctx.patches.push(...ctx.patchCreator.createDelete(oid, ctx.authz));
|
|
251
|
+
for (const key in root) {
|
|
252
|
+
const value = root[key];
|
|
253
|
+
deleteWithSubObjects(value, ctx);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=diffing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diffing.js","sourceRoot":"","sources":["../../src/diffing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACN,cAAc,EACd,SAAS,EACT,MAAM,EACN,WAAW,GAEX,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAqBjD;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,CAAM,EAAE,CAAM;IACzC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzB,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,SAAS,kBAAkB,CAC1B,SAA2B,EAC3B,SAAc,EACd,iBAA+C,EAC/C,GAAgB;IAEhB,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC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