fix(bun): update Dockerfile.bun entrypoint and native bun:sqlite instantiation (#11039) (#11163)

Cherry-picked onto the current tip (authorship preserved), noise stripped. Validated on BOTH runtimes: bun test tests/unit/db-adapters/ 44/44 under the pinned Bun 1.3.14 (native bun:sqlite path), and node --test on the same suite 52 pass / 0 fail / 1 skip (Bun-only adapter skips under Node, as designed). Dockerfile.bun entrypoint now matches the standalone runner shape. Follow-up to #11039. Thank you @rqzbeh!
This commit is contained in:
Rouzbeh†
2026-08-23 02:54:21 +03:30
committed by GitHub
parent 805252a924
commit 7246e5ac2d
2 changed files with 5 additions and 2 deletions

View File

@@ -224,7 +224,10 @@ export function createSyncDriverFactory(load: DriverLoader, betterSqliteProbe?:
const bunOptions: Record<string, unknown> = {};
if (options?.readonly === true) bunOptions.readonly = true;
if (options?.create === false && filePath !== ":memory:") bunOptions.create = false;
const db = new Database(filePath, bunOptions);
const db =
Object.keys(bunOptions).length > 0
? new Database(filePath, bunOptions)
: new Database(filePath);
return createBunSqliteAdapter(db, filePath);
} catch (err) {
logSwallowedDriverError("bun:sqlite", err);