@omegup/msync 0.1.13 → 0.1.14
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/index.esm.js +9 -8
- package/index.js +9 -8
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -829,12 +829,10 @@ const getWhenMatchedForMerge = (whenNotMatched) => {
|
|
|
829
829
|
};
|
|
830
830
|
const getWhenMatched = (whenNotMatched) => {
|
|
831
831
|
const orNull = (e) => whenNotMatched === 'discard' ? $ifNull(e, nil) : e;
|
|
832
|
-
const preMergeOld =
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
}))
|
|
837
|
-
: root().of('old').expr();
|
|
832
|
+
const preMergeOld = mergeObjects(root().of('old').expr(), field({
|
|
833
|
+
deletedAt: ['deletedAt', orNull(root().of('old').of('deletedAt').expr())],
|
|
834
|
+
touchedAt: ['touchedAt', root().of('merged').of('touchedAt').expr()],
|
|
835
|
+
}));
|
|
838
836
|
const same = eq(preMergeOld)(root().of('merged').expr());
|
|
839
837
|
return link().with($replaceWith_(ite(same, root().of('old').expr(), root().of('merged').expr()))).stages;
|
|
840
838
|
};
|
|
@@ -918,8 +916,11 @@ const subMerge = (args, out, gid, extra, idPrefix, first) => {
|
|
|
918
916
|
...F1,
|
|
919
917
|
...F2,
|
|
920
918
|
};
|
|
921
|
-
const
|
|
922
|
-
|
|
919
|
+
const addTSAndExtra = {
|
|
920
|
+
...mapExact0(e, to),
|
|
921
|
+
touchedAt: ['touchedAt', to(current)],
|
|
922
|
+
};
|
|
923
|
+
const updater = set()(addTSAndExtra);
|
|
923
924
|
const whenMatched = getWhenMatched(out.whenNotMatched);
|
|
924
925
|
return link()
|
|
925
926
|
.with($set_(set()(addExtraAndMerge)))
|
package/index.js
CHANGED
|
@@ -831,12 +831,10 @@ const getWhenMatchedForMerge = (whenNotMatched) => {
|
|
|
831
831
|
};
|
|
832
832
|
const getWhenMatched = (whenNotMatched) => {
|
|
833
833
|
const orNull = (e) => whenNotMatched === 'discard' ? $ifNull(e, nil) : e;
|
|
834
|
-
const preMergeOld =
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
}))
|
|
839
|
-
: root().of('old').expr();
|
|
834
|
+
const preMergeOld = mergeObjects(root().of('old').expr(), field({
|
|
835
|
+
deletedAt: ['deletedAt', orNull(root().of('old').of('deletedAt').expr())],
|
|
836
|
+
touchedAt: ['touchedAt', root().of('merged').of('touchedAt').expr()],
|
|
837
|
+
}));
|
|
840
838
|
const same = eq(preMergeOld)(root().of('merged').expr());
|
|
841
839
|
return link().with($replaceWith_(ite(same, root().of('old').expr(), root().of('merged').expr()))).stages;
|
|
842
840
|
};
|
|
@@ -920,8 +918,11 @@ const subMerge = (args, out, gid, extra, idPrefix, first) => {
|
|
|
920
918
|
...F1,
|
|
921
919
|
...F2,
|
|
922
920
|
};
|
|
923
|
-
const
|
|
924
|
-
|
|
921
|
+
const addTSAndExtra = {
|
|
922
|
+
...mapExact0(e, to),
|
|
923
|
+
touchedAt: ['touchedAt', to(current)],
|
|
924
|
+
};
|
|
925
|
+
const updater = set()(addTSAndExtra);
|
|
925
926
|
const whenMatched = getWhenMatched(out.whenNotMatched);
|
|
926
927
|
return link()
|
|
927
928
|
.with($set_(set()(addExtraAndMerge)))
|