feat(node) Move native packages to @lancedb NPM org (#341)

- Move native packages to @lancedb org
- Move package-lock.json update to a reusable action and created a target to run it manually.
This commit is contained in:
gsilvestrin
2023-07-20 12:54:39 -07:00
committed by GitHub
parent 0cf40c8da3
commit a2bb497135
8 changed files with 138 additions and 163 deletions

View File

@@ -17,7 +17,7 @@ const { currentTarget } = require('@neon-rs/load');
let nativeLib;
try {
nativeLib = require(`vectordb-${currentTarget()}`);
nativeLib = require(`@lancedb/vectordb-${currentTarget()}`);
} catch (e) {
try {
// Might be developing locally, so try that. But don't expose that error
@@ -25,12 +25,12 @@ try {
nativeLib = require("./index.node");
} catch {
throw new Error(`vectordb: failed to load native library.
You may need to run \`npm install vectordb-${currentTarget()}\`.
You may need to run \`npm install @lancedb/vectordb-${currentTarget()}\`.
If that does not work, please file a bug report at https://github.com/lancedb/lancedb/issues
Source error: ${e}`);
}
}
}
// Dynamic require for runtime.