bunqueue v2.7.11
blog · release
bunqueue v2.7.11
Fixes 1 bug. defineConfig caused "Failed to listen at 0.0.0.0" when used in config file (Issue #85, reported by @timnew), src/main.ts re-executes its top-level dispatch on every import.
To install bunqueue v2.7.11
Section titled “To install bunqueue v2.7.11”bun add bunqueue@2.7.11npm install bunqueue@2.7.11To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”defineConfigcaused “Failed to listen at 0.0.0.0” when used in config file (Issue #85, reported by @timnew),src/main.tsre-executes its top-level dispatch on every import. Runningbunqueue start -c typed.tsstarted the server, thenloadConfigFile()imported the user config which importsdefineConfigfrom'bunqueue'→ resolves todist/main.js→ top-level code seesargv[2] === 'start'and re-invokes the CLI, attempting a second bind on the same port. Wrapped the top-level CLI/server dispatch and the Logger env-var bootstrap inif (import.meta.main)so importing the package entry (fordefineConfigor other re-exports) has no side effect. Behavior whensrc/main.tsis the actual entry (e.g.bun run src/main.ts, compiled binary) is unchanged.
- New regression test
test/issue-85-config-import-side-effect.test.ts, spawns a subprocess that importssrc/main.tswithprocess.argvemulatingbunqueue start, asserts no server banner/bind logs.