Almost exactly a month ago we (Nrwl & the Nx team) took over stewardship of Lerna.
It has been a wild ride since then 🤯. We..
- made ourselves familiar with the codebase, improved local development and releases for testing with Verdaccio, started setting up e2e tests and tons of more improvements to the development process
- released Lerna 5.0 a couple of weeks later, with some important deprecated package upgrades and security fixes
- processed 84+ issues so far
- started experimenting to solve one of the main pain points Lerna users experience: scaling and speed.
And now, 1 month later I'm excited to announce our next release! Here's all you need to know.
Also check out the latest Nx Show where we talked all about Lerna v5 and the roadmap going forward.
Immediately after the 5.0 maintenance release, we started looking into one of the biggest pain points we have been hearing from Lerna users: scaling & speed.
Lerna uses two open-source packages
p-queue for scheduling its tasks. The industry has advanced meanwhile, though. And there are better and more efficient alternatives. Starting with v5.1 we, therefore, added a 3rd option, to use the
Note, Nx is and has always been open source following the MIT license
Delegating task scheduling to Nx allows to speed up any Lerna workspace in the range of 2-10 times. Check out our public benchmark which compares Lerna with other popular JS based monorepo tools.
To make Lerna faster, all you need to do is to
- install the
- set the
useNxproperty to true in
Read all about it on Lerna's new guide about "Running Tasks".
Alongside our own fixes and features, we've been delighted to reignite community contributions to the Lerna codebase, including merging several existing PRs.
We were grateful to receive and merge various documentation improvements from the community, as well as some key fixes:
@feryardiantmeans that there will no longer be issues with orphaned child processes on Windows when using Lerna's legacy task runners
@rix0rrrmakes Lerna much faster at checking for cyclical dependencies in large workspaces when building its internal package graph
@simon-abbottallows Lerna to more seamlessly support v2 lock files as part of the versioning and publishing workflows
Since we took over the project, a massive 84 issues have been closed so far (none of which were done by any kind of automated process). We have additionally been working on some automated messaging for very old, non-upvoted issues (those without any activity of any kind since before June 2021) in order to assist with scaling our efforts to modernize the codebase and focus on what really matters to Lerna users.
We want to help the community flourish and as part of that created a new
#lerna channel to the Nrwl community slack: join here
With the latest release we also completely redesigned the website, with a brand new theme that still preserves Lerna's spirit but presents it in a modern and fresh manner.
Check it out on https://lerna.js.org/.
Lerna's new website is powered by Docusaurus, a powerful open-source engine to generate static websites, which makes writing docs a breeze. And of course, the Lerna website got dark mode now 😉.
Alongside the refreshed website, we also created a set of new guides that help you
- get started with Lerna;
- that explain the core concepts around bootstrapping, task scheduling and publishing;
- that go into more details of some new features thanks to the Nx integration like caching and distributed task execution
Over the next couple of days, we will keep improving those initial docs and cleaning up the README files on the main Lerna repository.
Docs are one thing, having some example repositories is usually even more helpful to get your hands-on. We are 100% with you on this one. This is why we created two new example repositories which are deeply embedded into our guides and which you can use to try out and experiment with Lerna.
- Lerna Getting Started example repository - You can clone it and play around with it directly or use it as part of our guides to walk through some of the aspects of setting up Lerna or playing around with its new task scheduling features.
- Lerna and Distributed Task Execution - We also set up a new example repository to demonstrate the power of not just using distributed caching, but distributing you task execution across various agents to drastically reduce your CI build times. Check out the repo or learn more on our docs.
In the coming weeks, we're going to make updates to the repository's READMEs, integrate missing information into the new guides and streamline the content.
Here are some more things to explore:
- Lerna 2022 roadmap
- follow us on Twitter (we're announcing also all Lerna related things alongside our Nx twitter account)
- subscribe to our Youtube channel for new tutorials & announcements around Lerna, Nx, Monorepos and tooling
- join the
#lernachannel on the Nrwl Community Slack
Like it? Make sure to tweet about it and let the community know 😃