Fix: bun:sqlite fallback now actually works (#163)
Problem: Bun's require("better-sqlite3") returns a function stub that passes typeof checks but crashes when instantiated. Our v1.0.44 typeof check wasn't enough.
Fix: Now validates better-sqlite3 by actually instantiating new mod(":memory:"). When this crashes on Bun, the catch block correctly falls through to bun:sqlite via BunSQLiteAdapter.
Why this works: Bun has built-in FTS5 support (enabled via SQLITE_ENABLE_FTS5 since Bun v0.6.12). Our BunSQLiteAdapter provides the full better-sqlite3-compatible API including multi-statement .exec(), .pragma(), and .prepare() — everything needed for FTS5 virtual tables.
Thanks to @mikij for the detailed debugging.