Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

lmdb

Package Overview
Dependencies
Maintainers
3
Versions
174
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 1.6.8 to 1.6.9

prebuilds/linux-x64/node.abi72.node

29

benchmark/index.js

@@ -11,3 +11,2 @@ 'use strict';

var rimraf = require('rimraf');
var mkdirp = require('mkdirp');
var benchmark = require('benchmark');

@@ -34,2 +33,8 @@ var suite = new benchmark.Suite();

}
let bigString = 'big'
for (let i = 0; i < 9; i++) {
bigString += bigString
}
console.log('bigString', bigString.length)
data.more = bigString

@@ -40,2 +45,3 @@ var c = 0

let iteration = 1
let lastResult = Promise.resolve()
function setData(deferred) {

@@ -46,3 +52,3 @@ /* result = store.transactionAsync(() => {

})*/
let key = (c += 357) % total
let key = (c += 357)
result = store.put(key, data)

@@ -54,3 +60,6 @@ /*if (key % 2 == 0)

if (iteration++ % 1000 == 0) {
setImmediate(() => deferred.resolve(result))
setImmediate(() => lastResult.then(() => {
deferred.resolve()
}))
lastResult = result
} else

@@ -60,2 +69,9 @@ deferred.resolve()

function syncTxn() {
store.transactionSync(() => {
for (let j = 0;j<100; j++)
store.put((c += 357), bigString)
})
}
function getData() {

@@ -96,5 +112,4 @@ result = store.get((c += 357) % total)

// setup clean directory
mkdirp(testDirPath).then(() => {
done();
}, error => done(error));
fs.mkdirSync(testDirPath, { recursive: true})
done();
});

@@ -106,2 +121,3 @@ }

noMemInit: true,
//noSync: true,
//winMemoryPriority: 4,

@@ -129,2 +145,3 @@ })

await setup();
//suite.add('syncTxn', syncTxn);
suite.add('getRange', getRange);

@@ -131,0 +148,0 @@ suite.add('put', {

@@ -1,2 +0,1 @@

const { sync: mkdirpSync } = require('mkdirp')
const fs = require('fs')

@@ -97,3 +96,3 @@ const { extname, basename, dirname} = require('path')

if (!fs.existsSync(options.noSubdir ? dirname(path) : path))
mkdirpSync(options.noSubdir ? dirname(path) : path)
fs.mkdirSync(options.noSubdir ? dirname(path) : path, { recursive: true })
if (options.compression) {

@@ -100,0 +99,0 @@ let setDefault

{
"name": "lmdb",
"author": "Kris Zyp",
"version": "1.6.8",
"version": "1.6.9",
"description": "Simple, efficient, scalable data store wrapper for LMDB",

@@ -42,3 +42,2 @@ "license": "MIT",

"dependencies": {
"mkdirp": "^1.0.4",
"nan": "^2.14.2",

@@ -50,3 +49,3 @@ "node-gyp-build": "^4.2.3",

"optionalDependencies": {
"msgpackr": "^1.3.7"
"msgpackr": "^1.4.7"
},

@@ -53,0 +52,0 @@ "devDependencies": {

'use strict';
let path = require('path');
let mkdirp = require('mkdirp');
let rimraf = require('rimraf');

@@ -228,2 +227,12 @@ let chai = require('chai');

});
it.only('store 255-length string', async () => {
const value = 'RRZG9A6I7xupPeOZhxcOcioFsuhszGOdyDUcbRf4Zef2kdPIfC9RaLO4jTM5JhuZvTsF09fbRHMGtqk7YAgu3vespeTe9l61ziZ6VrMnYu2CamK96wCkmz0VUXyqaiUoTPgzk414LS9yYrd5uh7w18ksJF5SlC2e91rukWvNqAZJjYN3jpkqHNOFchCwFrhbxq2Lrv1kSJPYCx9blRg2hGmYqTbElLTZHv20iNqwZeQbRMgSBPT6vnbCBPnOh1W'
await db.put("255chars", value)
let retrieved = db.get("255chars")
console.log("get value: ", retrieved, retrieved.length)
console.log("original value: ", value, value.length)
})
it.skip('trigger sync commit', async function() {

@@ -230,0 +239,0 @@ let dataIn = {foo: 4, bar: false}

'use strict';
var path = require('path');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');

@@ -36,5 +35,4 @@ var chai = require('chai');

// setup clean directory
mkdirp(testBackupDirPath).then(() => {
done();
}, error => done(error));
fs.mkdirSync(testBackupDirPath, { recursive: true })
done();
});

@@ -41,0 +39,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

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