Comparing version 3.0.11 to 3.0.12
import { EventEmitter } from 'events'; | ||
import { setExternals, setNativeFunctions, Dbi } from './native.js'; | ||
import { setExternals, setNativeFunctions, Dbi, version } from './native.js'; | ||
import { arch, tmpdir, platform } from 'os'; | ||
@@ -25,3 +25,3 @@ import fs from 'fs'; | ||
import { levelup } from './level.js'; | ||
export { clearKeptObjects } from './native.js'; | ||
export { clearKeptObjects, version } from './native.js'; | ||
import { nativeAddon } from './native.js'; | ||
@@ -41,3 +41,3 @@ export let { noop } = nativeAddon; | ||
export default { | ||
open, openAsClass, getLastVersion, compareKey, keyValueToBuffer, bufferToKeyValue, ABORT, IF_EXISTS, asBinary, levelup, TransactionFlags | ||
open, openAsClass, getLastVersion, compareKey, keyValueToBuffer, bufferToKeyValue, ABORT, IF_EXISTS, asBinary, levelup, TransactionFlags, version | ||
}; |
@@ -47,3 +47,4 @@ import { dirname, join, default as pathModule } from 'path'; | ||
attemptLock, | ||
unlock; | ||
unlock, | ||
version; | ||
path = pathModule; | ||
@@ -121,2 +122,3 @@ let dirName = dirname(fileURLToPath(import.meta.url)).replace(/dist$/, ''); | ||
lmdbError = externals.lmdbError; | ||
version = externals.version; | ||
if (externals.tmpdir) tmpdir = externals.tmpdir; | ||
@@ -123,0 +125,0 @@ } |
14
open.js
import { Compression, getAddress, arch, fs, path as pathModule, lmdbError, EventEmitter, MsgpackrEncoder, Env, | ||
Dbi, tmpdir, os, nativeAddon } from './native.js'; | ||
Dbi, tmpdir, os, nativeAddon, version } from './native.js'; | ||
import { CachingStore, setGetLastVersion } from './caching.js'; | ||
@@ -68,5 +68,6 @@ import { addReadMethods, makeReusableBuffer } from './read.js'; | ||
let is32Bit = arch().endsWith('32'); | ||
let remapChunks = options.remapChunks || options.encryptionKey || (options.mapSize ? | ||
let isLegacyLMDB = version.patch < 90; | ||
let remapChunks = (options.remapChunks || options.encryptionKey || (options.mapSize ? | ||
(is32Bit && options.mapSize > 0x100000000) : // larger than fits in address space, must use dynamic maps | ||
is32Bit); // without a known map size, we default to being able to handle large data correctly/well*/ | ||
is32Bit)) && !isLegacyLMDB; // without a known map size, we default to being able to handle large data correctly/well*/ | ||
let userMapSize = options.mapSize; | ||
@@ -83,3 +84,3 @@ options = Object.assign({ | ||
mapSize: remapChunks ? 0x10000000000000 : | ||
0x20000, // Otherwise we start small with 128KB | ||
isLegacyLMDB ? is32Bit ? 0x1000000 : 0x100000000 : 0x20000, // Otherwise we start small with 128KB | ||
safeRestore: process.env.LMDB_RESTORE == 'safe', | ||
@@ -119,3 +120,6 @@ }, options); | ||
} | ||
if (isLegacyLMDB) { | ||
// legacy LMDB, turn off these options | ||
Object.assign(options, { overlappingSync: false, remapChunks: false, safeRestore: false }); | ||
} | ||
if (options.compression) | ||
@@ -122,0 +126,0 @@ options.compression = makeCompression(options.compression); |
{ | ||
"name": "lmdb", | ||
"author": "Kris Zyp", | ||
"version": "3.0.11", | ||
"version": "3.0.12", | ||
"description": "Simple, efficient, scalable, high-performance LMDB interface", | ||
@@ -73,2 +73,3 @@ "license": "MIT", | ||
"recompile": "node-gyp clean && node-gyp configure && node-gyp build", | ||
"recompile-v1": "node-gyp clean && set LMDB_DATA_V1=true&& node-gyp configure && set LMDB_DATA_V1=true&& node-gyp build", | ||
"test": "mocha test/**.test.js --expose-gc --recursive", | ||
@@ -82,5 +83,5 @@ "deno-test": "deno run --allow-ffi --allow-write --allow-read --allow-env --allow-net --unstable test/deno.ts", | ||
"dependencies": { | ||
"msgpackr": "^1.9.9", | ||
"msgpackr": "^1.10.2", | ||
"node-addon-api": "^6.1.0", | ||
"node-gyp-build-optional-packages": "5.1.1", | ||
"node-gyp-build-optional-packages": "5.2.2", | ||
"ordered-binary": "^1.4.1", | ||
@@ -115,9 +116,9 @@ "weak-lru-cache": "^1.2.2" | ||
"optionalDependencies": { | ||
"@lmdb/lmdb-darwin-arm64": "3.0.11", | ||
"@lmdb/lmdb-darwin-x64": "3.0.11", | ||
"@lmdb/lmdb-linux-arm": "3.0.11", | ||
"@lmdb/lmdb-linux-arm64": "3.0.11", | ||
"@lmdb/lmdb-linux-x64": "3.0.11", | ||
"@lmdb/lmdb-win32-x64": "3.0.11" | ||
"@lmdb/lmdb-darwin-arm64": "3.0.12", | ||
"@lmdb/lmdb-darwin-x64": "3.0.12", | ||
"@lmdb/lmdb-linux-arm": "3.0.12", | ||
"@lmdb/lmdb-linux-arm64": "3.0.12", | ||
"@lmdb/lmdb-linux-x64": "3.0.12", | ||
"@lmdb/lmdb-win32-x64": "3.0.12" | ||
} | ||
} |
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
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
Mixed license
License(Experimental) Package contains multiple licenses.
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
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
2511750
2
80
7661
2
+ Added@lmdb/lmdb-darwin-arm64@3.0.12(transitive)
+ Added@lmdb/lmdb-darwin-x64@3.0.12(transitive)
+ Added@lmdb/lmdb-linux-arm@3.0.12(transitive)
+ Added@lmdb/lmdb-linux-arm64@3.0.12(transitive)
+ Added@lmdb/lmdb-linux-x64@3.0.12(transitive)
+ Added@lmdb/lmdb-win32-x64@3.0.12(transitive)
- Removed@lmdb/lmdb-darwin-arm64@3.0.11(transitive)
- Removed@lmdb/lmdb-darwin-x64@3.0.11(transitive)
- Removed@lmdb/lmdb-linux-arm@3.0.11(transitive)
- Removed@lmdb/lmdb-linux-arm64@3.0.11(transitive)
- Removed@lmdb/lmdb-linux-x64@3.0.11(transitive)
- Removed@lmdb/lmdb-win32-x64@3.0.11(transitive)
- Removednode-gyp-build-optional-packages@5.1.1(transitive)
Updatedmsgpackr@^1.10.2