DEV Community

Cover image for Lerna is dead - Long Live Lerna
Juri Strumpflohner for Nrwl

Posted on • Originally published at blog.nrwl.io

Lerna is dead - Long Live Lerna

If you’re in a hurry, here’s the TL;DR:

We, Nrwl, the company behind Nx, are taking over the stewardship of Lerna.js, the popular JS monorepo tool. Here’s the official announcement on the Lerna repo. We are thrilled and committed to helping the Lerna community move forward!

Who is Nrwl?

We (Nrwl) are the company behind Nx (GitHub) and we have been founded by two ex-Googlers and Angular core team members Jeff Cross and Victor Savkin. Experiencing a large-scale monorepo in action at Google, gave them a lot of insights into the advantages and productivity gains for software teams as well as the features and tooling support that is required to make monorepos work, especially at a large scale. When they left Google, they decided to bring such a tool to the masses, but with a clear goal of

  • building it in the open as an open-source product and
  • making it approachable and easy to use by focusing on great DX

This is when Nx started.

We think we are the best fit for helping the Lerna community continue and thrive because we have a good combination of real-world experience with open source community work. As part of Nrwl, we work with some of the world's biggest companies, helping them improve productivity and ship great quality software through monorepos. In addition, Jeff and Victor have a lot of knowledge of managing a big open source project such as Angular when they were at Google and obviously at Nrwl from managing Nx as an open-source project with its quickly growing community.

Long story short, Nrwl ❤️  open source and community work, and we are thrilled to work with the Lerna community!

What’s the story about Lerna being dead?

(Spoiler: It is not dead, we took over stewardship 😉. But apart from that, here’s the whole story)

  • August 2020 - Issue is being opened mentioning that Lerna is largely unmaintained
  • April 2022 - A PR gets merged that properly highlights the fact of Lerna being unmaintained at the very top of the repository README. This made the “Lerna is dead” discussions flare up again.
  • May 2022 - Lerna got resurrected: Nrwl takes over

While that last PR didn’t really change the fact that Lerna has been in that state for the past years already, it just made it more apparent and also how many still rely on Lerna today.

And this is not to blame its contributors at all. They did an amazing job. However, Open Source can be a tough place, especially if it is not backed by a large community and/or company that helps make the work sustainable in the long run. Taking the weight of maintaining such a widely used tool, and then mostly for free, is a huge one. Burnout is real folks, so take care. And we’ve had lots of such open-source examples in the past years.

Nrwl is taking over: now what?

Lerna has definitely pioneered the JS monorepo space, however, the tooling space has progressed a lot in recent years. Some of its features are now baked into NPM, YARN, PNPM, and Lerna lacks many other important monorepo features such as computation caching to mention one example.

Nx can fill in many of these gaps. When the first discussions about Lerna being unmaintained came up in 2020, we implemented a set of features, allowing for easy migration from Lerna/NPM/Yarn/PNPM workspaces to Nx. In addition, some recent improvements in Nx make this even easier, allowing it to basically co-exist in any of these workspaces. This can be done for instance by leveraging Nx’s powerful task scheduling capabilities while still continuing on relying on Lerna’s publishing process. Maintaining now both projects, Lerna & Nx, puts us in the unique position of allowing us to work on some seamless integration between the two.

With Nx, we are known to have a clear roadmap shared with the community of what our next 6 months’ focus will be (here’s an example of our roadmap for v15). As we get our hands dirty on Lerna’s codebase in the coming weeks, we are going to define a set of action items, prioritize them and elaborate a proper roadmap as well, which we will share with the community as soon as we have a more concrete plan. Since we know many organizations still depend on Lerna or may not be able to migrate away soon, some of our immediate to mid-term actions will be to provide critical bug fixes and security updates to the project and regularly release those to NPM.

Stay tuned for more!

We think Lerna’s and Nx’s future is bright and we are excited to help move the monorepo space forward, more than ever before!

Make sure you don’t miss anything by

Top comments (4)

Collapse
 
brunnerlivio profile image
Livio Brunner

Oh this is amazing. Made me sad when I heard a couple of weeks ago that Lerna was officially declared "dead". Really glad you guys picked up the torch and I am sure you'll do a great job since you are more than familiar in this space :)

Collapse
 
juristr profile image
Juri Strumpflohner

Thanks 😊! yeah we're already looking into how we can help move the Lerna community forward and combine the best of the two worlds, Nx & Lerna 😃

Collapse
 
nans profile image
Nans Dumortier

So what's the best option for a team at the moment ? Migrating from Lerna to NX ? Or maybe not ?

Collapse
 
juristr profile image
Juri Strumpflohner

You can always go ahead and add Nx to your Lerna repository. We created a dedicated guide for that here: nx.dev/migration/adding-to-monorepo.
That way you can have them side-by-side, using Nx as a task scheduler including speed improvements due to caching etc.

As we get more confident with the Lerna repository over the coming weeks we're in addition going to define a roadmap and further explore possibilities to integrate the two. As mentioned in the post, many features Lerna pioneered are now already integrated in modern tools. But things like the publishing feature is still something folks love and use, which in turn are missing (at least right now) in Nx or alternatives. Now you can obviously fill those in with libs like changesets, or release-it. But we are also aware that not all are able to make those changes. So a lot of our effort will go in the direction of helping with those migrations :)