Comparing version 2.8.1 to 2.8.2
{ | ||
"name": "lmdb", | ||
"author": "Kris Zyp", | ||
"version": "2.8.1", | ||
"version": "2.8.2", | ||
"description": "Simple, efficient, scalable, high-performance LMDB interface", | ||
@@ -109,9 +109,9 @@ "license": "MIT", | ||
"optionalDependencies": { | ||
"@lmdb/lmdb-darwin-arm64": "2.8.1", | ||
"@lmdb/lmdb-darwin-x64": "2.8.1", | ||
"@lmdb/lmdb-linux-arm": "2.8.1", | ||
"@lmdb/lmdb-linux-arm64": "2.8.1", | ||
"@lmdb/lmdb-linux-x64": "2.8.1", | ||
"@lmdb/lmdb-win32-x64": "2.8.1" | ||
"@lmdb/lmdb-darwin-arm64": "2.8.2", | ||
"@lmdb/lmdb-darwin-x64": "2.8.2", | ||
"@lmdb/lmdb-linux-arm": "2.8.2", | ||
"@lmdb/lmdb-linux-arm64": "2.8.2", | ||
"@lmdb/lmdb-linux-x64": "2.8.2", | ||
"@lmdb/lmdb-win32-x64": "2.8.2" | ||
} | ||
} |
@@ -633,2 +633,5 @@ import { RangeIterable } from './util/RangeIterable.js'; | ||
let txn = readTxnRenewed ? readTxn : renewReadTxn(this); | ||
if (!txn.use) { | ||
throw new Error('Can not use read transaction from a closed database'); | ||
} | ||
txn.use(); | ||
@@ -650,2 +653,5 @@ return txn; | ||
throw new Error('Can not read from a closed database'); | ||
}, | ||
use() { | ||
throw new Error('Can not read from a closed database'); | ||
} | ||
@@ -652,0 +658,0 @@ }; |
@@ -98,15 +98,28 @@ export const SKIP = {}; | ||
let isFirst = true; | ||
function iteratorDone(result) { | ||
if (isFirst) { | ||
isFirst = false; | ||
iterator = secondIterable[Symbol.iterator](async); | ||
result = iterator.next(); | ||
if (concatIterable.onDone) { | ||
if (result.then) | ||
result.then((result) => { | ||
if (result.done()) concatIterable.onDone(); | ||
}); | ||
else if (result.done) concatIterable.onDone(); | ||
} | ||
} else { | ||
if (concatIterable.onDone) concatIterable.onDone(); | ||
} | ||
return result; | ||
} | ||
return { | ||
next() { | ||
let result = iterator.next(); | ||
if (result.done) { | ||
if (isFirst) { | ||
isFirst = false; | ||
iterator = secondIterable[Symbol.iterator](async); | ||
result = iterator.next(); | ||
if (result.done && concatIterable.onDone) iterable.onDone(); | ||
} else { | ||
if (concatIterable.onDone) concatIterable.onDone(); | ||
} | ||
} | ||
if (result.then) | ||
return result.then((result) => { | ||
if (result.done) return iteratorDone(result); | ||
return result; | ||
}); | ||
if (result.done) return iteratorDone(result); | ||
return result; | ||
@@ -113,0 +126,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2349343
6201