dexie 4.0.9 → 4.0.10

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/dexie.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 4.0.9, Mon Oct 21 2024
7
+ * Version 4.0.10, Fri Nov 15 2024
8
8
  *
9
9
  * https://dexie.org
10
10
  *
@@ -1146,7 +1146,7 @@ function tempTransaction(db, mode, storeNames, fn) {
1146
1146
  }
1147
1147
  }
1148
1148
 
1149
- var DEXIE_VERSION = '4.0.9';
1149
+ var DEXIE_VERSION = '4.0.10';
1150
1150
  var maxString = String.fromCharCode(65535);
1151
1151
  var minKey = -Infinity;
1152
1152
  var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -2136,7 +2136,16 @@ var Collection = (function () {
2136
2136
  }
2137
2137
  var coreTable = ctx.table.core;
2138
2138
  var _a = coreTable.schema.primaryKey, outbound = _a.outbound, extractKey = _a.extractKey;
2139
- var limit = _this.db._options.modifyChunkSize || 200;
2139
+ var limit = 200;
2140
+ var modifyChunkSize = _this.db._options.modifyChunkSize;
2141
+ if (modifyChunkSize) {
2142
+ if (typeof modifyChunkSize == 'object') {
2143
+ limit = modifyChunkSize[coreTable.name] || modifyChunkSize['*'] || 200;
2144
+ }
2145
+ else {
2146
+ limit = modifyChunkSize;
2147
+ }
2148
+ }
2140
2149
  var totalFailures = [];
2141
2150
  var successCount = 0;
2142
2151
  var failedKeys = [];
@@ -4673,7 +4682,9 @@ var observabilityMiddleware = {
4673
4682
  indexesWithAutoIncPK.forEach(function (idx) {
4674
4683
  var idxVals = req.values.map(function (v) { return idx.extractKey(v); });
4675
4684
  var pkPos = idx.keyPath.findIndex(function (prop) { return prop === primaryKey.keyPath; });
4676
- res.results.forEach(function (pk) { return idxVals[pkPos] = pk; });
4685
+ for (var i = 0, len = res.results.length; i < len; ++i) {
4686
+ idxVals[i][pkPos] = res.results[i];
4687
+ }
4677
4688
  getRangeSet(idx.name).addKeys(idxVals);
4678
4689
  });
4679
4690
  }