Skip to content

chore: reduce duplicate dep installs with 'npm dedupe' #2840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

Conversation

trentm
Copy link
Contributor

@trentm trentm commented May 21, 2025

npm ci
npm dedupe

See #2671 (comment) for the motivation for my doing this. From skimming this change I notice that our typescript@5.0.4 usage was being installed in every separate package rather than at the top-level because of some history of how we installed this version and other transitive deps have a dep on a different typescript version.

A surprising result is how much smaller the npm ci result is. This is on a clean checkout and npm ci:

% du -sh *
916M	opentelemetry-js-contrib-after
3.7G	opentelemetry-js-contrib-before

@trentm trentm self-assigned this May 21, 2025
@trentm trentm requested a review from a team as a code owner May 21, 2025 23:27
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.64%. Comparing base (ab438a0) to head (adc5e53).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2840      +/-   ##
==========================================
- Coverage   89.69%   89.64%   -0.05%     
==========================================
  Files         184      184              
  Lines        9032     9032              
  Branches     1852     1852              
==========================================
- Hits         8101     8097       -4     
- Misses        931      935       +4     

see 1 file with indirect coverage changes

🚀 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.

Copy link
Contributor

@david-luna david-luna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you :)

I'll check if we have a similar situation in contrib repo.

@trentm trentm enabled auto-merge (squash) May 22, 2025 16:11
@trentm trentm merged commit 3a5378c into open-telemetry:main May 22, 2025
20 checks passed
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.

3 participants