DashboardcliSQLite dual-driver architecture and WAS…

SQLite dual-driver architecture and WASM packaging

Category: architecture
Confidence: 0.80
ID: 01a08736-4e89-734f-9032-40bafb766d99
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 1
Source session: 0mwQmFM4Rry2OuPS9
Created: 2026-07-16 12:22:36
Updated: 2026-09-09 17:27:58

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 2 12h ago

Content

Support Node 18+ through two SQLite drivers: built-in node:sqlite on Node 22.15+ and node-sqlite3-wasm on older supported versions. The adapter must handle incompatible bindings: the WASM driver always spreads parameters, maps undefined to null, and needs a manual transaction wrapper. Externalize the WASM module during builds, ship its .wasm asset, and resolve it through locateFile. Build packages on Node 22.15+ and smoke-test the supported Node matrix so CI exercises the fallback. Never bundle the WASM driver into the standalone SEA binary. When changing this layer, inspect actual SQLite usage and preserve automatic driver selection after tests to avoid leaked forced state.

Move to: