The ./types subpath re-exported QueueInstrumentationConfig from src/otel.ts.
That single line made the generated barrel declaration side-effect import
'@opentelemetry/api' and '@opentelemetry/instrumentation', so consumers who
never touch the instrumentation had to install both optional peers to type
check any import from '@boringnode/queue/types'.
The package already exposes a ./otel subpath for consumers who do want the
instrumentation types, so the type stays reachable where its dependencies
belong.
BREAKING CHANGE: QueueInstrumentationConfig is no longer exported from
'@boringnode/queue/types'. Import it from '@boringnode/queue/otel'.
Closes #26.
Problem
src/types/index.ts re-exported one type from the OpenTelemetry module:
That pulled two optional peer dependencies into the generated barrel declaration:
so every consumer importing any type from @boringnode/queue/types had to install both, even
when they never touch the instrumentation.
Change
The re-export is removed. The package already ships a dedicated ./otel subpath for consumers who
do want the instrumentation types, so nothing becomes unreachable:
JobDispatchMessage and JobExecuteMessage, exported one line above, are unaffected —
src/types/tracing_channels.ts imports no OpenTelemetry types.
The generated barrel now has no OpenTelemetry imports left:
Verification
Reproduction from the issue — npm pack of this branch installed in a clean project with
typescript@7.0.2, @types/node@25.9.4, knex@3.1.0, no @opentelemetry/* installed, and
import type { JobData } from '@boringnode/queue/types':
yarn typecheck, yarn lint and yarn format are clean (the two oxlint warnings in
src/otel.ts and tests/sync_adapter.spec.ts are pre-existing on main). Nothing changes at
runtime — export type is erased, so only the declaration surface is affected.
Note on the breaking change
This is breaking for anyone importing QueueInstrumentationConfig from @boringnode/queue/types
today. Given that the instrumentation is documented as experimental and has its own subpath, this
seemed like the right place for it, but say the word if you would rather schedule it for the next
major and I will hold the PR.