Commit 89f86e4
committed
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- bin
- src/Spago
5 files changed
+143
-482
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
0 commit comments