indexeddbshim 15.0.4 → 15.2.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.
Files changed (65) hide show
  1. package/dist/CFG.d.ts +3 -36
  2. package/dist/CFG.d.ts.map +1 -1
  3. package/dist/DOMException.d.ts +1 -1
  4. package/dist/DOMException.d.ts.map +1 -1
  5. package/dist/DOMStringList.d.ts +1 -1
  6. package/dist/DOMStringList.d.ts.map +1 -1
  7. package/dist/Event.d.ts.map +1 -1
  8. package/dist/IDBCursor.d.ts +21 -21
  9. package/dist/IDBCursor.d.ts.map +1 -1
  10. package/dist/IDBDatabase.d.ts +13 -11
  11. package/dist/IDBDatabase.d.ts.map +1 -1
  12. package/dist/IDBFactory.d.ts +4 -4
  13. package/dist/IDBFactory.d.ts.map +1 -1
  14. package/dist/IDBIndex.d.ts +17 -17
  15. package/dist/IDBIndex.d.ts.map +1 -1
  16. package/dist/IDBKeyRange.d.ts +7 -7
  17. package/dist/IDBKeyRange.d.ts.map +1 -1
  18. package/dist/IDBObjectStore.d.ts +33 -33
  19. package/dist/IDBObjectStore.d.ts.map +1 -1
  20. package/dist/IDBRequest.d.ts +6 -19
  21. package/dist/IDBRequest.d.ts.map +1 -1
  22. package/dist/IDBTransaction.d.ts +13 -13
  23. package/dist/IDBTransaction.d.ts.map +1 -1
  24. package/dist/Key.d.ts +10 -10
  25. package/dist/Key.d.ts.map +1 -1
  26. package/dist/Sca.d.ts +1 -1
  27. package/dist/Sca.d.ts.map +1 -1
  28. package/dist/UnicodeIdentifiers.d.ts +2 -2
  29. package/dist/UnicodeIdentifiers.d.ts.map +1 -1
  30. package/dist/cmp.d.ts +1 -1
  31. package/dist/indexeddbshim-Key.js +3 -2
  32. package/dist/indexeddbshim-Key.js.map +1 -1
  33. package/dist/indexeddbshim-Key.min.js +1 -1
  34. package/dist/indexeddbshim-Key.min.js.map +1 -1
  35. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +75 -63
  36. package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
  37. package/dist/indexeddbshim-UnicodeIdentifiers.js +85 -74
  38. package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
  39. package/dist/indexeddbshim-UnicodeIdentifiers.min.js +2 -2
  40. package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
  41. package/dist/indexeddbshim-node.cjs +75 -63
  42. package/dist/indexeddbshim-node.cjs.map +1 -1
  43. package/dist/indexeddbshim-noninvasive.js +85 -74
  44. package/dist/indexeddbshim-noninvasive.js.map +1 -1
  45. package/dist/indexeddbshim-noninvasive.min.js +2 -2
  46. package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
  47. package/dist/indexeddbshim.js +85 -74
  48. package/dist/indexeddbshim.js.map +1 -1
  49. package/dist/indexeddbshim.min.js +2 -2
  50. package/dist/indexeddbshim.min.js.map +1 -1
  51. package/dist/node-UnicodeIdentifiers.d.ts +1 -1
  52. package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
  53. package/dist/node.d.ts +1 -1
  54. package/dist/node.d.ts.map +1 -1
  55. package/dist/setGlobalVars.d.ts +4 -5
  56. package/dist/setGlobalVars.d.ts.map +1 -1
  57. package/dist/util.d.ts +3 -2
  58. package/dist/util.d.ts.map +1 -1
  59. package/package.json +7 -7
  60. package/src/IDBFactory.js +1 -0
  61. package/src/IDBIndex.js +18 -4
  62. package/src/IDBObjectStore.js +1 -3
  63. package/src/Key.js +2 -1
  64. package/src/util.js +2 -1
  65. package/src/Key.d.ts +0 -1
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v15.0.1 - 9/5/2024 */
1
+ /*! indexeddbshim - v15.2.0 - 9/11/2024 */
2
2
 
3
3
  'use strict';
4
4
 
@@ -1313,12 +1313,13 @@ function escapeIndexNameForSQLKeyColumn(index) {
1313
1313
  }
1314
1314
 
1315
1315
  /**
1316
+ * @todo Didn't need to escape `%`. Do we still need this escape?
1316
1317
  * @param {string} str
1317
1318
  * @returns {string}
1318
1319
  */
1319
1320
  function sqlLIKEEscape(str) {
1320
1321
  // https://www.sqlite.org/lang_expr.html#like
1321
- return sqlEscape(str).replaceAll('^', '^^');
1322
+ return str.replaceAll('^', '^^');
1322
1323
  }
1323
1324
 
1324
1325
  /**
@@ -3464,6 +3465,7 @@ function findMultiEntryMatches(keyEntry, range) {
3464
3465
  continue;
3465
3466
  }
3466
3467
  if (key.length === 1) {
3468
+ // eslint-disable-next-line sonarjs/updated-loop-counter -- Convenient
3467
3469
  key = key[0];
3468
3470
  } else {
3469
3471
  const nested = findMultiEntryMatches(key, range);
@@ -3687,7 +3689,7 @@ function generateKeyForStore(tx, store, cb, sqlFailCb) {
3687
3689
  *
3688
3690
  * @param {SQLTransaction} tx
3689
3691
  * @param {import('./IDBObjectStore.js').IDBObjectStoreFull} store
3690
- * @param {import('./Key.js').Key} key
3692
+ * @param {Key} key
3691
3693
  * @param {(num?: Integer) => void} successCb
3692
3694
  * @param {SQLFailureCallback} sqlFailCb
3693
3695
  * @returns {void}
@@ -5297,8 +5299,8 @@ var c = function () {
5297
5299
  p = [],
5298
5300
  d = [],
5299
5301
  v = !("cyclic" in u) || u.cyclic,
5300
- b = u.encapsulateObserver,
5301
- h = function finish(e) {
5302
+ m = u.encapsulateObserver,
5303
+ b = function finish(e) {
5302
5304
  var t = Object.values(f);
5303
5305
  if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
5304
5306
  if (t.length) {
@@ -5323,7 +5325,7 @@ var c = function () {
5323
5325
  });
5324
5326
  return !u.returnTypeNames && e;
5325
5327
  },
5326
- m = _async(function (t, r) {
5328
+ h = _async(function (t, r) {
5327
5329
  return _await(Promise.all(r.map(function (e) {
5328
5330
  return e[1].p;
5329
5331
  })), function (n) {
@@ -5346,11 +5348,11 @@ var c = function () {
5346
5348
  }(function () {
5347
5349
  if (s && v) return _await(d.p, function (e) {
5348
5350
  f[y] = e;
5349
- var r = m(t, o);
5351
+ var r = h(t, o);
5350
5352
  return a = !0, r;
5351
5353
  });
5352
5354
  }, function (e) {
5353
- return a ? e : (s ? f[y] = d : t = v ? d.p : d, m(t, o));
5355
+ return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
5354
5356
  });
5355
5357
  }))), function () {
5356
5358
  return t;
@@ -5368,13 +5370,13 @@ var c = function () {
5368
5370
  });
5369
5371
  },
5370
5372
  O = function _encapsulate(t, r, i, c, l, d, v) {
5371
- var h,
5372
- m = {},
5373
+ var b,
5374
+ h = {},
5373
5375
  O = _typeof(r),
5374
- _ = b ? function (n) {
5376
+ _ = m ? function (n) {
5375
5377
  var a,
5376
5378
  o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
5377
- b(Object.assign(null != n ? n : m, {
5379
+ m(Object.assign(null != n ? n : h, {
5378
5380
  keypath: t,
5379
5381
  value: r,
5380
5382
  cyclic: i,
@@ -5386,9 +5388,9 @@ var c = function () {
5386
5388
  type: o
5387
5389
  }));
5388
5390
  } : null;
5389
- if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (h = c.replaced ? r : w(t, r, c, l, !1, d, _)) !== r && (m = {
5390
- replaced: h
5391
- }) : h = r, _ && _(), h;
5391
+ if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (b = c.replaced ? r : w(t, r, c, l, !1, d, _)) !== r && (h = {
5392
+ replaced: b
5393
+ }) : b = r, _ && _(), b;
5392
5394
  if (null === r) return _ && _(), r;
5393
5395
  if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
5394
5396
  var A = y.indexOf(r);
@@ -5402,14 +5404,14 @@ var c = function () {
5402
5404
  T = isPlainObject(r),
5403
5405
  I = o(r),
5404
5406
  N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
5405
- if (N !== r ? (h = N, m = {
5407
+ if (N !== r ? (b = N, h = {
5406
5408
  replaced: N
5407
- }) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), h = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), m = {
5409
+ }) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), b = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
5408
5410
  clone: S
5409
- }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? h = r : (S = {}, c.addLength && (S.length = r.length), m = {
5411
+ }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? b = r : (S = {}, c.addLength && (S.length = r.length), h = {
5410
5412
  clone: S
5411
- }), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : h;
5412
- if (!S) return h;
5413
+ }), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : b;
5414
+ if (!S) return b;
5413
5415
  if (c.iterateIn) {
5414
5416
  var P = function _loop(n) {
5415
5417
  var o = {
@@ -5475,12 +5477,12 @@ var c = function () {
5475
5477
  i && i({
5476
5478
  replacing: !0
5477
5479
  });
5478
- var b = void 0;
5480
+ var m = void 0;
5479
5481
  if (l || !y.replaceAsync) {
5480
5482
  if (void 0 === y.replace) throw new TypeError("Missing replacer");
5481
- b = y.replace(t, r);
5482
- } else b = y.replaceAsync(t, r);
5483
- return O(e, b, v && "readonly", r, n, o, p);
5483
+ m = y.replace(t, r);
5484
+ } else m = y.replaceAsync(t, r);
5485
+ return O(e, m, v && "readonly", r, n, o, p);
5484
5486
  }
5485
5487
  }
5486
5488
  return t;
@@ -5488,9 +5490,9 @@ var c = function () {
5488
5490
  _ = O("", t, v, null != r ? r : {}, d);
5489
5491
  if (d.length) return l && u.throwOnBadSyncType ? function () {
5490
5492
  throw new TypeError("Sync method requested but async result obtained");
5491
- }() : Promise.resolve(m(_, d)).then(h);
5493
+ }() : Promise.resolve(h(_, d)).then(b);
5492
5494
  if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
5493
- return u.stringification && l ? [h(_)] : l ? h(_) : Promise.resolve(h(_));
5495
+ return u.stringification && l ? [b(_)] : l ? b(_) : Promise.resolve(b(_));
5494
5496
  }
5495
5497
  }, {
5496
5498
  key: "encapsulateSync",
@@ -5545,7 +5547,7 @@ var c = function () {
5545
5547
  return hasConstructorOf(e, s) ? void 0 : e;
5546
5548
  }
5547
5549
  var v,
5548
- b = function revivePlainObjects() {
5550
+ m = function revivePlainObjects() {
5549
5551
  var r = [];
5550
5552
  if (!u) throw new Error("Found bad `types`");
5551
5553
  if (Object.entries(u).forEach(function (e) {
@@ -5577,29 +5579,29 @@ var c = function () {
5577
5579
  c === i && (t = c);
5578
5580
  }, void 0);
5579
5581
  }();
5580
- return hasConstructorOf(b, e) ? v = b.then(function () {
5582
+ return hasConstructorOf(m, e) ? v = m.then(function () {
5581
5583
  return t;
5582
5584
  }) : (v = function _revive(t, r, a, i, c) {
5583
5585
  if (!y || "$types" !== t) {
5584
5586
  var f = u[t],
5585
5587
  v = o(r);
5586
5588
  if (v || isPlainObject(r)) {
5587
- var b = v ? new Array(r.length) : {};
5589
+ var m = v ? new Array(r.length) : {};
5588
5590
  for (n(r).forEach(function (n) {
5589
- var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : b, b, n),
5591
+ var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : m, m, n),
5590
5592
  i = function set(e) {
5591
- return hasConstructorOf(e, s) ? b[n] = void 0 : void 0 !== e && (b[n] = e), e;
5593
+ return hasConstructorOf(e, s) ? m[n] = void 0 : void 0 !== e && (m[n] = e), e;
5592
5594
  };
5593
5595
  hasConstructorOf(o, e) ? d.push(o.then(function (e) {
5594
5596
  return i(e);
5595
5597
  })) : i(o);
5596
- }), r = b; l.length;) {
5597
- var h = _slicedToArray(l[0], 4),
5598
- m = h[0],
5599
- g = h[1],
5600
- O = h[2],
5601
- w = h[3],
5602
- _ = getByKeyPath(m, g);
5598
+ }), r = m; l.length;) {
5599
+ var b = _slicedToArray(l[0], 4),
5600
+ h = b[0],
5601
+ g = b[1],
5602
+ O = b[2],
5603
+ w = b[3],
5604
+ _ = getByKeyPath(h, g);
5603
5605
  if (void 0 === _) break;
5604
5606
  O[w] = _, l.splice(0, 1);
5605
5607
  }
@@ -5751,14 +5753,14 @@ const v = {
5751
5753
  }
5752
5754
  }
5753
5755
  },
5754
- b = {
5756
+ m = {
5755
5757
  bigintObject: {
5756
5758
  test: e => "object" == typeof e && hasConstructorOf(e, BigInt),
5757
5759
  replace: String,
5758
5760
  revive: e => new Object(BigInt(e))
5759
5761
  }
5760
5762
  },
5761
- h = {
5763
+ b = {
5762
5764
  bigint: {
5763
5765
  test: e => "bigint" == typeof e,
5764
5766
  replace: String,
@@ -5773,7 +5775,7 @@ function string2arraybuffer(e) {
5773
5775
  for (let r = 0; r < e.length; r++) t[r] = e.charCodeAt(r);
5774
5776
  return t.buffer;
5775
5777
  }
5776
- const m = {
5778
+ const h = {
5777
5779
  blob: {
5778
5780
  test: e => "Blob" === toStringTag(e),
5779
5781
  replace(e) {
@@ -6196,7 +6198,7 @@ const E = {
6196
6198
  revive: e => new Number(e)
6197
6199
  }
6198
6200
  },
6199
- q = {
6201
+ Y = {
6200
6202
  regexp: {
6201
6203
  test: e => "RegExp" === toStringTag(e),
6202
6204
  replace: e => ({
@@ -6209,26 +6211,26 @@ const E = {
6209
6211
  }) => new RegExp(e, t)
6210
6212
  }
6211
6213
  },
6212
- G = {
6214
+ H = {
6213
6215
  set: {
6214
6216
  test: e => "Set" === toStringTag(e),
6215
6217
  replace: e => [...e.values()],
6216
6218
  revive: e => new Set(e)
6217
6219
  }
6218
6220
  },
6219
- H = {};
6221
+ Q = {};
6220
6222
  "function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, ...("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])].forEach(e => function create$1(e) {
6221
6223
  const t = e.name;
6222
- H[t.toLowerCase()] = {
6224
+ Q[t.toLowerCase()] = {
6223
6225
  test: e => toStringTag(e) === t,
6224
6226
  replace: e => (0 === e.byteOffset && e.byteLength === e.buffer.byteLength ? e : e.slice(0)).buffer,
6225
6227
  revive: t => "ArrayBuffer" === toStringTag(t) ? new e(t) : t
6226
6228
  };
6227
6229
  }(e));
6228
- const z = {};
6230
+ const X = {};
6229
6231
  "function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, ...("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])].forEach(e => function create(e) {
6230
6232
  const t = e.name;
6231
- z[t.toLowerCase()] = {
6233
+ X[t.toLowerCase()] = {
6232
6234
  test: e => toStringTag(e) === t,
6233
6235
  replace({
6234
6236
  buffer: e,
@@ -6264,14 +6266,14 @@ const z = {};
6264
6266
  }
6265
6267
  };
6266
6268
  }(e));
6267
- const Q = {
6269
+ const Z = {
6268
6270
  undef: {
6269
6271
  test: (e, t) => void 0 === e && (t.ownKeys || !("ownKeys" in t)),
6270
6272
  replace: () => 0,
6271
6273
  revive: () => new s()
6272
6274
  }
6273
6275
  },
6274
- X = {
6276
+ ee = {
6275
6277
  userObject: {
6276
6278
  test: e => isUserObject(e),
6277
6279
  replace: e => ({
@@ -6280,7 +6282,7 @@ const Q = {
6280
6282
  revive: e => e
6281
6283
  }
6282
6284
  },
6283
- Z = [{
6285
+ te = [{
6284
6286
  arrayNonindexKeys: {
6285
6287
  testPlainObjects: !0,
6286
6288
  test: (e, t) => !!Array.isArray(e) && (Object.keys(e).some(e => String(Number.parseInt(e)) !== e) && (t.iterateIn = "object", t.addLength = !0), !0),
@@ -6300,9 +6302,9 @@ const Q = {
6300
6302
  revive() {}
6301
6303
  }
6302
6304
  }],
6303
- ee = [K, U, F, $],
6304
- oe = [X, Q, Z, V, ee, A, q, k, B, E, C, m, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? G : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? z : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [h, b] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
6305
- ie = oe.concat({
6305
+ re = [K, U, F, $],
6306
+ ce = [ee, Z, te, V, re, A, Y, k, B, E, C, h, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? H : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? X : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [b, m] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
6307
+ se = ce.concat({
6306
6308
  checkDataCloneException: {
6307
6309
  test(e) {
6308
6310
  const t = {}.toString.call(e).slice(8, -1);
@@ -6314,7 +6316,7 @@ const Q = {
6314
6316
 
6315
6317
  // See: http://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
6316
6318
 
6317
- let typeson = new c().register(ie);
6319
+ let typeson = new c().register(se);
6318
6320
 
6319
6321
  /**
6320
6322
  * @param {(preset: import('typeson-registry').Preset) =>
@@ -6322,7 +6324,7 @@ let typeson = new c().register(ie);
6322
6324
  * @returns {void}
6323
6325
  */
6324
6326
  function register(func) {
6325
- typeson = new c().register(func(ie));
6327
+ typeson = new c().register(func(se));
6326
6328
  }
6327
6329
 
6328
6330
  /**
@@ -6778,6 +6780,7 @@ IDBIndex.__deleteIndex = function (store, index) {
6778
6780
  IDBIndex.__updateIndexList = function (store, tx, success, failure) {
6779
6781
  /** @type {IndexList} **/
6780
6782
  const indexList = {};
6783
+ // eslint-disable-next-line sonarjs/prefer-for-of -- Implement iterability?
6781
6784
  for (let i = 0; i < store.indexNames.length; i++) {
6782
6785
  const idx = store.__indexes[store.indexNames[i]];
6783
6786
  indexList[idx.name] = {
@@ -7149,8 +7152,11 @@ function executeFetchIndexData(count, unboundedDisallowed, index, hasKey, range,
7149
7152
  */
7150
7153
  check => rowKey.includes(check)) ||
7151
7154
  // More precise than our SQL
7152
- isMultiEntryMatch(/** @type {string} */
7153
- encodedKey, row[escapedIndexNameForKeyCol]))) {
7155
+ isMultiEntryMatch(
7156
+ // Added `JSON.stringify` as was having problems with
7157
+ // `JSON.stringify` encoding added to nested
7158
+ // array keys
7159
+ JSON.stringify(encodedKey).slice(1, -1), row[escapedIndexNameForKeyCol]))) {
7154
7160
  recordCount++;
7155
7161
  record = row;
7156
7162
  } else if (!hasKey && !multiChecks) {
@@ -7223,7 +7229,13 @@ function buildFetchIndexDataSQL(nullDisallowed, index, range, opType, multiCheck
7223
7229
  sql.push(')');
7224
7230
  } else if (index.multiEntry) {
7225
7231
  sql.push('AND', escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^'");
7226
- sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */encode$1(range, index.multiEntry)) + '%');
7232
+ if (Array.isArray(range)) {
7233
+ // Todo: For nesting deeper than one level, we probably need to
7234
+ // run `JSON.stringify` again
7235
+ sqlValues.push('%' + sqlLIKEEscape(JSON.stringify(/** @type {string} */encode$1(range, index.multiEntry)).slice(1, -1)) + '%');
7236
+ } else {
7237
+ sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */encode$1(range, index.multiEntry)) + '%');
7238
+ }
7227
7239
  } else {
7228
7240
  const convertedRange = convertValueToKeyRange(range, nullDisallowed);
7229
7241
  setSQLForKeyRange(convertedRange, escapeIndexNameForSQL(index.name), sql, sqlValues, true, false);
@@ -7649,7 +7661,6 @@ IDBObjectStore.prototype.__deriveKey = function (tx, value, key, success, failCb
7649
7661
  if (me.autoIncrement) {
7650
7662
  // If auto-increment and no valid primaryKey found on the keyPath, get and set the new value, and use
7651
7663
  if (key === undefined) {
7652
- // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
7653
7664
  generateKeyForStore(tx, me, function (failure, key, oldCn) {
7654
7665
  if (failure) {
7655
7666
  failCb(createDOMException('ConstraintError', 'The key generator\'s current number has reached the maximum safe integer limit'));
@@ -7663,7 +7674,6 @@ IDBObjectStore.prototype.__deriveKey = function (tx, value, key, success, failCb
7663
7674
  success(key, oldCn);
7664
7675
  }, failCb);
7665
7676
  } else {
7666
- // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
7667
7677
  possiblyUpdateKeyGenerator(tx, me, key, keyCloneThenSuccess, failCb);
7668
7678
  }
7669
7679
  // Not auto-increment
@@ -7795,6 +7805,7 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
7795
7805
  return false;
7796
7806
  });
7797
7807
  return undefined;
7808
+ // eslint-disable-next-line sonarjs/no-invariant-returns -- Convenient
7798
7809
  }).catch(function (err) {
7799
7810
  /**
7800
7811
  * @returns {void}
@@ -7805,7 +7816,6 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
7805
7816
  error(err);
7806
7817
  }
7807
7818
  if (typeof oldCn === 'number') {
7808
- // @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
7809
7819
  assignCurrentNumber(tx, me, oldCn, fail, fail);
7810
7820
  return null;
7811
7821
  }
@@ -8627,6 +8637,7 @@ Object.defineProperty(IDBDatabase, 'prototype', {
8627
8637
  writable: false
8628
8638
  });
8629
8639
 
8640
+ /* eslint-disable sonarjs/no-invariant-returns -- Convenient here */
8630
8641
  // eslint-disable-next-line no-restricted-imports -- Can be polyfilled
8631
8642
 
8632
8643
  /**
@@ -8699,6 +8710,7 @@ function processNextInConnectionQueue(name, origin = getOrigin()) {
8699
8710
  }
8700
8711
  req.addEventListener('success', removeFromQueue);
8701
8712
  req.addEventListener('error', removeFromQueue);
8713
+ req.addEventListener('blocked', removeFromQueue);
8702
8714
  cb(req);
8703
8715
  }
8704
8716
 
@@ -9510,7 +9522,7 @@ IDBFactory.prototype.deleteDatabase = function (name) {
9510
9522
  * @param {import('./Key.js').Key} key1
9511
9523
  * @param {import('./Key.js').Key} key2
9512
9524
  * @throws {TypeError}
9513
- * @returns {0|1|-1}
9525
+ * @returns {number}
9514
9526
  */
9515
9527
  IDBFactory.prototype.cmp = function (key1, key2) {
9516
9528
  if (!(this instanceof IDBFactory)) {
@@ -10514,7 +10526,7 @@ function setConfig(prop, val) {
10514
10526
  /**
10515
10527
  * @typedef {(
10516
10528
  * prop: import('./CFG.js').KeyofConfigValues
10517
- * ) => import('../src/CFG.js').ConfigValue} GetConfig
10529
+ * ) => import('./CFG.js').ConfigValue} GetConfig
10518
10530
  */
10519
10531
 
10520
10532
  /**