prisma-adapter-bun-sqlite v0.8.0 is a Prisma driver adapter for Bun's native SQLite (bun:sqlite). It requires Bun >=1.3.0 and @prisma/client ^7.0.0, ships TypeScript types, and has zero dependencies beyond Bun. It supports WAL mode, safe integers, timestamp format options (iso8601/unixepoch-ms), programmatic migrations, and is designed for single-binary deployment with `bun build --compile`. Unlike alternatives (libsql, better-sqlite3), it uses Bun's native SQLite, is fully tested with 154 tests including 39 from Prisma's official suite, and provides proper error mapping to Prisma error codes (P2002, P2003, etc.). Release cadence: active development with frequent releases.
npm install prisma-adapter-bun-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic setup: import PrismaBunSqlite and generated PrismaClient, instantiate adapter with url, create PrismaClient, perform CRUD, and optionally run programmatic migrations.
Use `new PrismaBunSqlite({ url: 'file:./db.sqlite' })` instead of `new PrismaBunSqlite('file:./db.sqlite')`.Remove `maxBoundLength`; not needed in v0.8.0.
Update schema.prisma to set `output` and import from that path (e.g., './prisma/generated/client').
Use a file-based URL for persistent storage.
Update Bun to version 1.3.0 or later.
Use `synchronous: 'FULL'` or omit WAL for maximum safety; WAL with `NORMAL` is faster but less durable.
Run `bun add prisma-adapter-bun-sqlite` and ensure Bun >=1.3.0.
Import PrismaClient from the generated output file (e.g., './prisma/generated/client').
Ensure the path points to an existing file or use `:memory:` for in-memory. For file: paths, create the directory first.
Ensure `PrismaClient` is correctly instantiated with `{ adapter }` and the generated client is up-to-date (`bunx prisma generate`).