-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Drop lerna #4258
Drop lerna #4258
Conversation
"packages/validator", | ||
"packages/flare", | ||
"packages/fork-choice", | ||
"packages/beacon-node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hardcoded list is sorted topologically. Yarn v1 does not support topological inference out of the box, so this does the trick. Long term we can switch to newer versions of yarn that do this automatically.
"test:unit": "nyc --cache-dir .nyc_output/.cache -e .ts mocha 'test/unit/**/*.test.ts'", | ||
"check-readme": "typescript-docs-verifier" | ||
"test:e2e": "echo 'n/a'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn v1 workspace run
util requires all packages to have the script declared
"test:unit": "nyc --cache-dir .nyc_output/.cache -e .ts mocha 'test/unit/**/*.test.ts'", | ||
"check-readme": "typescript-docs-verifier" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI only items like check-readme
, coverage
and build:typedocs
and handled by other scripts only meant for CI
|
||
for d in $WORKSPACE_DIR/* ; do | ||
(cd "$d" && eval "$@") | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lerna exec <cmd>
implemented in 3 lines of bash
// Set monorepo version to `1.1.0` | ||
shell(`lerna version ${packageVersion} --no-git-tag-version --force-publish --yes`); | ||
// Set monorepo version to `1.1.0`. Use tilde to apply only patch releases, not minor | ||
shell(`node scripts/release/set_version.mjs ${packageVersion} tilde`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tilde here means inter-monorepo deps with be ~0.40.0
such that only patch releases can be installed in that range. ^0.40.0
applies to minor releases too.
exitIf(!tag, "<tag> not set"); | ||
|
||
for (const dirpath of resolveMonorepoDirpaths()) { | ||
shell(`npm publish --tag ${tag}`, {cwd: dirpath}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm publish
is very simple, just tar files and upload. No surprises.
Performance Report✔️ no performance regression detected Full benchmark results
|
Discussion in discord:
|
Putting as draft until:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
After discussions with the team, we will stick with Lerna for now |
Motivation
lerna has been used in this monorepo for +3y (added in #324). While useful we have had to battle this tool more than treat it like a helpful item:
It also deprecates scripts introduced here, not used currently AFAIK
Description
We use lerna for three actions:
yarn workspaces run <cmd>
scripts/release/set_version.mjs
scripts/release/publish.mjs
Please check the new scripts and you'll see they are really simple. I don't think they justify a tool so heavy and problematic like lerna. I don't guarantee this PR won't introduce bugs for each type of release, but fixing those should be trivial now that we control the tooling.
Please note that we have dropped 2_300 lines of dependencies from yarn.lock 🎉