indexeddbshim 17.4.0 → 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/IDBFactory.d.ts +4 -4
- package/dist/IDBFactory.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +10 -14
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +8 -12
- 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 +10 -14
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +8 -12
- 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 +8 -12
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +1 -1
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/node-UnicodeIdentifiers.d.ts +3 -3
- package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
- package/dist/node.d.ts +3 -3
- package/dist/node.d.ts.map +1 -1
- package/dist/setGlobalVars.d.ts +4 -4
- package/dist/setGlobalVars.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/IDBFactory.js +2 -2
- package/src/node-UnicodeIdentifiers.js +2 -2
- package/src/node.js +2 -2
- package/src/setGlobalVars.js +5 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim - v17.4.
|
|
1
|
+
/*! indexeddbshim - v17.4.2 - 8/29/2026 */
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -11150,8 +11150,8 @@ IDBFactory.prototype.cmp = function (key1, key2) {
|
|
|
11150
11150
|
* @see https://github.com/w3c/IndexedDB/pull/240/files
|
|
11151
11151
|
* @this {IDBFactoryFull}
|
|
11152
11152
|
* @returns {Promise<{
|
|
11153
|
-
* name
|
|
11154
|
-
* version
|
|
11153
|
+
* name?: string,
|
|
11154
|
+
* version?: Integer
|
|
11155
11155
|
* }[]>}
|
|
11156
11156
|
*/
|
|
11157
11157
|
IDBFactory.prototype.databases = function () {
|
|
@@ -12691,7 +12691,7 @@ function setConfig(prop, val) {
|
|
|
12691
12691
|
*/
|
|
12692
12692
|
|
|
12693
12693
|
/**
|
|
12694
|
-
* @typedef {(typeof globalThis|
|
|
12694
|
+
* @typedef {(typeof globalThis|Record<string, unknown>) & {
|
|
12695
12695
|
* indexedDB?: Partial<IDBFactory>,
|
|
12696
12696
|
* IDBFactory: typeof IDBFactory,
|
|
12697
12697
|
* IDBOpenDBRequest: typeof IDBOpenDBRequest,
|
|
@@ -12707,7 +12707,7 @@ function setConfig(prop, val) {
|
|
|
12707
12707
|
|
|
12708
12708
|
/**
|
|
12709
12709
|
*
|
|
12710
|
-
* @param {
|
|
12710
|
+
* @param {typeof globalThis | Record<string, unknown>} [idb]
|
|
12711
12711
|
* @param {Partial<import('./CFG.js').ConfigValues>} [initialConfig]
|
|
12712
12712
|
* @returns {ShimmedObject}
|
|
12713
12713
|
*/
|
|
@@ -12715,7 +12715,8 @@ function setGlobalVars(idb, initialConfig) {
|
|
|
12715
12715
|
if (initialConfig) {
|
|
12716
12716
|
setConfig(initialConfig);
|
|
12717
12717
|
}
|
|
12718
|
-
const IDB =
|
|
12718
|
+
const IDB = /** @type {ShimmedObject & {[key: string]: unknown}} */
|
|
12719
|
+
/** @type {unknown} */idb || globalThis || {};
|
|
12719
12720
|
/**
|
|
12720
12721
|
* @typedef {any} AnyClass
|
|
12721
12722
|
*/
|
|
@@ -12737,15 +12738,12 @@ function setGlobalVars(idb, initialConfig) {
|
|
|
12737
12738
|
if (!propDesc || !Object.defineProperty) {
|
|
12738
12739
|
try {
|
|
12739
12740
|
// Try setting the property. This will fail if the property is read-only.
|
|
12740
|
-
// @ts-expect-error It's ok
|
|
12741
12741
|
IDB[name] = value;
|
|
12742
12742
|
} catch (e) {
|
|
12743
12743
|
console.log(e);
|
|
12744
12744
|
}
|
|
12745
12745
|
}
|
|
12746
|
-
if (
|
|
12747
|
-
// @ts-expect-error It's ok
|
|
12748
|
-
IDB[name] !== value && Object.defineProperty) {
|
|
12746
|
+
if (IDB[name] !== value && Object.defineProperty) {
|
|
12749
12747
|
// Setting a read-only property failed, so try re-defining the property
|
|
12750
12748
|
try {
|
|
12751
12749
|
let desc = propDesc || {};
|
|
@@ -12775,8 +12773,6 @@ function setGlobalVars(idb, initialConfig) {
|
|
|
12775
12773
|
// get here since no WebSQL to use for shimming)
|
|
12776
12774
|
}
|
|
12777
12775
|
}
|
|
12778
|
-
|
|
12779
|
-
// @ts-expect-error It's ok
|
|
12780
12776
|
if (IDB[name] !== value) {
|
|
12781
12777
|
if (typeof console !== 'undefined' && console.warn) {
|
|
12782
12778
|
console.warn('Unable to shim ' + name);
|
|
@@ -15026,8 +15022,8 @@ CFG.win = {
|
|
|
15026
15022
|
};
|
|
15027
15023
|
|
|
15028
15024
|
/**
|
|
15029
|
-
* @param {import('./setGlobalVars.js').ShimmedObject} idb
|
|
15030
|
-
* @param {Partial<import('./CFG.js').ConfigValues>} initialConfig
|
|
15025
|
+
* @param {import('./setGlobalVars.js').ShimmedObject} [idb]
|
|
15026
|
+
* @param {Partial<import('./CFG.js').ConfigValues>} [initialConfig]
|
|
15031
15027
|
* @returns {import('./setGlobalVars.js').ShimmedObject|Window}
|
|
15032
15028
|
*/
|
|
15033
15029
|
const __setGlobalVars = function (idb, initialConfig = {}) {
|