Repository navigation
chore: remove redundant module field from package.json files - #7130
Merged
trentm merged 3 commits intoSep 28, 2026
Merged
Conversation
Pull request dashboard statusMerged · refreshed 2026-09-28 22:28 UTC Status above doesn't look right?
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7130 +/- ##
=======================================
Coverage 95.11% 95.11%
=======================================
Files 384 384
Lines 13476 13476
Branches 3095 3095
=======================================
Hits 12818 12818
Misses 658 658 🚀 New features to boost your workflow:
|
overbalance
marked this pull request as draft
September 28, 2026 19:08
overbalance
marked this pull request as ready for review
September 28, 2026 19:22
trentm
approved these changes
Sep 28, 2026
wolfgangcodes
added a commit
to wolfgangcodes/opentelemetry-js
that referenced
this pull request
Oct 12, 2026
…fault condition The exports map now uses the "require" and "default" conditions, as in open-telemetry#7132. The package.json file also drops the "module" field, as in open-telemetry#7130. Assisted-by: Claude Opus 5.5 Signed-off-by: Wolfgang Therrien <wolfgang@wolfgangcodes.com>
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
Removes the legacy
modulefield from every package that already declares anexportsmap pointing at./dist/index.mjs.Bundlers that support
exports(webpack 5+, Rollup, esbuild, Vite, Parcel 2) resolve through it and ignoremodule, so the field is dead weight. Webpack 4 is the main consumer that only readsmodule, and it is no longer supported.mainandtypesstay in place for tools that predateexports.Tree-shaking test change
The API tree-shaking test imported from
'../../'. Webpack applies theexportsmap only to bare package specifiers, so a relative directory import falls back tomainFields(browser,module,main). Withmodulegone it resolvedmain(dist/index.cjs), which webpack cannot tree-shake, and every API landed in the bundle.The test now imports from
'@opentelemetry/api', which resolves throughexportstodist/index.mjs. This is the same path real consumers take, so the test now checks what users actually get.