DEV Community

Cover image for Lerna 5.1 - New website, new guides, new Lerna example repo, distributed caching support and speed!
Juri Strumpflohner for Nrwl

Posted on • Edited on • Originally published at blog.nrwl.io

Lerna 5.1 - New website, new guides, new Lerna example repo, distributed caching support and speed!

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.

Fast Lerna Monorepos - powered by Nx

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-map and 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 nx package.

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 nx package
  • set the useNx property to true in lerna.json.

Read all about it on Lerna's new guide about "Running Tasks".

New Community Contributions 🙌

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:

  • #2946 from @feryardiant means that there will no longer be issues with orphaned child processes on Windows when using Lerna's legacy task runners
  • #2874 from @rix0rrr makes Lerna much faster at checking for cyclical dependencies in large workspaces when building its internal package graph
  • #3091 from @simon-abbott allows 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

An all-new Website - powered by Docusaurus

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.

Lerna website redesign

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

Over the next couple of days, we will keep improving those initial docs and cleaning up the README files on the main Lerna repository.

New Example Repositories

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.

Lerna 5 video walkthrough

What's next?

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:

Like it? Make sure to tweet about it and let the community know 😃


Learn more

🧠 Lerna Docs
👩‍💻 Lerna GitHub
💬 Nrwl Community Slack
📹 Nrwl Youtube Channel
🧐 Need help with Angular, React, Monorepos, Lerna or Nx? Talk to us 😃

Also, if you liked this, click the ❤️ and make sure to follow Juri and Nx on Twitter for more!

#nx

Top comments (0)