Skip to content
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

chore: remove lerna #2526

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

david-luna
Copy link
Contributor

@david-luna david-luna commented Nov 13, 2024

Which problem is this PR solving?

This is a follow up PR of #2493. It removes lerna as a dependency and also from the CI workflows. All scripts and lerna commands have been replaced by its equivalent in nx (lerna was using them internally) or custom scripts.

Changes

  • remove unnecessary scripts in packages (precompile & prewatch)
  • remove lerna dependency
  • update scripts/peer-api-check.mjs to work at the root level and the dependant workflows
  • add publish-to-npm.mjs script and update the release workflow
  • added a focus npm script for people who does not want to compile all project to start developing
  • added scripts/bump-package-versions.mjs to help with manual releases
  • update docs

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.75%. Comparing base (6ee7e7f) to head (67723d6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2526   +/-   ##
=======================================
  Coverage   90.75%   90.75%           
=======================================
  Files         169      169           
  Lines        8018     8018           
  Branches     1632     1632           
=======================================
  Hits         7277     7277           
  Misses        741      741           

@@ -18,17 +18,22 @@
"^compile"
],
"inputs": [
"{projectRoot}/src",
"{projectRoot}/test"
"{projectRoot}/src/**/*.ts",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note to reviewer: although nx documentation says using folder names is okay I found this option to be more sensitive to changes.

@@ -19,4 +19,4 @@ jobs:
run: npm ci

- name: Check API dependency semantics
run: npx lerna exec "node \$LERNA_ROOT_PATH/scripts/peer-api-check.js"
run: node ./scripts/peer-api-check.js
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note for reviewer: this script was used only here so now it's changed to walk over all packages to do the API check.

- name: Install lerna
run: npm install -g [email protected]
- name: Install glob
run: npm install glob
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note for reviewer: necessary dependency for the next step

@@ -90,19 +90,14 @@ Create a pull request titled `chore: x.y.z release proposal`. The commit body sh

Merge the PR, and pull the changes locally (using the commands in the first step). Ensure that `chore: x.y.z release proposal` is the most recent commit.

## Publish all packages
## Compile all packages
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note to reviewer: IMO this step was missing since npm publish will pack and publish the packages in whatever state it is. With a full compilation everything should be in the right state for publishing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

note to self: although manual release is unlikely to happen we should provide a way to do it. So we need to provide an alternative to the command lerna publish --skip-npm --no-git-tag-version --no-push

Do not merge this PR until this is resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is now implemented in ./scripts/bump-package-versions.mjs

@david-luna david-luna marked this pull request as ready for review November 13, 2024 16:29
@david-luna david-luna requested a review from a team as a code owner November 13, 2024 16:29
Copy link
Contributor

This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature.
Are you familiar with this package? Consider becoming a component owner.

@pichlermarc pichlermarc added dependencies Pull requests that update a dependency file and removed pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found. pkg-status:unmaintained:autoclose-scheduled labels Nov 25, 2024
@github-actions github-actions bot added the pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found. label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file pkg:auto-configuration-propagators pkg:auto-instrumentations-node pkg:auto-instrumentations-web pkg:host-metrics pkg:id-generator-aws-xray pkg:instrumentation-amqplib pkg:instrumentation-aws-lambda pkg:instrumentation-aws-sdk pkg:instrumentation-bunyan pkg:instrumentation-cassandra-driver pkg:instrumentation-connect pkg:instrumentation-cucumber pkg:instrumentation-dataloader pkg:instrumentation-dns pkg:instrumentation-document-load pkg:instrumentation-express pkg:instrumentation-fastify pkg:instrumentation-fs pkg:instrumentation-generic-pool pkg:instrumentation-graphql pkg:instrumentation-hapi pkg:instrumentation-ioredis pkg:instrumentation-knex pkg:instrumentation-koa pkg:instrumentation-long-task pkg:instrumentation-lru-memoizer pkg:instrumentation-memcached pkg:instrumentation-mongodb pkg:instrumentation-mongoose pkg:instrumentation-mysql pkg:instrumentation-mysql2 pkg:instrumentation-nestjs-core pkg:instrumentation-net pkg:instrumentation-pg pkg:instrumentation-pino pkg:instrumentation-redis pkg:instrumentation-redis-4 pkg:instrumentation-restify pkg:instrumentation-router pkg:instrumentation-runtime-node pkg:instrumentation-socket.io pkg:instrumentation-tedious pkg:instrumentation-undici pkg:instrumentation-user-interaction pkg:instrumentation-winston pkg:plugin-react-load pkg:propagation-utils pkg:propagator-aws-xray pkg:propagator-aws-xray-lambda pkg:propagator-instana pkg:propagator-ot-trace pkg:redis-common pkg:resource-detector-alibaba-cloud pkg:resource-detector-aws pkg:resource-detector-azure pkg:resource-detector-container pkg:resource-detector-gcp pkg:resource-detector-github pkg:resource-detector-instana pkg:sampler-aws-xray pkg:sql-common pkg:test-utils pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found.
Projects
None yet
Development

Successfully merging this pull request may close these issues.