@duckdb/node-bindings 1.5.1-r.2 → 1.5.2-r.2
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/README.md +5 -2
- package/duckdb.js +19 -2
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -6,8 +6,11 @@ See [@duckdb/node-api](https://www.npmjs.com/package/@duckdb/node-api) for a hig
|
|
|
6
6
|
|
|
7
7
|
### Supported Platforms
|
|
8
8
|
|
|
9
|
-
- Linux arm64
|
|
10
|
-
- Linux
|
|
9
|
+
- Linux arm64 glibc
|
|
10
|
+
- Linux arm64 musl
|
|
11
|
+
- Linux x64 glibc
|
|
12
|
+
- Linux x64 musl
|
|
11
13
|
- Mac OS X (Darwin) arm64 (Apple Silicon)
|
|
12
14
|
- Mac OS X (Darwin) x64 (Intel)
|
|
15
|
+
- Windows (Win32) arm64
|
|
13
16
|
- Windows (Win32) x64
|
package/duckdb.js
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
const getRuntimePlatformArch = () => `${process.platform}-${process.arch}`;
|
|
2
2
|
|
|
3
|
+
// detect-libc uses Node's own diagnostic report (glibcVersionRuntime) as
|
|
4
|
+
// its primary check, with subprocess fallbacks for unusual environments.
|
|
5
|
+
// Wrapped in try/catch so a detection failure falls back to glibc rather
|
|
6
|
+
// than breaking binding load entirely.
|
|
7
|
+
const isLinuxMusl = () => {
|
|
8
|
+
try {
|
|
9
|
+
const { familySync, MUSL } = require('detect-libc');
|
|
10
|
+
return familySync() === MUSL;
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
3
16
|
/**
|
|
4
17
|
* @throw Error if there isn't any available native binding for the current platform/arch.
|
|
5
18
|
*/
|
|
6
19
|
const getNativeNodeBinding = (runtimePlatformArch) => {
|
|
7
20
|
switch(runtimePlatformArch) {
|
|
8
21
|
case `linux-x64`:
|
|
9
|
-
return
|
|
22
|
+
return isLinuxMusl()
|
|
23
|
+
? require('@duckdb/node-bindings-linux-x64-musl/duckdb.node')
|
|
24
|
+
: require('@duckdb/node-bindings-linux-x64/duckdb.node');
|
|
10
25
|
case 'linux-arm64':
|
|
11
|
-
return
|
|
26
|
+
return isLinuxMusl()
|
|
27
|
+
? require('@duckdb/node-bindings-linux-arm64-musl/duckdb.node')
|
|
28
|
+
: require('@duckdb/node-bindings-linux-arm64/duckdb.node');
|
|
12
29
|
case 'darwin-arm64':
|
|
13
30
|
return require('@duckdb/node-bindings-darwin-arm64/duckdb.node');
|
|
14
31
|
case 'darwin-x64':
|
package/package.json
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duckdb/node-bindings",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2-r.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./duckdb.js",
|
|
6
6
|
"types": "./duckdb.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"detect-libc": "^2.1.2"
|
|
9
|
+
},
|
|
7
10
|
"optionalDependencies": {
|
|
8
|
-
"@duckdb/node-bindings-darwin-arm64": "1.5.
|
|
9
|
-
"@duckdb/node-bindings-darwin-x64": "1.5.
|
|
10
|
-
"@duckdb/node-bindings-linux-x64": "1.5.
|
|
11
|
-
"@duckdb/node-bindings-linux-arm64": "1.5.
|
|
12
|
-
"@duckdb/node-bindings-
|
|
13
|
-
"@duckdb/node-bindings-
|
|
11
|
+
"@duckdb/node-bindings-darwin-arm64": "1.5.2-r.2",
|
|
12
|
+
"@duckdb/node-bindings-darwin-x64": "1.5.2-r.2",
|
|
13
|
+
"@duckdb/node-bindings-linux-x64": "1.5.2-r.2",
|
|
14
|
+
"@duckdb/node-bindings-linux-arm64-musl": "1.5.2-r.2",
|
|
15
|
+
"@duckdb/node-bindings-linux-arm64": "1.5.2-r.2",
|
|
16
|
+
"@duckdb/node-bindings-linux-x64-musl": "1.5.2-r.2",
|
|
17
|
+
"@duckdb/node-bindings-win32-arm64": "1.5.2-r.2",
|
|
18
|
+
"@duckdb/node-bindings-win32-x64": "1.5.2-r.2"
|
|
14
19
|
},
|
|
15
20
|
"repository": {
|
|
16
21
|
"type": "git",
|