From 7246e5ac2d56d6eb7d2eb49b1ece7f9eb00dde37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rouzbeh=E2=80=A0?= <78313022+rqzbeh@users.noreply.github.com> Date: Sun, 23 Aug 2026 02:54:21 +0330 Subject: [PATCH] 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! --- Dockerfile.bun | 2 +- src/lib/db/adapters/driverFactory.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile.bun b/Dockerfile.bun index 1804d3f788..abdb735a44 100644 --- a/Dockerfile.bun +++ b/Dockerfile.bun @@ -86,4 +86,4 @@ EXPOSE 20128 HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ CMD bun healthcheck.mjs || exit 1 -ENTRYPOINT ["bun", "bin/omniroute.mjs", "serve", "--no-open"] +ENTRYPOINT ["bun", "dev/run-standalone.mjs"] diff --git a/src/lib/db/adapters/driverFactory.ts b/src/lib/db/adapters/driverFactory.ts index 64c06153db..304b334bd8 100644 --- a/src/lib/db/adapters/driverFactory.ts +++ b/src/lib/db/adapters/driverFactory.ts @@ -224,7 +224,10 @@ export function createSyncDriverFactory(load: DriverLoader, betterSqliteProbe?: const bunOptions: Record = {}; 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);