Skip to content

Commit 89f86e4

Browse files
Use Node.js native sqlite instead of turso/libsql
Replaces @libsql/client with Node.js's built-in node:sqlite module. Changes: - Replace libsql/turso client with DatabaseSync from node:sqlite - Remove @libsql/client dependency from package.json - Remove --external:@libsql/client from bundler config - Add NODE_NO_WARNINGS=1 to suppress experimental sqlite warnings - Add explicit directory creation (was built-in with better-sqlite3) - Use db.exec() for PRAGMA statements (db.pragma() doesn't exist) - Wrap all operations in Promise.resolve() for FFI compatibility Benefits: - Zero external dependencies for SQLite - Simpler implementation (no remote database support needed) - Nearly identical API to the original better-sqlite3 version All tests pass (235/239, same as baseline - 4 pre-existing failures unrelated to SQLite changes).
1 parent 156ef65 commit 89f86e4

File tree

5 files changed

+143
-482
lines changed

5 files changed

+143
-482
lines changed

bin/index.dev.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env node
22

3+
// Suppress Node.js experimental warnings (specifically for SQLite)
4+
process.env.NODE_NO_WARNINGS = "1";
5+
36
import { main } from "../output/Main/index.js";
47

58
main();

bin/spago.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ package:
3131
minify: false
3232
platform: node
3333
type: app
34-
extraArgs:
35-
- "--external:@libsql/client"

0 commit comments

Comments
 (0)