Skip to content

Conversation

@pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Sep 29, 2025

Which problem is this PR solving?

Drops lerna for nx wherever possible. This is necessary as

  • we need to use lerna@9 for publishing with OIDC, and it might not work with Node.js <20.19 - also it pulls in a newer nx version that drops support for this Node.js version.
  • so by depending on nx@20 and lerna@9 we can use the older nx version for dev and testing, and the newerlerna version for publishing. Once we drop support for older Node.js versions, we can start using the same versions again.

The setup on the nx scripts is heavliy based on the migration work that @david-luna did in the contrib repo 🙂 A nice side-effect of this PR is that we will be closer aligned with contrib tooling.

Full disclosure: I did ✨vibe-code✨ the bump-versions.mjs script. I think it turned out alright.

@pichlermarc pichlermarc force-pushed the chore/ditch-lerna-except-for-publishing branch from 218903d to cd575d0 Compare September 29, 2025 12:58
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.17%. Comparing base (a594098) to head (b0a88e6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5965   +/-   ##
=======================================
  Coverage   95.17%   95.17%           
=======================================
  Files         316      316           
  Lines        8521     8521           
  Branches     1763     1763           
=======================================
  Hits         8110     8110           
  Misses        411      411           
🚀 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.

@pichlermarc pichlermarc force-pushed the chore/ditch-lerna-except-for-publishing branch from e14008e to e36bb56 Compare September 30, 2025 08:39
@pichlermarc pichlermarc force-pushed the chore/ditch-lerna-except-for-publishing branch from e36bb56 to 71d60f2 Compare September 30, 2025 08:40
Comment on lines +45 to +47
"peerDependencies": {
"@opentelemetry/api": "^1.9.0"
},
Copy link
Member Author

Choose a reason for hiding this comment

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

note: this was failing on the peer-api-check - I'm not sure why we did not include it for experimental packages, it should also apply to these.

Comment on lines +22 to +23
- name: Install script dependencies
run: npm ci --ignore-scripts
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: I did this here as a drive-by. Will do this where possible in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in #5971

"prepare_release:semconv:patch": "npm run _check:no_changes && npm run _backup:package-json && npm run _lerna:remove_everything_except_semconv && npm run _lerna:version_patch && npm run _restore:package-json && npm run _changelog:prepare_semconv",
"prepare_release:semconv:minor": "npm run _check:no_changes && npm run _backup:package-json && npm run _lerna:remove_everything_except_semconv && npm run _lerna:version_minor && npm run _restore:package-json && npm run _changelog:prepare_semconv",
"prepare_release:all:minor": "npm run _check:no_changes && npm run _backup:package-json && npm run _lerna:remove_api && npm run _lerna:remove_semconv && npm run _lerna:version_minor && cd api/ && npm version minor && cd .. && lerna run align-api-deps && npm run _restore:package-json && npm run _changelog:prepare_all",
"prepare_release:experimental": "npm run _check:no_changes && npm run _backup:package-json && npm run _workspace:remove_api && npm run _workspace:remove_semconv && npm run _workspace:remove_stable && npm run _workspace:bump_version && npm run _restore:package-json && npm run _changelog:prepare_experimental",
Copy link
Member Author

@pichlermarc pichlermarc Sep 30, 2025

Choose a reason for hiding this comment

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

note: lerna was not really necessary for these and I opted to use a custom script instead. Since we need to bump all packages in unison we were mostly working around lerna. The new script scripts/bump-versions.mjs gives us more control and allows us to simplify these scripts further in the future.

I did not go all the way as this is the minimal thing we needed to get it working without lerna :)

@pichlermarc pichlermarc marked this pull request as ready for review September 30, 2025 09:32
@pichlermarc pichlermarc requested a review from a team as a code owner September 30, 2025 09:32
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.

a nit and a question

@pichlermarc pichlermarc added this pull request to the merge queue Oct 1, 2025
Merged via the queue into open-telemetry:main with commit 875cbca Oct 1, 2025
25 checks passed
@pichlermarc pichlermarc deleted the chore/ditch-lerna-except-for-publishing branch October 1, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants