dexie-cloud-addon 4.0.1-beta.41 → 4.0.1-beta.42

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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.1-beta.41, Sat Jul 01 2023
11
+ * Version 4.0.1-beta.42, Sat Jul 01 2023
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -2757,7 +2757,10 @@
2757
2757
  }));
2758
2758
  })));
2759
2759
  // Sort by time to get a true order of the operations (between tables)
2760
- const sorted = flatten(allMutsOnTables).sort((a, b) => a.mut.ts - b.mut.ts);
2760
+ const sorted = flatten(allMutsOnTables).sort((a, b) => a.mut.txid === b.mut.txid
2761
+ ? a.mut.opNo - b.mut.opNo // Within same transaction, sort by opNo
2762
+ : a.mut.ts - b.mut.ts // Different transactions - sort by timestamp when mutation resolved
2763
+ );
2761
2764
  const result = [];
2762
2765
  let currentEntry = null;
2763
2766
  let currentTxid = null;
@@ -6089,7 +6092,7 @@
6089
6092
  });
6090
6093
  const syncComplete = new rxjs.Subject();
6091
6094
  dexie.cloud = {
6092
- version: '4.0.1-beta.41',
6095
+ version: '4.0.1-beta.42',
6093
6096
  options: Object.assign({}, DEFAULT_OPTIONS),
6094
6097
  schema: null,
6095
6098
  get currentUserId() {
@@ -6350,7 +6353,7 @@
6350
6353
  });
6351
6354
  }
6352
6355
  }
6353
- dexieCloud.version = '4.0.1-beta.41';
6356
+ dexieCloud.version = '4.0.1-beta.42';
6354
6357
  Dexie__default["default"].Cloud = dexieCloud;
6355
6358
 
6356
6359
  exports["default"] = dexieCloud;