mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 00:54:19 +01:00
testing/javascript: Fix libSQL connection setup
The API changed in libSQL to be async.
This commit is contained in:
@@ -489,9 +489,9 @@ const connect = async (path, options = {}) => {
|
||||
return [db, path, SqliteError];
|
||||
}
|
||||
if (provider === "libsql") {
|
||||
const x = await import("libsql/promise");
|
||||
const db = new x.default(path, options);
|
||||
return [db, path, x.SqliteError, path];
|
||||
const libsql = await import("libsql/promise");
|
||||
const db = await libsql.connect(path, options);
|
||||
return [db, path, libsql.SqliteError, path];
|
||||
}
|
||||
if (provider === "serverless") {
|
||||
const x = await import("@tursodatabase/serverless");
|
||||
|
||||
6046
testing/javascript/package-lock.json
generated
6046
testing/javascript/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,6 @@
|
||||
"@tursodatabase/serverless": "../../packages/turso-serverless",
|
||||
"@tursodatabase/database": "../../bindings/javascript",
|
||||
"better-sqlite3": "^11.9.1",
|
||||
"libsql": "^0.5.17"
|
||||
"libsql": "^0.6.0-pre.16"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user