better-sqlite3 loaded in our Bun run. The exception showed up when the test opened a database.
I maintain CompatLab, an open source tool for comparing how published npm versions load on Node.js, Bun and Deno. In our November behavior study, better-sqlite3@13.2.0 loaded on Bun 1.4.4, but opening a database with the binding built from source failed. A byte-identical copy worked when the package selected it under another filename. The shipped prebuild also worked. Bun PR #47648 identified the filename check before our study. Our replay covered the same binary under both names.
If you are checking a migration, that distinction gives you a better first test than importing every dependency in the lockfile.
Test the first call your app makes
Put the smoke script next to your app and use the dependencies you already installed from its lockfile. For SQLite, one useful first check is opening an in-memory database and executing a parameterized query. This is a minimal app check. The original study used a separate probe and explicitly selected each binding.
// sqlite-smoke.cjs const assert = require("node:assert/strict"); const Database = require("better-sqlite3"); const db = new Database(":memory:"); try { const row = db.prepare("SELECT ? AS answer").get(42); assert.equal(row.answer, 42); } finally { db.close(); } Run node sqlite-smoke.cjs on your current Node version and bun run sqlite-smoke.cjs on your target Bun version. Use the same prepared app directory for the runtime comparison. Then repeat against the dependencies and native build you will actually ship. A locally built binding and a container prebuild may exercise different paths.
For a worker pool, submit one task, wait for the result, and shut the pool down. For async context, run two concurrent requests and assert that each callback sees its own value. In each case, check an output your app relies on. A process that starts successfully can still fail there.
Keep the two results beside each other
In a migration PR, record the exact npm version, import path, runtime version and how the dependency was installed. Write down the load result and the operation result. If the Node baseline also fails, fix the fixture or investigate that baseline before attributing the difference to Bun.
Our public CompatLab reports can supply the loading side of that check. Look up the version from your lockfile and open the row for the path your app imports. The 24-package behavior study has the SQLite variants, exact environment, raw results and replay instructions. It used deliberately selected cases, so its counts apply to those cases.
If a dependency loaded during your own migration and broke on a later call, which call would have caught it?


