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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.67%. Comparing base (825441a) to head (ef827e5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2840      +/-   ##
==========================================
+ Coverage   89.62%   89.67%   +0.04%     
==========================================
  Files         185      185              
  Lines        9014     9014              
  Branches     1849     1849              
==========================================
+ Hits         8079     8083       +4     
+ Misses        935      931       -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.

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