refactor: replace lerna with maintained fork lerna-lite #4404
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the introduction of yarn 2 and its advanced workspace capabilities (like pnpm) we will have an easier time referring to other packages via the workspace protocol (https://yarnpkg.com/features/workspaces#workspace-ranges-workspace).
The following problem occurs now:
Since we use lerna to publish, we rely on lerna to support the new yarn command, that is used to replace the "workspace" version with the latest version numbers. This ticket (lerna/lerna#2564) mentions active work on the feature, but it is two years old, and the feature is not implemented yet.
Since lerna is not very actively maintained and doesn't support newer protocols like "workspaces" from yarn 2 and pnpm, a switch to the actively maintained lerna-lite needs to happen. Lerna-lite takes a new approach to lerna, is fully written in Typescript, includes the workspace - protocol already and is actively maintained (https://github.com/ghiscoding/lerna-lite).
It should be a drop in replacement because lerna-lite uses the workspace-protocol under the hood and recommends using workspaces as dependencies inside the packages (https://github.com/ghiscoding/lerna-lite/tree/main/packages/version#workspace-protocol)