Socket
Socket
Sign inDemoInstall

lmdb

Package Overview
Dependencies
19
Maintainers
3
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.9.1 to 2.9.2

18

package.json
{
"name": "lmdb",
"author": "Kris Zyp",
"version": "2.9.1",
"version": "2.9.2",
"description": "Simple, efficient, scalable, high-performance LMDB interface",

@@ -64,3 +64,3 @@ "license": "MIT",

"prepare": "rollup -c",
"before-publish": "rollup -c && prebuildify-ci download && node util/set-optional-deps.cjs && npm run test",
"before-publish": "rollup -c && cpy index.d.ts . --rename=index.d.cts && prebuildify-ci download && node util/set-optional-deps.cjs && npm run test",
"prebuild-libc-musl": "ENABLE_V8_FUNCTIONS=false prebuildify-platform-packages --tag-libc --napi --platform-packages --target 18.17.1",

@@ -72,3 +72,3 @@ "prebuild-libc": "prebuildify-platform-packages --tag-libc --target 20.0.0 || true && prebuildify-platform-packages --platform-packages --tag-libc --target 18.17.1 && ENABLE_V8_FUNCTIONS=false prebuildify-platform-packages --napi --platform-packages --tag-libc --target 18.17.1",

"prebuildify": "prebuildify-platform-packages --napi --target 18.17.1",
"full-publish": "cd prebuilds/win32-x64 && npm publish --tag dev --access public && cd ../darwin-x64 && npm publish --tag dev --access public && cd ../darwin-arm64 && npm publish --tag dev --access public && cd ../linux-x64 && npm publish --tag dev --access public && cd ../linux-arm64 && npm publish --tag dev --access public && cd ../linux-arm && npm publish --tag dev --access public && cd ../.. && npm publish --tag dev",
"full-publish": "cd prebuilds/win32-x64 && npm publish --access public && cd ../darwin-x64 && npm publish --access public && cd ../darwin-arm64 && npm publish --access public && cd ../linux-x64 && npm publish --access public && cd ../linux-arm64 && npm publish --access public && cd ../linux-arm && npm publish --access public && cd ../.. && npm publish",
"recompile": "node-gyp clean && node-gyp configure && node-gyp build",

@@ -115,9 +115,9 @@ "test": "mocha test/**.test.js --expose-gc --recursive",

"optionalDependencies": {
"@lmdb/lmdb-darwin-arm64": "2.9.1",
"@lmdb/lmdb-darwin-x64": "2.9.1",
"@lmdb/lmdb-linux-arm": "2.9.1",
"@lmdb/lmdb-linux-arm64": "2.9.1",
"@lmdb/lmdb-linux-x64": "2.9.1",
"@lmdb/lmdb-win32-x64": "2.9.1"
"@lmdb/lmdb-darwin-arm64": "2.9.2",
"@lmdb/lmdb-darwin-x64": "2.9.2",
"@lmdb/lmdb-linux-arm": "2.9.2",
"@lmdb/lmdb-linux-arm64": "2.9.2",
"@lmdb/lmdb-linux-x64": "2.9.2",
"@lmdb/lmdb-win32-x64": "2.9.2"
}
}

@@ -105,6 +105,6 @@ [![license](https://img.shields.io/badge/license-MIT-brightgreen)](LICENSE)

['hello', 'world']
Buffer.from([255]) // buffers can be used directly, 255 is higher than any byte produced by primitives
Buffer.from([255]) // buffers are used directly, 255 is higher than any byte produced by primitives
```
Keys use 0/null bytes as delimiters for arrays, and so strings currently can not have '\x00' (null char) in them.
Keys use 0/null bytes as delimiters for arrays, and so strings currently can not have '\x00' (null char) in them. Buffers are assumed to be already encoded values, and will not be returned as buffers when read (from range queries).

@@ -111,0 +111,0 @@ By default, the maximum key size is 1978 bytes. If you explicitly set the `pageSize` to 8192 or higher, the maximum key size will be 4026, but this is the largest key size supported.

@@ -24,40 +24,44 @@ export const SKIP = {};

next(resolvedResult) {
try {
let result;
do {
let iteratorResult;
if (resolvedResult) {
iteratorResult = resolvedResult;
resolvedResult = null; // don't go in this branch on next iteration
} else {
iteratorResult = iterator.next();
if (iteratorResult.then) {
if (!async) throw new Error('Can not synchronously iterate with asynchronous values');
return iteratorResult.then(iteratorResult => this.next(iteratorResult));
do {
let iteratorResult;
if (resolvedResult) {
iteratorResult = resolvedResult;
resolvedResult = null; // don't go in this branch on next iteration
} else {
iteratorResult = iterator.next();
if (iteratorResult.then) {
if (!async) throw new Error('Can not synchronously iterate with asynchronous values');
return iteratorResult.then(iteratorResult => this.next(iteratorResult), onError);
}
}
}
if (iteratorResult.done === true) {
this.done = true;
if (iteratorResult.done === true) {
this.done = true;
if (iterable.onDone) iterable.onDone();
return iteratorResult;
}
result = func(iteratorResult.value, i++);
if (result && result.then) {
if (!async) {
throw new Error('Can not synchronously iterate with asynchronous values');
}
return result.then(result =>
result === SKIP ?
this.next() :
{
value: result
}, onError);
}
} while(result === SKIP);
if (result === DONE) {
if (iterable.onDone) iterable.onDone();
return iteratorResult;
return result;
}
result = func(iteratorResult.value, i++);
if (result && result.then) {
if (!async) {
throw new Error('Can not synchronously iterate with asynchronous values');
}
return result.then(result =>
result === SKIP ?
this.next() :
{
value: result
});
}
} while(result === SKIP);
if (result === DONE) {
if (iterable.onDone) iterable.onDone();
return result;
return {
value: result
};
} catch(error) {
onError(error);
}
return {
value: result
};
},

@@ -74,2 +78,6 @@ return() {

};
function onError(error) {
if (iterable.onDone) iterable.onDone();
throw error;
}
return iterable;

@@ -106,12 +114,16 @@ }

if (isFirst) {
isFirst = false;
iterator = secondIterable[async ? Symbol.asyncIterator : Symbol.iterator]();
result = iterator.next();
if (concatIterable.onDone) {
if (result.then) {
if (!async) throw new Error('Can not synchronously iterate with asynchronous values');
result.then((result) => {
if (result.done()) concatIterable.onDone();
});
} else if (result.done) concatIterable.onDone();
try {
isFirst = false;
iterator = secondIterable[async ? Symbol.asyncIterator : Symbol.iterator]();
result = iterator.next();
if (concatIterable.onDone) {
if (result.then) {
if (!async) throw new Error('Can not synchronously iterate with asynchronous values');
result.then((result) => {
if (result.done()) concatIterable.onDone();
}, onError);
} else if (result.done) concatIterable.onDone();
}
} catch (error) {
onError(error);
}

@@ -125,12 +137,16 @@ } else {

next() {
let result = iterator.next();
if (result.then) {
if (!async) throw new Error('Can synchronously iterate with asynchronous values');
return result.then((result) => {
if (result.done) return iteratorDone(result);
return result;
});
try {
let result = iterator.next();
if (result.then) {
if (!async) throw new Error('Can synchronously iterate with asynchronous values');
return result.then((result) => {
if (result.done) return iteratorDone(result);
return result;
});
}
if (result.done) return iteratorDone(result);
return result;
} catch (error) {
onError(error);
}
if (result.done) return iteratorDone(result);
return result;
},

@@ -147,2 +163,7 @@ return() {

};
function onError(error) {
if (iterable.onDone) iterable.onDone();
throw error;
}
return concatIterable;

@@ -159,22 +180,26 @@ }

next() {
do {
if (currentSubIterator) {
let result = currentSubIterator.next();
if (!result.done) {
try {
do {
if (currentSubIterator) {
let result = currentSubIterator.next();
if (!result.done) {
return result;
}
}
let result = iterator.next();
if (result.done) {
if (mappedIterable.onDone) mappedIterable.onDone();
return result;
}
}
let result = iterator.next();
if (result.done) {
if (mappedIterable.onDone) mappedIterable.onDone();
return result;
}
let value = callback(result.value);
if (Array.isArray(value) || value instanceof RangeIterable)
currentSubIterator = value[Symbol.iterator]();
else {
currentSubIterator = null;
return { value };
}
} while(true);
let value = callback(result.value);
if (Array.isArray(value) || value instanceof RangeIterable)
currentSubIterator = value[Symbol.iterator]();
else {
currentSubIterator = null;
return { value };
}
} while(true);
} catch (error) {
onError(error);
}
},

@@ -195,2 +220,6 @@ return() {

};
function onError(error) {
if (iterable.onDone) iterable.onDone();
throw error;
}
return mappedIterable;

@@ -219,3 +248,5 @@ }

}
throw new Error('Can not serialize async iterables without first calling resolveJSON');
const error = new Error('Can not serialize async iterables without first calling resolving asArray');
error.resolution = this.asArray;
throw error;
//return Array.from(this)

@@ -222,0 +253,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc