@duckdb/node-bindings 1.4.2-r.1 → 1.4.3-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.
Files changed (2) hide show
  1. package/duckdb.js +6 -2
  2. package/package.json +6 -6
package/duckdb.js CHANGED
@@ -16,8 +16,12 @@ const getNativeNodeBinding = (runtimePlatformArch) => {
16
16
  case 'win32-x64':
17
17
  return require('@duckdb/node-bindings-win32-x64/duckdb.node');
18
18
  default:
19
- const [platform, arch] = runtimePlatformArch.split('-')
20
- throw new Error(`Error loading duckdb native binding: unsupported arch '${arch}' for platform '${platform}'`);
19
+ const [platform, arch] = runtimePlatformArch.split('-');
20
+ try {
21
+ return require(`@duckdb/node-bindings-${platform}-${arch}/duckdb.node`);
22
+ } catch (err) {
23
+ throw new Error(`Error loading duckdb native binding: unsupported arch '${arch}' for platform '${platform}'`);
24
+ }
21
25
  }
22
26
  }
23
27
 
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@duckdb/node-bindings",
3
- "version": "1.4.2-r.1",
3
+ "version": "1.4.3-r.2",
4
4
  "license": "MIT",
5
5
  "main": "./duckdb.js",
6
6
  "types": "./duckdb.d.ts",
7
7
  "optionalDependencies": {
8
- "@duckdb/node-bindings-darwin-arm64": "1.4.2-r.1",
9
- "@duckdb/node-bindings-darwin-x64": "1.4.2-r.1",
10
- "@duckdb/node-bindings-linux-x64": "1.4.2-r.1",
11
- "@duckdb/node-bindings-linux-arm64": "1.4.2-r.1",
12
- "@duckdb/node-bindings-win32-x64": "1.4.2-r.1"
8
+ "@duckdb/node-bindings-darwin-x64": "1.4.3-r.2",
9
+ "@duckdb/node-bindings-darwin-arm64": "1.4.3-r.2",
10
+ "@duckdb/node-bindings-linux-arm64": "1.4.3-r.2",
11
+ "@duckdb/node-bindings-linux-x64": "1.4.3-r.2",
12
+ "@duckdb/node-bindings-win32-x64": "1.4.3-r.2"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",