r/bun • u/siddiksawani • 4h ago
After import succeeds: 19 npm behavior probes on Bun, Node and Deno (raw results)
I maintain CompatLab. Our first study mostly found that popular npm packages loaded successfully, so this follow-up tests what happens when you actually call an API.
We froze 24 package versions chosen for native addons, workers, loader hooks and other Node-specific behavior. Nineteen received named behavior probes; nine had upstream suite or subset attempts, with some overlap. On Linux amd64, Node 26.10.0 and Deno 2.9.7 passed all 19 named probes. Bun 1.4.2 passed 15; the four differences also reproduced on Bun 1.4.4. This deliberately selected sample is not an npm-wide compatibility percentage.
The useful cases were:
• [email protected]: the rebuilt binding failed under its original filename, but a byte-identical renamed copy and the shipped prebuild worked. This independently reproduces earlier work in Bun PR #47648: https://github.com/oven-sh/bun/pull/47648
• [email protected]: the worker started, but our thread task timed out; a package-free message-channel reduction reproduced it.
• [email protected]: import succeeded, then creating the loader hit missing module.registerHooks.
• [email protected]: the timer callback lost its namespace value.
These have prior upstream reports or documented API gaps, linked in the article. The broader suites also exposed failing Node baselines and unequal coverage. Deno's original full Import-fresh suite timed out after two tests.
Update (November 16): we isolated a cross-test async-context leak after a dynamic import on Deno 2.9.7 and 2.9.8. Explicitly binding test callbacks lets all 69 tests finish: 65 pass and four still fail on each Deno version; Node passes all 69. The four failures also reproduce individually without the adapter. This is a runner workaround, not a released Deno fix. Follow-up method and raw receipts; upstream reproduction. The original study data remains unchanged.
The tests ran in disposable gVisor containers with networking disabled during execution, pinned runtimes and dependencies, and Deno -A. Selected native build/install hooks ran offline in the sandbox. Raw JSON/CSV, source pins, replays and limitations are here:
I'd appreciate corrections to the probes or interpretation, especially a counterexample on the same package/runtime versions. Which real application behavior should we test next? Public reproductions are welcome; please leave out private code and credentials.
AI assisted the analysis and drafting; the linked receipts preserve the actual executions.