indexeddbshim 17.4.1 → 17.4.2
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/indexeddbshim-Key.js +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +6 -10
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +6 -10
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +6 -10
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +6 -10
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +1 -1
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +6 -10
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +1 -1
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/setGlobalVars.d.ts +4 -4
- package/dist/setGlobalVars.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/setGlobalVars.js +5 -6
package/dist/indexeddbshim.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim - v17.4.
|
|
1
|
+
/*! indexeddbshim - v17.4.2 - 8/29/2026 */
|
|
2
2
|
|
|
3
3
|
(function (factory) {
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -13754,7 +13754,7 @@
|
|
|
13754
13754
|
*/
|
|
13755
13755
|
|
|
13756
13756
|
/**
|
|
13757
|
-
* @typedef {(typeof globalThis|
|
|
13757
|
+
* @typedef {(typeof globalThis|Record<string, unknown>) & {
|
|
13758
13758
|
* indexedDB?: Partial<IDBFactory>,
|
|
13759
13759
|
* IDBFactory: typeof IDBFactory,
|
|
13760
13760
|
* IDBOpenDBRequest: typeof IDBOpenDBRequest,
|
|
@@ -13770,12 +13770,13 @@
|
|
|
13770
13770
|
|
|
13771
13771
|
/**
|
|
13772
13772
|
*
|
|
13773
|
-
* @param {
|
|
13773
|
+
* @param {typeof globalThis | Record<string, unknown>} [idb]
|
|
13774
13774
|
* @param {Partial<import('./CFG.js').ConfigValues>} [initialConfig]
|
|
13775
13775
|
* @returns {ShimmedObject}
|
|
13776
13776
|
*/
|
|
13777
13777
|
function setGlobalVars(idb, initialConfig) {
|
|
13778
|
-
var IDB =
|
|
13778
|
+
var IDB = /** @type {ShimmedObject & {[key: string]: unknown}} */
|
|
13779
|
+
/** @type {unknown} */globalThis || {};
|
|
13779
13780
|
/**
|
|
13780
13781
|
* @typedef {any} AnyClass
|
|
13781
13782
|
*/
|
|
@@ -13797,15 +13798,12 @@
|
|
|
13797
13798
|
if (!propDesc || !Object.defineProperty) {
|
|
13798
13799
|
try {
|
|
13799
13800
|
// Try setting the property. This will fail if the property is read-only.
|
|
13800
|
-
// @ts-expect-error It's ok
|
|
13801
13801
|
IDB[name] = value;
|
|
13802
13802
|
} catch (e) {
|
|
13803
13803
|
console.log(e);
|
|
13804
13804
|
}
|
|
13805
13805
|
}
|
|
13806
|
-
if (
|
|
13807
|
-
// @ts-expect-error It's ok
|
|
13808
|
-
IDB[name] !== value && Object.defineProperty) {
|
|
13806
|
+
if (IDB[name] !== value && Object.defineProperty) {
|
|
13809
13807
|
// Setting a read-only property failed, so try re-defining the property
|
|
13810
13808
|
try {
|
|
13811
13809
|
var desc = propDesc || {};
|
|
@@ -13830,8 +13828,6 @@
|
|
|
13830
13828
|
// get here since no WebSQL to use for shimming)
|
|
13831
13829
|
}
|
|
13832
13830
|
}
|
|
13833
|
-
|
|
13834
|
-
// @ts-expect-error It's ok
|
|
13835
13831
|
if (IDB[name] !== value) {
|
|
13836
13832
|
if (typeof console !== 'undefined' && console.warn) {
|
|
13837
13833
|
console.warn('Unable to shim ' + name);
|