Skip to content

fix(verify-pack): resolve workspace deps so entry points fully load - #7138

Merged
overbalance merged 2 commits into
open-telemetry:mainfrom
embrace-io:overbalance/verify-pack-resolve-deps
Sep 29, 2026
Merged

overbalance merged 2 commits into
open-telemetry:mainfrom
embrace-io:overbalance/verify-pack-resolve-deps

Conversation

@overbalance

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

verify-pack extracts each tarball into os.tmpdir(). From there, Node cannot find the repo's node_modules, so every import of a sibling workspace package fails. The script logs these as skip (declared dependency, not packed) and still reports ok.

On main, a run logs 119 skips. Only 4 of 38 packages (api, api-logs, semantic-conventions, propagator-env-carrier) load fully. For the other 34, the CJS entry stops at its first require of a dependency, and the ESM entry fails to link before it runs. The require/import check then proves little more than "the file exists in the tarball".

Short description of the changes

Create the scratch directory in the root node_modules. Dependencies now resolve to the built workspace packages, and self-references still resolve to the extracted tarball. walk() already skips node_modules, so the scratch copy is not picked up as a package. The skip path in handleLoadError stays as a fallback for third-party dependencies that are not installed.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • npm run compile, then npm run verify-pack: 0 skips (was 119), all 38 packages pass.
  • Deleted packages/opentelemetry-core/dist/utils/url.{cjs,mjs} and ran both versions:
    • main: ok @opentelemetry/core with 6 skips.
    • This branch: FAIL @opentelemetry/core, with require(".") and import(".") both reporting the missing file.

Checklist:

  • Followed the style guidelines of this project

@overbalance
overbalance requested a review from a team as a code owner September 29, 2026 17:42
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-09-29 22:05 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.04%. Comparing base (f443abe) to head (3939e22).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7138   +/-   ##
=======================================
  Coverage   95.04%   95.04%           
=======================================
  Files         383      383           
  Lines       13468    13468           
  Branches     3100     3100           
=======================================
  Hits        12801    12801           
  Misses        667      667           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@overbalance
overbalance added this pull request to the merge queue Sep 29, 2026
Merged via the queue into open-telemetry:main with commit adfb90e Sep 29, 2026
25 checks passed
@overbalance
overbalance deleted the overbalance/verify-pack-resolve-deps branch September 29, 2026 22:04
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.

2 participants