Socket
Socket
Sign inDemoInstall

lmdb

Package Overview
Dependencies
Maintainers
3
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lmdb - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

dependencies/lmdb-data-v1/libraries/liblmdb/Makefile

8

index.d.ts

@@ -133,3 +133,3 @@ declare namespace lmdb {

**/
getKeys(options: RangeOptions): ArrayLikeIterable<K>
getKeys(options?: RangeOptions): ArrayLikeIterable<K>
/**

@@ -140,3 +140,3 @@ * Get the count of all the unique keys for the given range

**/
getKeysCount(options: RangeOptions): number
getKeysCount(options?: RangeOptions): number
/**

@@ -147,3 +147,3 @@ * Get all the entries for the given range

**/
getRange(options: RangeOptions): ArrayLikeIterable<{ key: K, value: V, version?: number }>
getRange(options?: RangeOptions): ArrayLikeIterable<{ key: K, value: V, version?: number }>
/**

@@ -154,3 +154,3 @@ * Get the count of all the entries for the given range

**/
getCount(options: RangeOptions): number
getCount(options?: RangeOptions): number
/**

@@ -157,0 +157,0 @@ * @deprecated since version 2.0, use transaction() instead

@@ -157,3 +157,3 @@ import { Compression, getAddress, require, arch, fs, path as pathModule, lmdbError, EventEmitter, MsgpackrEncoder, Env, tmpdir, os, isWorkerThread } from './external.js';

this.db = env.openDbi(flags, dbName, keyType, dbOptions.compression);
});
}, options.overlappingSync ? 0x10002 : 2); // no flush-sync, but synchronously commit
} else {

@@ -160,0 +160,0 @@ return; // return undefined to indicate it could not be found

{
"name": "lmdb",
"author": "Kris Zyp",
"version": "2.2.4",
"version": "2.2.5",
"description": "Simple, efficient, scalable, high-performance LMDB interface",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -156,3 +156,3 @@ import { getAddress, onExit } from './external.js';

endPosition = store.writeKey(key, targetBytes, keyStartPosition);
if (!(keyStartPosition < endPosition) && flags != 12)
if (!(keyStartPosition < endPosition) && (flags & 0xf) != 12)
throw new Error('Invalid key or zero length key is not allowed in LMDB')

@@ -364,21 +364,4 @@ } catch(error) {

case 0:
if (resolvers.length > 0) {
if (committedFlushResolvers)
committedFlushResolvers.push(...resolvers)
else {
committedFlushResolvers = resolvers
let delay = Math.min(Date.now() - start, maxFlushDelay)
setTimeout(() => lastSync.then(() => {
let resolvers = committedFlushResolvers
committedFlushResolvers = null
lastSync = new Promise((resolve) => {
env.sync(() => {
for (let i = 0; i < resolvers.length; i++)
resolvers[i]();
resolve();
});
});
}), delay);
}
}
if (resolvers.length > 0)
scheduleFlush(resolvers, Math.min(Date.now() - start, maxFlushDelay))
case 1:

@@ -399,2 +382,20 @@ break;

}
function scheduleFlush(resolvers, delay) {
if (committedFlushResolvers)
committedFlushResolvers.push(...resolvers)
else {
committedFlushResolvers = resolvers
setTimeout(() => lastSync.then(() => {
let resolvers = committedFlushResolvers || []
committedFlushResolvers = null
lastSync = new Promise((resolve) => {
env.sync(() => {
for (let i = 0; i < resolvers.length; i++)
resolvers[i]();
resolve();
});
});
}), delay || 0);
}
}

@@ -770,2 +771,4 @@ function queueCommitResolution(resolution) {

resetReadTxn();
if ((flags & 0x10000) && overlappingSync) // if it is no-sync in overlapping-sync mode, need to schedule flush for it to be marked as persisted
scheduleFlush([])
}

@@ -772,0 +775,0 @@ return result;

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

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

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

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

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

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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc