@loradb/lora-node 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.js +5 -1
- package/dist/native.js.map +1 -1
- package/package.json +15 -12
- package/ts/native.js +6 -1
package/dist/native.js
CHANGED
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
// subpackage named `@loradb/lora-node-<triple>`; local dev builds drop the
|
|
13
13
|
// `.node` at the crate root. We try both.
|
|
14
14
|
"use strict";
|
|
15
|
+
// Intentional CJS module: the file uses `require()` to dynamically
|
|
16
|
+
// resolve `.node` binaries based on platform/arch, which is a CJS-only
|
|
17
|
+
// pattern. ESM `import` can't load `.node` addons by path at runtime.
|
|
18
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
15
19
|
const { platform, arch } = process;
|
|
16
|
-
const { existsSync
|
|
20
|
+
const { existsSync } = require("node:fs");
|
|
17
21
|
const { join } = require("node:path");
|
|
18
22
|
const { execSync } = require("node:child_process");
|
|
19
23
|
function isMuslLibc() {
|
package/dist/native.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","sourceRoot":"","sources":["../ts/native.js"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,EAAE;AACF,mDAAmD;AACnD,gDAAgD;AAChD,iDAAiD;AACjD,iDAAiD;AACjD,gEAAgE;AAChE,8CAA8C;AAC9C,EAAE;AACF,qEAAqE;AACrE,2EAA2E;AAC3E,0CAA0C;AAE1C,YAAY,CAAC;AAEb,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AACnC,MAAM,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"native.js","sourceRoot":"","sources":["../ts/native.js"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,EAAE;AACF,mDAAmD;AACnD,gDAAgD;AAChD,iDAAiD;AACjD,iD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,IAAI,IAAI,IAAI;QAC3D,gBAAgB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;QAC9C,cAAc,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;QAC5C,oEAAoE,CACvE,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loradb/lora-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Node.js / TypeScript bindings for the Lora in-memory graph database",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
|
+
"packageManager": "yarn@4.5.1",
|
|
6
7
|
"author": "LoraDB, Inc.",
|
|
7
8
|
"homepage": "https://github.com/lora-db/lora#readme",
|
|
8
9
|
"repository": {
|
|
@@ -65,35 +66,37 @@
|
|
|
65
66
|
},
|
|
66
67
|
"scripts": {
|
|
67
68
|
"sync:types": "node -e \"const fs=require('fs'); for (const f of ['types.ts','decode.ts']) fs.copyFileSync('../shared-ts/' + f, 'ts/' + f);\"",
|
|
68
|
-
"verify:types": "node -e \"const fs=require('fs'); for (const f of ['types.ts','decode.ts']) { const a=fs.readFileSync('../shared-ts/' + f,'utf8'); const b=fs.readFileSync('ts/' + f,'utf8'); if (a!==b) { console.error('ts/' + f + ' is out of sync with shared-ts/' + f + ' — run
|
|
69
|
-
"prebuild": "
|
|
70
|
-
"pretypecheck": "
|
|
71
|
-
"pretest": "
|
|
69
|
+
"verify:types": "node -e \"const fs=require('fs'); for (const f of ['types.ts','decode.ts']) { const a=fs.readFileSync('../shared-ts/' + f,'utf8'); const b=fs.readFileSync('ts/' + f,'utf8'); if (a!==b) { console.error('ts/' + f + ' is out of sync with shared-ts/' + f + ' — run yarn run sync:types'); process.exit(1);} } \"",
|
|
70
|
+
"prebuild": "yarn run sync:types",
|
|
71
|
+
"pretypecheck": "yarn run sync:types",
|
|
72
|
+
"pretest": "yarn run sync:types",
|
|
72
73
|
"build:native": "napi build --platform --release --js false",
|
|
73
74
|
"build:native:debug": "napi build --platform --js false",
|
|
74
75
|
"build:ts": "tsc -p tsconfig.json",
|
|
75
|
-
"build": "
|
|
76
|
+
"build": "yarn run build:native && yarn run build:ts",
|
|
76
77
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
77
78
|
"test": "vitest run",
|
|
78
79
|
"test:watch": "vitest",
|
|
80
|
+
"lint": "eslint ts test",
|
|
79
81
|
"bench": "node bench/run.mjs",
|
|
80
82
|
"artifacts": "napi artifacts",
|
|
81
83
|
"create-npm-dirs": "napi create-npm-dir -t .",
|
|
82
84
|
"copy-license": "node -e \"const fs=require('fs'); try { fs.copyFileSync('../../../LICENSE','LICENSE'); } catch (e) { if (e.code !== 'ENOENT') throw e; }\"",
|
|
83
|
-
"prepack": "
|
|
85
|
+
"prepack": "yarn run sync:types && yarn run copy-license && yarn run build",
|
|
84
86
|
"pack:dry": "npm pack --dry-run"
|
|
85
87
|
},
|
|
86
88
|
"devDependencies": {
|
|
87
89
|
"@napi-rs/cli": "^2.18.4",
|
|
88
90
|
"@types/node": "^22.7.4",
|
|
91
|
+
"eslint": "^9.15.0",
|
|
89
92
|
"typescript": "^5.6.2",
|
|
90
93
|
"vitest": "^2.1.1"
|
|
91
94
|
},
|
|
92
95
|
"optionalDependencies": {
|
|
93
|
-
"@loradb/lora-node-linux-x64-gnu": "0.
|
|
94
|
-
"@loradb/lora-node-linux-arm64-gnu": "0.
|
|
95
|
-
"@loradb/lora-node-darwin-x64": "0.
|
|
96
|
-
"@loradb/lora-node-darwin-arm64": "0.
|
|
97
|
-
"@loradb/lora-node-win32-x64-msvc": "0.
|
|
96
|
+
"@loradb/lora-node-linux-x64-gnu": "0.10.1",
|
|
97
|
+
"@loradb/lora-node-linux-arm64-gnu": "0.10.1",
|
|
98
|
+
"@loradb/lora-node-darwin-x64": "0.10.1",
|
|
99
|
+
"@loradb/lora-node-darwin-arm64": "0.10.1",
|
|
100
|
+
"@loradb/lora-node-win32-x64-msvc": "0.10.1"
|
|
98
101
|
}
|
|
99
102
|
}
|
package/ts/native.js
CHANGED
|
@@ -14,8 +14,13 @@
|
|
|
14
14
|
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
|
+
// Intentional CJS module: the file uses `require()` to dynamically
|
|
18
|
+
// resolve `.node` binaries based on platform/arch, which is a CJS-only
|
|
19
|
+
// pattern. ESM `import` can't load `.node` addons by path at runtime.
|
|
20
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
21
|
+
|
|
17
22
|
const { platform, arch } = process;
|
|
18
|
-
const { existsSync
|
|
23
|
+
const { existsSync } = require("node:fs");
|
|
19
24
|
const { join } = require("node:path");
|
|
20
25
|
const { execSync } = require("node:child_process");
|
|
21
26
|
|