fix: declare OpenTelemetry test deps to unbreak typecheck on main#379
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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(added with the OTel tracing work in #197) imports@opentelemetry/sdk-trace-baseand@opentelemetry/sdk-trace-node, but neither was ever declared inruntimes/typescript/package.json— both resolved as phantom dependencies hoisted to the root ofnode_modules. The #378 bump regenerated the lockfile withsdk-trace-base@2.8.0placed nested-only under its twelve consumers, so the root-level import no longer resolves.sdk-trace-nodeis 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 nestedsdk-trace-basecopies back into a single hoisted entry — no version changes.Validation
npm run typecheckpasses inruntimes/typescript(previously TS2307)npx vitest run tests/lib/tracing.test.ts— 3 passedUnblocks CI for open PRs (e.g. #372, which hit this through no fault of its own). Note: the
Docker Buildjob has a separate pre-existing failure (new OpenSSL CVEs in the Alpine base image flagged by today's grype DB) — not addressed here.