update deps, move idb-bridge to node16 module resolution
This commit is contained in:
parent
7b40a9f415
commit
eb5b075c01
@ -20,12 +20,12 @@
|
|||||||
"@rollup/plugin-commonjs": "^22.0.2",
|
"@rollup/plugin-commonjs": "^22.0.2",
|
||||||
"@rollup/plugin-json": "^4.1.0",
|
"@rollup/plugin-json": "^4.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||||
"ava": "^4.0.1",
|
"ava": "^4.3.3",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.79.0",
|
"rollup": "^2.79.0",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gnu-taler/taler-util": "workspace:*",
|
"@gnu-taler/taler-util": "workspace:*",
|
||||||
@ -33,7 +33,7 @@
|
|||||||
"fflate": "^0.7.3",
|
"fflate": "^0.7.3",
|
||||||
"hash-wasm": "^4.9.0",
|
"hash-wasm": "^4.9.0",
|
||||||
"node-fetch": "^3.2.0",
|
"node-fetch": "^3.2.0",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.4.0"
|
||||||
},
|
},
|
||||||
"ava": {
|
"ava": {
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
"jssha": "^3.2.0",
|
"jssha": "^3.2.0",
|
||||||
"mocha": "^9.2.0",
|
"mocha": "^9.2.0",
|
||||||
"sass": "1.32.13",
|
"sass": "1.32.13",
|
||||||
"typescript": "^4.8.2",
|
"typescript": "^4.8.4",
|
||||||
"ws": "7.4.5"
|
"ws": "7.4.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,20 +16,25 @@
|
|||||||
"clean": "rimraf dist lib tsconfig.tsbuildinfo",
|
"clean": "rimraf dist lib tsconfig.tsbuildinfo",
|
||||||
"pretty": "prettier --write src"
|
"pretty": "prettier --write src"
|
||||||
},
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"default": "./lib/index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^22.0.2",
|
"@rollup/plugin-commonjs": "^22.0.2",
|
||||||
"@rollup/plugin-json": "^4.1.0",
|
"@rollup/plugin-json": "^4.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||||
"@types/node": "^17.0.17",
|
"@types/node": "^18.8.5",
|
||||||
"ava": "^4.0.1",
|
"ava": "^4.3.3",
|
||||||
"esm": "^3.2.25",
|
"esm": "^3.2.25",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.79.0",
|
"rollup": "^2.79.0",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.4.0"
|
||||||
},
|
},
|
||||||
"ava": {
|
"ava": {
|
||||||
"require": [
|
"require": [
|
||||||
|
@ -1,26 +1,17 @@
|
|||||||
import {
|
import {
|
||||||
DatabaseTransaction,
|
|
||||||
RecordGetResponse,
|
|
||||||
RecordGetRequest,
|
|
||||||
Schema,
|
|
||||||
Backend,
|
Backend,
|
||||||
|
DatabaseConnection,
|
||||||
|
DatabaseTransaction,
|
||||||
|
IndexProperties,
|
||||||
|
ObjectStoreProperties,
|
||||||
|
RecordGetRequest,
|
||||||
|
RecordGetResponse,
|
||||||
RecordStoreRequest,
|
RecordStoreRequest,
|
||||||
RecordStoreResponse,
|
RecordStoreResponse,
|
||||||
DatabaseConnection,
|
|
||||||
ObjectStoreProperties,
|
|
||||||
StoreLevel,
|
|
||||||
ResultLevel,
|
ResultLevel,
|
||||||
IndexProperties,
|
Schema,
|
||||||
} from "./backend-interface";
|
StoreLevel,
|
||||||
import { Listener } from "./util/FakeEventTarget";
|
} from "./backend-interface.js";
|
||||||
import {
|
|
||||||
DatabaseDump,
|
|
||||||
ObjectStoreDump,
|
|
||||||
IndexRecord,
|
|
||||||
ObjectStoreRecord,
|
|
||||||
MemoryBackendDump,
|
|
||||||
} from "./MemoryBackend";
|
|
||||||
import { Event, IDBKeyRange } from "./idbtypes";
|
|
||||||
import {
|
import {
|
||||||
BridgeIDBCursor,
|
BridgeIDBCursor,
|
||||||
BridgeIDBDatabase,
|
BridgeIDBDatabase,
|
||||||
@ -34,8 +25,21 @@ import {
|
|||||||
BridgeIDBVersionChangeEvent,
|
BridgeIDBVersionChangeEvent,
|
||||||
DatabaseList,
|
DatabaseList,
|
||||||
RequestObj,
|
RequestObj,
|
||||||
} from "./bridge-idb";
|
} from "./bridge-idb.js";
|
||||||
|
import { Event } from "./idbtypes.js";
|
||||||
|
import {
|
||||||
|
DatabaseDump,
|
||||||
|
IndexRecord,
|
||||||
|
MemoryBackendDump,
|
||||||
|
ObjectStoreDump,
|
||||||
|
ObjectStoreRecord,
|
||||||
|
} from "./MemoryBackend.js";
|
||||||
|
import { Listener } from "./util/FakeEventTarget.js";
|
||||||
|
|
||||||
|
export * from "./idbtypes.js";
|
||||||
|
export { MemoryBackend } from "./MemoryBackend.js";
|
||||||
|
export type { AccessStats } from "./MemoryBackend.js";
|
||||||
|
export * from "./util/structuredClone.js";
|
||||||
export {
|
export {
|
||||||
BridgeIDBCursor,
|
BridgeIDBCursor,
|
||||||
BridgeIDBDatabase,
|
BridgeIDBDatabase,
|
||||||
@ -71,9 +75,6 @@ export type {
|
|||||||
Listener,
|
Listener,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { MemoryBackend } from "./MemoryBackend";
|
|
||||||
export type { AccessStats } from "./MemoryBackend";
|
|
||||||
|
|
||||||
// globalThis polyfill, see https://mathiasbynens.be/notes/globalthis
|
// globalThis polyfill, see https://mathiasbynens.be/notes/globalthis
|
||||||
(function () {
|
(function () {
|
||||||
if (typeof globalThis === "object") return;
|
if (typeof globalThis === "object") return;
|
||||||
@ -123,7 +124,3 @@ export function shimIndexedDB(factory: BridgeIDBFactory): void {
|
|||||||
g.IDBTransaction = BridgeIDBTransaction;
|
g.IDBTransaction = BridgeIDBTransaction;
|
||||||
g.IDBVersionChangeEvent = BridgeIDBVersionChangeEvent;
|
g.IDBVersionChangeEvent = BridgeIDBVersionChangeEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
export * from "./idbtypes";
|
|
||||||
|
|
||||||
export * from "./util/structuredClone";
|
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
// B+ tree by David Piepgrass. License: MIT
|
// B+ tree by David Piepgrass. License: MIT
|
||||||
import { ISortedMap, ISortedMapF } from "./interfaces";
|
import { ISortedMap, ISortedMapF } from "./interfaces.js";
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
ISetSource,
|
|
||||||
ISetSink,
|
|
||||||
ISet,
|
|
||||||
ISetF,
|
|
||||||
ISortedSetSource,
|
|
||||||
ISortedSet,
|
|
||||||
ISortedSetF,
|
|
||||||
IMapSource,
|
|
||||||
IMapSink,
|
|
||||||
IMap,
|
IMap,
|
||||||
IMapF,
|
IMapF,
|
||||||
ISortedMapSource,
|
IMapSink,
|
||||||
|
IMapSource,
|
||||||
|
ISet,
|
||||||
|
ISetF,
|
||||||
|
ISetSink,
|
||||||
|
ISetSource,
|
||||||
ISortedMap,
|
ISortedMap,
|
||||||
ISortedMapF,
|
ISortedMapF,
|
||||||
} from "./interfaces";
|
ISortedMapSource,
|
||||||
|
ISortedSet,
|
||||||
|
ISortedSetF,
|
||||||
|
ISortedSetSource,
|
||||||
|
} from "./interfaces.js";
|
||||||
|
|
||||||
export type EditRangeResult<V, R = number> = {
|
export type EditRangeResult<V, R = number> = {
|
||||||
value?: V;
|
value?: V;
|
||||||
@ -59,15 +59,15 @@ export type DefaultComparable =
|
|||||||
| undefined
|
| undefined
|
||||||
| (number | string)[]
|
| (number | string)[]
|
||||||
| {
|
| {
|
||||||
valueOf: () =>
|
valueOf: () =>
|
||||||
| number
|
| number
|
||||||
| string
|
| string
|
||||||
| Date
|
| Date
|
||||||
| boolean
|
| boolean
|
||||||
| null
|
| null
|
||||||
| undefined
|
| undefined
|
||||||
| (number | string)[];
|
| (number | string)[];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares DefaultComparables to form a strict partial ordering.
|
* Compares DefaultComparables to form a strict partial ordering.
|
||||||
@ -216,7 +216,8 @@ export function simpleComparator(a: any, b: any): number {
|
|||||||
* @author David Piepgrass
|
* @author David Piepgrass
|
||||||
*/
|
*/
|
||||||
export default class BTree<K = any, V = any>
|
export default class BTree<K = any, V = any>
|
||||||
implements ISortedMapF<K, V>, ISortedMap<K, V> {
|
implements ISortedMapF<K, V>, ISortedMap<K, V>
|
||||||
|
{
|
||||||
private _root: BNode<K, V> = EmptyLeaf as BNode<K, V>;
|
private _root: BNode<K, V> = EmptyLeaf as BNode<K, V>;
|
||||||
_size: number = 0;
|
_size: number = 0;
|
||||||
_maxNodeSize: number;
|
_maxNodeSize: number;
|
||||||
@ -242,7 +243,7 @@ export default class BTree<K = any, V = any>
|
|||||||
) {
|
) {
|
||||||
this._maxNodeSize = maxNodeSize! >= 4 ? Math.min(maxNodeSize!, 256) : 32;
|
this._maxNodeSize = maxNodeSize! >= 4 ? Math.min(maxNodeSize!, 256) : 32;
|
||||||
this._compare =
|
this._compare =
|
||||||
compare || ((defaultComparator as any) as (a: K, b: K) => number);
|
compare || (defaultComparator as any as (a: K, b: K) => number);
|
||||||
if (entries) this.setPairs(entries);
|
if (entries) this.setPairs(entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,7 +464,7 @@ export default class BTree<K = any, V = any>
|
|||||||
nu.editAll((k, v, i) => {
|
nu.editAll((k, v, i) => {
|
||||||
return (tmp.value = callback(v, k, i)), tmp as any;
|
return (tmp.value = callback(v, k, i)), tmp as any;
|
||||||
});
|
});
|
||||||
return (nu as any) as BTree<K, R>;
|
return nu as any as BTree<K, R>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Performs a reduce operation like the `reduce` method of `Array`.
|
/** Performs a reduce operation like the `reduce` method of `Array`.
|
||||||
@ -534,7 +535,7 @@ export default class BTree<K = any, V = any>
|
|||||||
: leaf.indexOf(lowestKey, 0, this._compare) - 1;
|
: leaf.indexOf(lowestKey, 0, this._compare) - 1;
|
||||||
|
|
||||||
return iterator<[K, V]>(() => {
|
return iterator<[K, V]>(() => {
|
||||||
jump: for (; ;) {
|
jump: for (;;) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 0:
|
case 0:
|
||||||
if (++i < leaf.keys.length)
|
if (++i < leaf.keys.length)
|
||||||
@ -550,7 +551,7 @@ export default class BTree<K = any, V = any>
|
|||||||
state = 2;
|
state = 2;
|
||||||
case 2:
|
case 2:
|
||||||
// Advance to the next leaf node
|
// Advance to the next leaf node
|
||||||
for (var level = -1; ;) {
|
for (var level = -1; ; ) {
|
||||||
if (++level >= nodequeue.length) {
|
if (++level >= nodequeue.length) {
|
||||||
state = 3;
|
state = 3;
|
||||||
continue jump;
|
continue jump;
|
||||||
@ -558,9 +559,9 @@ export default class BTree<K = any, V = any>
|
|||||||
if (++nodeindex[level] < nodequeue[level].length) break;
|
if (++nodeindex[level] < nodequeue[level].length) break;
|
||||||
}
|
}
|
||||||
for (; level > 0; level--) {
|
for (; level > 0; level--) {
|
||||||
nodequeue[level - 1] = (nodequeue[level][
|
nodequeue[level - 1] = (
|
||||||
nodeindex[level]
|
nodequeue[level][nodeindex[level]] as BNodeInternal<K, V>
|
||||||
] as BNodeInternal<K, V>).children;
|
).children;
|
||||||
nodeindex[level - 1] = 0;
|
nodeindex[level - 1] = 0;
|
||||||
}
|
}
|
||||||
leaf = nodequeue[0][nodeindex[0]];
|
leaf = nodequeue[0][nodeindex[0]];
|
||||||
@ -606,7 +607,7 @@ export default class BTree<K = any, V = any>
|
|||||||
var state = reusedArray !== undefined ? 1 : 0;
|
var state = reusedArray !== undefined ? 1 : 0;
|
||||||
|
|
||||||
return iterator<[K, V]>(() => {
|
return iterator<[K, V]>(() => {
|
||||||
jump: for (; ;) {
|
jump: for (;;) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 0:
|
case 0:
|
||||||
if (--i >= 0)
|
if (--i >= 0)
|
||||||
@ -622,7 +623,7 @@ export default class BTree<K = any, V = any>
|
|||||||
state = 2;
|
state = 2;
|
||||||
case 2:
|
case 2:
|
||||||
// Advance to the next leaf node
|
// Advance to the next leaf node
|
||||||
for (var level = -1; ;) {
|
for (var level = -1; ; ) {
|
||||||
if (++level >= nodequeue.length) {
|
if (++level >= nodequeue.length) {
|
||||||
state = 3;
|
state = 3;
|
||||||
continue jump;
|
continue jump;
|
||||||
@ -630,9 +631,9 @@ export default class BTree<K = any, V = any>
|
|||||||
if (--nodeindex[level] >= 0) break;
|
if (--nodeindex[level] >= 0) break;
|
||||||
}
|
}
|
||||||
for (; level > 0; level--) {
|
for (; level > 0; level--) {
|
||||||
nodequeue[level - 1] = (nodequeue[level][
|
nodequeue[level - 1] = (
|
||||||
nodeindex[level]
|
nodequeue[level][nodeindex[level]] as BNodeInternal<K, V>
|
||||||
] as BNodeInternal<K, V>).children;
|
).children;
|
||||||
nodeindex[level - 1] = nodequeue[level - 1].length - 1;
|
nodeindex[level - 1] = nodequeue[level - 1].length - 1;
|
||||||
}
|
}
|
||||||
leaf = nodequeue[0][nodeindex[0]];
|
leaf = nodequeue[0][nodeindex[0]];
|
||||||
@ -763,7 +764,7 @@ export default class BTree<K = any, V = any>
|
|||||||
thisLeaf.values[thisLevelIndices[thisLevelIndices.length - 1]];
|
thisLeaf.values[thisLevelIndices[thisLevelIndices.length - 1]];
|
||||||
const valOther =
|
const valOther =
|
||||||
otherLeaf.values[
|
otherLeaf.values[
|
||||||
otherLevelIndices[otherLevelIndices.length - 1]
|
otherLevelIndices[otherLevelIndices.length - 1]
|
||||||
];
|
];
|
||||||
if (!Object.is(valThis, valOther)) {
|
if (!Object.is(valThis, valOther)) {
|
||||||
const result = different(
|
const result = different(
|
||||||
@ -782,7 +783,7 @@ export default class BTree<K = any, V = any>
|
|||||||
if (otherLeaf && onlyOther) {
|
if (otherLeaf && onlyOther) {
|
||||||
const otherVal =
|
const otherVal =
|
||||||
otherLeaf.values[
|
otherLeaf.values[
|
||||||
otherLevelIndices[otherLevelIndices.length - 1]
|
otherLevelIndices[otherLevelIndices.length - 1]
|
||||||
];
|
];
|
||||||
const result = onlyOther(otherCursor.currentKey, otherVal);
|
const result = onlyOther(otherCursor.currentKey, otherVal);
|
||||||
if (result && result.break) return result.break;
|
if (result && result.break) return result.break;
|
||||||
@ -918,9 +919,10 @@ export default class BTree<K = any, V = any>
|
|||||||
levelIndexWalkBack + 1,
|
levelIndexWalkBack + 1,
|
||||||
);
|
);
|
||||||
// Move to new internal node
|
// Move to new internal node
|
||||||
cursor.currentKey = internalSpine[levelIndexWalkBack][
|
cursor.currentKey =
|
||||||
--levelIndices[levelIndexWalkBack]
|
internalSpine[levelIndexWalkBack][
|
||||||
].maxKey();
|
--levelIndices[levelIndexWalkBack]
|
||||||
|
].maxKey();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
levelIndexWalkBack--;
|
levelIndexWalkBack--;
|
||||||
@ -930,7 +932,7 @@ export default class BTree<K = any, V = any>
|
|||||||
} else {
|
} else {
|
||||||
// Move to new leaf value
|
// Move to new leaf value
|
||||||
const valueIndex = --levelIndices[levelsLength - 1];
|
const valueIndex = --levelIndices[levelsLength - 1];
|
||||||
cursor.currentKey = ((leaf as unknown) as BNode<K, V>).keys[valueIndex];
|
cursor.currentKey = (leaf as unknown as BNode<K, V>).keys[valueIndex];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1119,7 +1121,7 @@ export default class BTree<K = any, V = any>
|
|||||||
* avoid creating a new array on every iteration.
|
* avoid creating a new array on every iteration.
|
||||||
*/
|
*/
|
||||||
nextHigherPair(key: K | undefined, reusedArray?: [K, V]): [K, V] | undefined {
|
nextHigherPair(key: K | undefined, reusedArray?: [K, V]): [K, V] | undefined {
|
||||||
reusedArray = reusedArray || (([] as unknown) as [K, V]);
|
reusedArray = reusedArray || ([] as unknown as [K, V]);
|
||||||
if (key === undefined) {
|
if (key === undefined) {
|
||||||
return this._root.minPair(reusedArray);
|
return this._root.minPair(reusedArray);
|
||||||
}
|
}
|
||||||
@ -1146,7 +1148,7 @@ export default class BTree<K = any, V = any>
|
|||||||
* avoid creating a new array each time you call this method.
|
* avoid creating a new array each time you call this method.
|
||||||
*/
|
*/
|
||||||
nextLowerPair(key: K | undefined, reusedArray?: [K, V]): [K, V] | undefined {
|
nextLowerPair(key: K | undefined, reusedArray?: [K, V]): [K, V] | undefined {
|
||||||
reusedArray = reusedArray || (([] as unknown) as [K, V]);
|
reusedArray = reusedArray || ([] as unknown as [K, V]);
|
||||||
if (key === undefined) {
|
if (key === undefined) {
|
||||||
return this._root.maxPair(reusedArray);
|
return this._root.maxPair(reusedArray);
|
||||||
}
|
}
|
||||||
@ -1178,7 +1180,7 @@ export default class BTree<K = any, V = any>
|
|||||||
key,
|
key,
|
||||||
this._compare,
|
this._compare,
|
||||||
true,
|
true,
|
||||||
reusedArray || (([] as unknown) as [K, V]),
|
reusedArray || ([] as unknown as [K, V]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1194,7 +1196,7 @@ export default class BTree<K = any, V = any>
|
|||||||
key,
|
key,
|
||||||
this._compare,
|
this._compare,
|
||||||
true,
|
true,
|
||||||
reusedArray || (([] as unknown) as [K, V]),
|
reusedArray || ([] as unknown as [K, V]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1345,7 +1347,7 @@ export default class BTree<K = any, V = any>
|
|||||||
this._root = root =
|
this._root = root =
|
||||||
root.keys.length === 0
|
root.keys.length === 0
|
||||||
? EmptyLeaf
|
? EmptyLeaf
|
||||||
: ((root as any) as BNodeInternal<K, V>).children[0];
|
: (root as any as BNodeInternal<K, V>).children[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1390,7 +1392,7 @@ export default class BTree<K = any, V = any>
|
|||||||
height++;
|
height++;
|
||||||
node = node.isLeaf
|
node = node.isLeaf
|
||||||
? undefined
|
? undefined
|
||||||
: ((node as unknown) as BNodeInternal<K, V>).children[0];
|
: (node as unknown as BNodeInternal<K, V>).children[0];
|
||||||
}
|
}
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
@ -1405,9 +1407,12 @@ export default class BTree<K = any, V = any>
|
|||||||
var t = this as any;
|
var t = this as any;
|
||||||
// Note: all other mutators ultimately call set() or editRange()
|
// Note: all other mutators ultimately call set() or editRange()
|
||||||
// so we don't need to override those others.
|
// so we don't need to override those others.
|
||||||
t.clear = t.set = t.editRange = function () {
|
t.clear =
|
||||||
throw new Error("Attempted to modify a frozen BTree");
|
t.set =
|
||||||
};
|
t.editRange =
|
||||||
|
function () {
|
||||||
|
throw new Error("Attempted to modify a frozen BTree");
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Ensures mutations are allowed, reversing the effect of freeze(). */
|
/** Ensures mutations are allowed, reversing the effect of freeze(). */
|
||||||
@ -2191,7 +2196,7 @@ class BNodeInternal<K, V> extends BNode<K, V> {
|
|||||||
this.keys.push.apply(this.keys, rhs.keys);
|
this.keys.push.apply(this.keys, rhs.keys);
|
||||||
this.children.push.apply(
|
this.children.push.apply(
|
||||||
this.children,
|
this.children,
|
||||||
((rhs as any) as BNodeInternal<K, V>).children,
|
(rhs as any as BNodeInternal<K, V>).children,
|
||||||
);
|
);
|
||||||
// If our children are themselves almost empty due to a mass-delete,
|
// If our children are themselves almost empty due to a mass-delete,
|
||||||
// they may need to be merged too (but only the oldLength-1 and its
|
// they may need to be merged too (but only the oldLength-1 and its
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
Event,
|
Event,
|
||||||
EventListenerOrEventListenerObject,
|
EventListenerOrEventListenerObject,
|
||||||
EventListener,
|
EventListener,
|
||||||
} from "../idbtypes";
|
} from "../idbtypes.js";
|
||||||
|
|
||||||
type EventTypeProp =
|
type EventTypeProp =
|
||||||
| "onabort"
|
| "onabort"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
permissions and limitations under the License.
|
permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IDBKeyPath } from "../idbtypes";
|
import { IDBKeyPath } from "../idbtypes.js";
|
||||||
|
|
||||||
export function normalizeKeyPath(
|
export function normalizeKeyPath(
|
||||||
keyPath: IDBKeyPath | IDBKeyPath[],
|
keyPath: IDBKeyPath | IDBKeyPath[],
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"lib": ["es6"],
|
"lib": ["es6"],
|
||||||
"module": "ESNext",
|
"module": "ES2020",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "Node16",
|
||||||
"target": "ES6",
|
"target": "ES6",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"po2json": "^0.4.5",
|
"po2json": "^0.4.5",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^17.0.17",
|
"@types/node": "^18.8.5",
|
||||||
"glob": "^7.2.0"
|
"glob": "^7.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,16 +25,16 @@
|
|||||||
"pretty": "prettier --write src"
|
"pretty": "prettier --write src"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^17.0.17",
|
"@types/node": "^18.8.5",
|
||||||
"ava": "^4.0.1",
|
"ava": "^4.3.3",
|
||||||
"esbuild": "^0.14.21",
|
"esbuild": "^0.14.21",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"big-integer": "^1.6.51",
|
"big-integer": "^1.6.51",
|
||||||
"jed": "^1.1.1",
|
"jed": "^1.1.1",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,18 +29,18 @@
|
|||||||
"pretty": "prettier --write src"
|
"pretty": "prettier --write src"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^17.0.17",
|
"@types/node": "^18.8.5",
|
||||||
"ava": "^4.0.1",
|
"ava": "^4.3.3",
|
||||||
"esbuild": "^0.14.21",
|
"esbuild": "^0.14.21",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"big-integer": "^1.6.51",
|
"big-integer": "^1.6.51",
|
||||||
"fflate": "^0.7.3",
|
"fflate": "^0.7.3",
|
||||||
"jed": "^1.1.1",
|
"jed": "^1.1.1",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.4.0"
|
||||||
},
|
},
|
||||||
"ava": {
|
"ava": {
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -52,7 +52,12 @@ interface URLSearchParams {
|
|||||||
|
|
||||||
export interface URLSearchParamsCtor {
|
export interface URLSearchParamsCtor {
|
||||||
new (
|
new (
|
||||||
init?: string[][] | Record<string, string> | string | URLSearchParams,
|
init?:
|
||||||
|
| URLSearchParams
|
||||||
|
| string
|
||||||
|
| Record<string, string | ReadonlyArray<string>>
|
||||||
|
| Iterable<[string, string]>
|
||||||
|
| ReadonlyArray<[string, string]>,
|
||||||
): URLSearchParams;
|
): URLSearchParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,20 +34,20 @@
|
|||||||
"@rollup/plugin-json": "^4.1.0",
|
"@rollup/plugin-json": "^4.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||||
"@rollup/plugin-replace": "^4.0.0",
|
"@rollup/plugin-replace": "^4.0.0",
|
||||||
"@types/node": "^17.0.17",
|
"@types/node": "^18.8.5",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.79.0",
|
"rollup": "^2.79.0",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"typedoc": "^0.23.14",
|
"typedoc": "^0.23.16",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gnu-taler/taler-util": "workspace:*",
|
"@gnu-taler/taler-util": "workspace:*",
|
||||||
"@gnu-taler/taler-wallet-core": "workspace:*",
|
"@gnu-taler/taler-wallet-core": "workspace:*",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ export async function lintExchangeDeployment(
|
|||||||
verbose: boolean,
|
verbose: boolean,
|
||||||
cont: boolean,
|
cont: boolean,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (process.getuid() != 0) {
|
if (process.getuid!() != 0) {
|
||||||
console.log(
|
console.log(
|
||||||
"warning: the exchange deployment linter is designed to be run as root",
|
"warning: the exchange deployment linter is designed to be run as root",
|
||||||
);
|
);
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
"@gnu-taler/pogen": "workspace:*",
|
"@gnu-taler/pogen": "workspace:*",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
||||||
"@typescript-eslint/parser": "^5.36.1",
|
"@typescript-eslint/parser": "^5.36.1",
|
||||||
"ava": "^4.0.1",
|
"ava": "^4.3.3",
|
||||||
"c8": "^7.11.0",
|
"c8": "^7.11.0",
|
||||||
"eslint": "^8.8.0",
|
"eslint": "^8.8.0",
|
||||||
"eslint-config-airbnb-typescript": "^16.1.0",
|
"eslint-config-airbnb-typescript": "^16.1.0",
|
||||||
@ -57,18 +57,18 @@
|
|||||||
"rollup": "^2.79.0",
|
"rollup": "^2.79.0",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"source-map-resolve": "^0.6.0",
|
"source-map-resolve": "^0.6.0",
|
||||||
"typedoc": "^0.23.14",
|
"typedoc": "^0.23.16",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gnu-taler/idb-bridge": "workspace:*",
|
"@gnu-taler/idb-bridge": "workspace:*",
|
||||||
"@gnu-taler/taler-util": "workspace:*",
|
"@gnu-taler/taler-util": "workspace:*",
|
||||||
"@types/node": "^17.0.17",
|
"@types/node": "^18.8.5",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"big-integer": "^1.6.51",
|
"big-integer": "^1.6.51",
|
||||||
"fflate": "^0.7.3",
|
"fflate": "^0.7.3",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.4.0"
|
||||||
},
|
},
|
||||||
"ava": {
|
"ava": {
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -31,17 +31,17 @@
|
|||||||
"@rollup/plugin-json": "^4.1.0",
|
"@rollup/plugin-json": "^4.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||||
"@rollup/plugin-replace": "^4.0.0",
|
"@rollup/plugin-replace": "^4.0.0",
|
||||||
"@types/node": "^17.0.17",
|
"@types/node": "^18.8.5",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.79.0",
|
"rollup": "^2.79.0",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gnu-taler/taler-util": "workspace:*",
|
"@gnu-taler/taler-util": "workspace:*",
|
||||||
"@gnu-taler/taler-wallet-core": "workspace:*",
|
"@gnu-taler/taler-wallet-core": "workspace:*",
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
"preact-router": "3.2.1",
|
"preact-router": "3.2.1",
|
||||||
"qr-scanner": "^1.4.1",
|
"qr-scanner": "^1.4.1",
|
||||||
"qrcode-generator": "^1.4.4",
|
"qrcode-generator": "^1.4.4",
|
||||||
"tslib": "^2.3.1",
|
"tslib": "^2.4.0",
|
||||||
"ws": "7.4.5"
|
"ws": "7.4.5"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
@ -57,10 +57,10 @@
|
|||||||
"@testing-library/preact": "^2.0.1",
|
"@testing-library/preact": "^2.0.1",
|
||||||
"@testing-library/preact-hooks": "^1.1.0",
|
"@testing-library/preact-hooks": "^1.1.0",
|
||||||
"@types/chai": "^4.3.0",
|
"@types/chai": "^4.3.0",
|
||||||
"@types/chrome": "0.0.176",
|
"@types/chrome": "0.0.197",
|
||||||
"@types/history": "^4.7.8",
|
"@types/history": "^4.7.8",
|
||||||
"@types/mocha": "^9.0.0",
|
"@types/mocha": "^9.0.0",
|
||||||
"@types/node": "^17.0.8",
|
"@types/node": "^18.8.5",
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"babel-plugin-transform-react-jsx": "^6.24.1",
|
"babel-plugin-transform-react-jsx": "^6.24.1",
|
||||||
"chai": "^4.3.6",
|
"chai": "^4.3.6",
|
||||||
@ -71,7 +71,7 @@
|
|||||||
"preact-cli": "^3.3.5",
|
"preact-cli": "^3.3.5",
|
||||||
"preact-render-to-string": "^5.1.19",
|
"preact-render-to-string": "^5.1.19",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"typescript": "^4.8.2"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"include": [
|
"include": [
|
||||||
|
549
pnpm-lock.yaml
549
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user