indexeddbshim 19.0.6 → 19.0.7
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/README.md +2 -0
- package/dist/Key.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +34 -6
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +2 -2
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +33 -5
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +34 -6
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +3 -3
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +33 -5
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +34 -6
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +3 -3
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +34 -6
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +3 -3
- package/dist/indexeddbshim.min.js.map +1 -1
- package/licenseInfo.json +8 -0
- package/package.json +87 -88
- package/src/Key.js +36 -6
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ shim will ensure consistent behavior across all browsers.
|
|
|
47
47
|
[IndexedDB plug-in](http://plugins.cordova.io/#/package/com.msopentech.websql)
|
|
48
48
|
(Not recently tested)
|
|
49
49
|
- This shim is basically an IndexedDB-to-WebSQL adapter.
|
|
50
|
+
- Tests with 100% coverage
|
|
50
51
|
- More (though most likely now outdated) details about the project at
|
|
51
52
|
<http://nparashuram.com/IndexedDBShim>
|
|
52
53
|
|
|
@@ -97,6 +98,7 @@ use the following instead:
|
|
|
97
98
|
const setGlobalVars = require('indexeddbshim');
|
|
98
99
|
|
|
99
100
|
globalThis.window = globalThis; // We'll allow ourselves to use `window.indexedDB` or `indexedDB` as a global
|
|
101
|
+
globalThis.location = {origin: 'mysite.com'}; // Set `origin` to anything besides the string `"null"`
|
|
100
102
|
setGlobalVars(); // See signature below
|
|
101
103
|
```
|
|
102
104
|
|
package/dist/Key.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Key.d.ts","sourceRoot":"","sources":["../src/Key.js"],"names":[],"mappings":"oBAuba,MAAM;;;;;
|
|
1
|
+
{"version":3,"file":"Key.d.ts","sourceRoot":"","sources":["../src/Key.js"],"names":[],"mappings":"oBAuba,MAAM;;;;;aAwTL,OAAO;;6CAIR,yBAAyB,EAAE;wCAI3B,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,MAAM,GAAC,8BAA8B;;YAKjE,yBAAyB;;;sBAyR1B,MAAM;yCAKR,OAAO,KACL,IAAI;6CAKN,YAAY,GAAC,KAAK,KAChB,IAAI;yCAgFN,SAAS,GAAC,IAAI,2DAGZ,IAAI;8BA3lCJ,MAAM,CAAC,UAAU,GAAC,QAAQ;2BAI1B,eAAe,GAAC,WAAW;sBAI3B,QAAQ,GAAC,MAAM,GAAC,QAAQ,GAAC,QAAQ,GAAC,OAAO;gCAIzC,OAAO,qDAAqD,EAAE,OAAO;oBAIrE,OAAO;kBAIP,WAAW;2BAIX,OAAO,EAAE;sBAGT,MAAM,GAAC,YAAY;;;;;UAKlB,OAAO,GAAC,KAAK,GAAC,MAAM,GAAC,WAAW,GAAC,SAAS,GAAC,QAAQ,GAAC,QAAQ,GACzE,UAAc,GAAC,QAAQ;YACV,KAAK;;;;iCAON,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,WAAW;6BAG9B,SAAS,EAAE;wBAGX,kBAAkB,GAAC,cAAc;AAo6B9C;;;;;GAKG;AACH,4BAJW,KAAK,YACL,OAAO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,SACH,OAAO,kBAAkB,EAAE,eAAe,gBAC1C,OAAO,GACL,OAAO,CA+BnB;AAgBD;;;;;GAKG;AACH,gDAJW,GAAG,SACH,OAAO,kBAAkB,EAAE,eAAe,GAAC,SAAS,GAClD,GAAG,EAAE,CA+BjB;AA2HD;;;;;;;;GAQG;AACH,wCAPW,iBAAiB,SACjB,OAAO,qBAAqB,EAAE,kBAAkB,OAChD,OAAO,aACP,qBAAqB,UACrB,kBAAkB,GAChB,IAAI,CAYhB;AA6BD;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,wCANW,iBAAiB,SACjB,OAAO,qBAAqB,EAAE,kBAAkB,MAChD,mBAAmB,aACnB,kBAAkB,GAChB,IAAI,CAmBhB;AAKD;;;;;;;;GAQG;AACH,+CAPW,iBAAiB,SACjB,OAAO,qBAAqB,EAAE,kBAAkB,OAChD,GAAG,aACH,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,IAAI,aACvB,kBAAkB,GAChB,IAAI,CA6BhB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim - v19.0.
|
|
1
|
+
/*! indexeddbshim - v19.0.7 - 9/23/2026 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -1322,6 +1322,33 @@
|
|
|
1322
1322
|
return convertValueToKeyValueDecoded(input, null, true, true);
|
|
1323
1323
|
}
|
|
1324
1324
|
|
|
1325
|
+
/**
|
|
1326
|
+
* @param {BufferSource|ArrayBufferLike} buffer
|
|
1327
|
+
* @returns {boolean}
|
|
1328
|
+
*/
|
|
1329
|
+
function isBufferDetached(buffer) {
|
|
1330
|
+
// Use the standard property if available
|
|
1331
|
+
// @ts-expect-error - More recent API
|
|
1332
|
+
if (typeof buffer.detached === 'boolean') {
|
|
1333
|
+
// @ts-expect-error - More recent API
|
|
1334
|
+
return buffer.detached;
|
|
1335
|
+
}
|
|
1336
|
+
/* c8 ignore next 14 -- Older browsers */
|
|
1337
|
+
|
|
1338
|
+
// Fallback check via byteLength and constructor test
|
|
1339
|
+
if (buffer.byteLength !== 0) {
|
|
1340
|
+
return false;
|
|
1341
|
+
}
|
|
1342
|
+
try {
|
|
1343
|
+
// @ts-expect-error Ok
|
|
1344
|
+
// eslint-disable-next-line no-new -- Throwaway
|
|
1345
|
+
new Uint8Array(buffer);
|
|
1346
|
+
return false;
|
|
1347
|
+
} catch (_unused) {
|
|
1348
|
+
return true;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1325
1352
|
/**
|
|
1326
1353
|
*
|
|
1327
1354
|
* @param {BufferSource} O
|
|
@@ -1334,15 +1361,16 @@
|
|
|
1334
1361
|
var length;
|
|
1335
1362
|
if (ArrayBuffer.isView(O)) {
|
|
1336
1363
|
// Has [[ViewedArrayBuffer]] internal slot
|
|
1337
|
-
var arrayBuffer = O.buffer;
|
|
1338
|
-
if (arrayBuffer === undefined) {
|
|
1339
|
-
throw new TypeError('Could not copy the bytes held by a buffer source as the buffer was undefined.');
|
|
1340
|
-
}
|
|
1341
1364
|
offset = O.byteOffset; // [[ByteOffset]] (will also throw as desired if detached)
|
|
1342
1365
|
length = O.byteLength; // [[ByteLength]] (will also throw as desired if detached)
|
|
1343
1366
|
} else {
|
|
1344
1367
|
length = O.byteLength; // [[ArrayBufferByteLength]] on ArrayBuffer (will also throw as desired if detached)
|
|
1345
1368
|
}
|
|
1369
|
+
var arrayBuffer = ArrayBuffer.isView(O) ? O.buffer : O;
|
|
1370
|
+
if (isBufferDetached(arrayBuffer)) {
|
|
1371
|
+
throw new TypeError('Could not copy the bytes held by a buffer source as the buffer was detached.');
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1346
1374
|
// const octets = new Uint8Array(input);
|
|
1347
1375
|
// const octets = types.binary.decode(types.binary.encode(input));
|
|
1348
1376
|
return new Uint8Array(
|
|
@@ -1414,7 +1442,7 @@
|
|
|
1414
1442
|
var octets;
|
|
1415
1443
|
try {
|
|
1416
1444
|
octets = getCopyBytesHeldByBufferSource(/** @type {BufferSource} */input);
|
|
1417
|
-
} catch (
|
|
1445
|
+
} catch (_unused2) {
|
|
1418
1446
|
return {
|
|
1419
1447
|
type: type,
|
|
1420
1448
|
invalid: true,
|