Skip to content

fix: declare OpenTelemetry test deps to unbreak typecheck on main#379

Merged
erichare merged 1 commit into
mainfrom
fix/declare-otel-test-deps
Jun 11, 2026
Merged

fix: declare OpenTelemetry test deps to unbreak typecheck on main#379
erichare merged 1 commit into
mainfrom
fix/declare-otel-test-deps

Conversation

@erichare

Copy link
Copy Markdown
Collaborator

Summary

CI (Lint, Typecheck, Test, Build) is failing on every branch since the typescript-runtime-deps Dependabot bump (#378) merged:

tests/lib/tracing.test.ts(17,8): error TS2307: Cannot find module '@opentelemetry/sdk-trace-base' or its corresponding type declarations.

tests/lib/tracing.test.ts (added with the OTel tracing work in #197) imports @opentelemetry/sdk-trace-base and @opentelemetry/sdk-trace-node, but neither was ever declared in runtimes/typescript/package.json — both resolved as phantom dependencies hoisted to the root of node_modules. The #378 bump regenerated the lockfile with sdk-trace-base@2.8.0 placed nested-only under its twelve consumers, so the root-level import no longer resolves. sdk-trace-node is still hoisted by luck, but is one bump away from the same failure.

Fix: declare both as devDependencies (^2.8.0, matching the bumped tree). The lockfile churn (-461 lines) is npm deduping the twelve nested sdk-trace-base copies back into a single hoisted entry — no version changes.

Validation

  • npm run typecheck passes in runtimes/typescript (previously TS2307)
  • npx vitest run tests/lib/tracing.test.ts — 3 passed
  • Full suite: 1954 tests passed (137 files)
  • Lockfile diff is dedupe-only; all sdk-trace-base entries remain 2.8.0

Unblocks CI for open PRs (e.g. #372, which hit this through no fault of its own). Note: the Docker Build job has a separate pre-existing failure (new OpenSSL CVEs in the Alpine base image flagged by today's grype DB) — not addressed here.

…deps

tests/lib/tracing.test.ts imports both packages, but neither was
declared — they only resolved as phantom dependencies hoisted to the
root of node_modules. The typescript-runtime-deps bump (#378) moved
@opentelemetry/sdk-trace-base 2.8.0 to nested-only placement under its
twelve consumers, so 'tsc --noEmit' now fails on every branch with
TS2307 (Cannot find module '@opentelemetry/sdk-trace-base').

Declaring both as devDependencies pins them at the root; the lockfile
churn is npm deduping the twelve nested sdk-trace-base copies back
into the single hoisted entry.
@erichare erichare merged commit a41e69c into main Jun 11, 2026
13 checks passed
@erichare erichare deleted the fix/declare-otel-test-deps branch June 11, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant