@harperfast/rocksdb-js
Advanced tools
+2
-2
@@ -34,6 +34,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
| let node_url = require("node:url"); | ||
| let msgpackr = require("msgpackr"); | ||
| let ordered_binary = require("ordered-binary"); | ||
| ordered_binary = __toESM(ordered_binary); | ||
| let _harperfast_extended_iterable = require("@harperfast/extended-iterable"); | ||
| let msgpackr = require("msgpackr"); | ||
@@ -1820,3 +1820,3 @@ //#region src/load-binding.ts | ||
| rocksdb: version, | ||
| "rocksdb-js": "0.1.6" | ||
| "rocksdb-js": "0.1.7" | ||
| }; | ||
@@ -1823,0 +1823,0 @@ |
+1
-0
@@ -428,2 +428,3 @@ import { ExtendedIterable } from "@harperfast/extended-iterable"; | ||
| type PurgeLogsOptions = { | ||
| before?: number; | ||
| destroy?: boolean; | ||
@@ -430,0 +431,0 @@ name?: string; |
+1
-0
@@ -428,2 +428,3 @@ import { ExtendedIterable } from "@harperfast/extended-iterable"; | ||
| type PurgeLogsOptions = { | ||
| before?: number; | ||
| destroy?: boolean; | ||
@@ -430,0 +431,0 @@ name?: string; |
+2
-2
@@ -6,5 +6,5 @@ import { createRequire } from "node:module"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { Encoder } from "msgpackr"; | ||
| import * as orderedBinary from "ordered-binary"; | ||
| import { ExtendedIterable } from "@harperfast/extended-iterable"; | ||
| import { Encoder } from "msgpackr"; | ||
@@ -1795,3 +1795,3 @@ //#region \0rolldown/runtime.js | ||
| rocksdb: version, | ||
| "rocksdb-js": "0.1.6" | ||
| "rocksdb-js": "0.1.7" | ||
| }; | ||
@@ -1798,0 +1798,0 @@ |
+40
-40
| { | ||
| "name": "@harperfast/rocksdb-js", | ||
| "version": "0.1.6", | ||
| "version": "0.1.7", | ||
| "description": "RocksDB binding for Node.js", | ||
| "homepage": "https://github.com/HarperFast/rocksdb-js", | ||
| "bugs": [ | ||
| { | ||
| "type": "link", | ||
| "url": "https://github.com/HarperFast/rocksdb-js/issues" | ||
| } | ||
| ], | ||
| "license": "Apache-2.0", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/HarperFast/rocksdb-js" | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "type": "module", | ||
| "main": "./dist/index.cjs", | ||
@@ -15,7 +30,2 @@ "module": "./dist/index.mjs", | ||
| }, | ||
| "type": "module", | ||
| "gypfile": true, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "dependencies": { | ||
@@ -31,8 +41,8 @@ "@harperfast/extended-iterable": "1.0.3", | ||
| "cross-env": "10.1.0", | ||
| "dotenv": "17.2.4", | ||
| "dprint": "0.51.1", | ||
| "lefthook": "2.1.0", | ||
| "dotenv": "17.3.1", | ||
| "lefthook": "2.1.1", | ||
| "lmdb": "3.5.1", | ||
| "node-gyp": "12.2.0", | ||
| "oxlint": "1.46.0", | ||
| "oxfmt": "0.33.0", | ||
| "oxlint": "1.48.0", | ||
| "prebuildify": "6.0.1", | ||
@@ -46,31 +56,21 @@ "semver": "7.7.4", | ||
| }, | ||
| "optionalDependencies": { | ||
| "@harperfast/rocksdb-js-darwin-arm64": "0.1.7", | ||
| "@harperfast/rocksdb-js-darwin-x64": "0.1.7", | ||
| "@harperfast/rocksdb-js-linux-arm64-glibc": "0.1.7", | ||
| "@harperfast/rocksdb-js-linux-arm64-musl": "0.1.7", | ||
| "@harperfast/rocksdb-js-linux-x64-glibc": "0.1.7", | ||
| "@harperfast/rocksdb-js-linux-x64-musl": "0.1.7", | ||
| "@harperfast/rocksdb-js-win32-arm64": "0.1.7", | ||
| "@harperfast/rocksdb-js-win32-x64": "0.1.7" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
| }, | ||
| "gypfile": true, | ||
| "rocksdb": { | ||
| "version": "10.10.1" | ||
| }, | ||
| "homepage": "https://github.com/HarperFast/rocksdb-js", | ||
| "bugs": [ | ||
| { | ||
| "type": "link", | ||
| "url": "https://github.com/HarperFast/rocksdb-js/issues" | ||
| } | ||
| ], | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/HarperFast/rocksdb-js" | ||
| }, | ||
| "optionalDependencies": { | ||
| "@harperfast/rocksdb-js-darwin-arm64": "0.1.6", | ||
| "@harperfast/rocksdb-js-darwin-x64": "0.1.6", | ||
| "@harperfast/rocksdb-js-linux-arm64-glibc": "0.1.6", | ||
| "@harperfast/rocksdb-js-linux-x64-glibc": "0.1.6", | ||
| "@harperfast/rocksdb-js-linux-arm64-musl": "0.1.6", | ||
| "@harperfast/rocksdb-js-linux-x64-musl": "0.1.6", | ||
| "@harperfast/rocksdb-js-win32-arm64": "0.1.6", | ||
| "@harperfast/rocksdb-js-win32-x64": "0.1.6" | ||
| }, | ||
| "scripts": { | ||
| "bench": "cross-env CI=1 vitest bench --passWithNoTests --outputJson benchmark-results.json", | ||
| "bench": "cross-env CI=1 node --expose-gc ./node_modules/vitest/vitest.mjs bench --passWithNoTests --outputJson benchmark-results.json", | ||
| "bench:bun": "cross-env CI=1 bun --bun bench", | ||
@@ -83,16 +83,16 @@ "bench:deno": "cross-env CI=1 deno run --allow-all --sloppy-imports ./node_modules/vitest/vitest.mjs bench", | ||
| "build:bundle:minify": "cross-env MINIFY=1 pnpm build:bundle", | ||
| "check": "pnpm type-check && pnpm lint", | ||
| "check": "pnpm type-check && pnpm lint && pnpm fmt:check", | ||
| "clean": "node-gyp clean", | ||
| "coverage": "tsx scripts/coverage/main.ts --no-file-parallelism", | ||
| "format": "dprint check", | ||
| "format:fix": "dprint fmt", | ||
| "coverage": "tsx scripts/coverage/main.ts", | ||
| "fmt": "oxfmt", | ||
| "fmt:check": "oxfmt --check", | ||
| "lint": "oxlint", | ||
| "rebuild": "node-gyp rebuild", | ||
| "rebuild:debug": "node-gyp rebuild --coverage --debug --verbose", | ||
| "test": "cross-env CI=1 node --expose-gc ./node_modules/vitest/vitest.mjs --reporter=verbose --no-file-parallelism", | ||
| "test:bun": "cross-env CI=1 bun --bun --config=bunfig.toml ./node_modules/vitest/vitest.mjs --reporter=verbose --no-file-parallelism", | ||
| "test:deno": "cross-env CI=1 deno run --allow-all --sloppy-imports ./node_modules/vitest/vitest.mjs --no-file-parallelism", | ||
| "test:stress": "cross-env CI=1 node --expose-gc ./node_modules/vitest/vitest.mjs --reporter=verbose --config=vitest-stress.config.ts --no-file-parallelism", | ||
| "test": "cross-env CI=1 node --expose-gc ./node_modules/vitest/vitest.mjs --reporter=verbose", | ||
| "test:bun": "cross-env CI=1 bun --bun --config=bunfig.toml ./node_modules/vitest/vitest.mjs --reporter=verbose", | ||
| "test:deno": "cross-env CI=1 deno run --allow-all --sloppy-imports ./node_modules/vitest/vitest.mjs", | ||
| "test:stress": "cross-env CI=1 node --expose-gc ./node_modules/vitest/vitest.mjs --reporter=verbose --config=vitest-stress.config.ts", | ||
| "type-check": "tsc --noEmit" | ||
| } | ||
| } |
+7
-6
@@ -220,3 +220,3 @@ # rocksdb-js | ||
| const result = db.get('foo'); | ||
| const value = result instanceof Promise ? (await result) : result; | ||
| const value = result instanceof Promise ? await result : result; | ||
| assert.equal(result, 'foo'); | ||
@@ -679,7 +679,7 @@ ``` | ||
| console.log('first lock blocking for 100ms'); | ||
| return new Promise(resolve => setTimeout(resolve, 100)); | ||
| return new Promise((resolve) => setTimeout(resolve, 100)); | ||
| }), | ||
| db.withLock('key', () => { | ||
| console.log('second lock blocking for 100ms'); | ||
| return new Promise(resolve => setTimeout(resolve, 100)); | ||
| return new Promise((resolve) => setTimeout(resolve, 100)); | ||
| }), | ||
@@ -734,2 +734,3 @@ db.withLock('key', () => { | ||
| - `options: object` | ||
| - `before?: number` Remove all transaction log files older than the specified timestamp. | ||
| - `destroy?: boolean` When `true`, deletes transaction log stores including all log sequence files | ||
@@ -857,3 +858,3 @@ on disk. | ||
| const lastHour = Date.now() - (60 * 60 * 1000); | ||
| const lastHour = Date.now() - 60 * 60 * 1000; | ||
| const rangeIter = log.query({ start: lastHour, end: Date.now() }); | ||
@@ -899,7 +900,7 @@ for (const entry of rangeIter) { | ||
| - `refCount: number` The number of JavaScript database instances plus the registry's reference. | ||
| - `columnFamiles: string[]` A list of the database's column families. | ||
| - `columnFamiles: object` A map of column family names and their their info. | ||
| - `userSharedBuffers: number` The count of active user shared buffers. | ||
| - `transactions: number` The count of active transactions. | ||
| - `closables: number` The count of active database, transactions, and iterators. | ||
| - `locks: number` The count of active locks. | ||
| - `userSharedBuffers: number` The count of active user shared buffers. | ||
| - `listenerCallbacks: number` The count of in-flight callbacks. | ||
@@ -906,0 +907,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
457560
0.15%1177
0.09%