DEV Community

Cover image for This is no Lerna, it’s a freaking Phoenix!
Matti Bar-Zeev
Matti Bar-Zeev

Posted on

This is no Lerna, it’s a freaking Phoenix!

Join me in this post as I rant about Open Source soap operas and lesson learned from recent events around Lerna

If you follow me here, or on twitter, you’ve probably bumped into my article “Lerna is no longer maintained. Now what? - Part 1” which I wrote right after Lerna maintainers have announced that Lerna will not be actively maintained any more.

“Part 1” I wrote with the optimistic belief that this will be the first part of probably a 2 to 3 parts article in which I will be converting my Pedalboard monorepo to use alternatives to fill the void Lerna has left. The chosen alternative was NX, and I quickly converted the npm scripts I had to use NX instead of Lerna,

But then I got a great comment over this which claimed that I don’t need to use NX for running commands across all the packages, and indeed in the following article I raised my thoughts over using a single tool to govern a monorepo.
In that article I’ve described how I used Yarn built-in support for running commands across all packages, but I knew that this was just one aspect Lerna took care of and there are other reasons I needed Lerna in my project, the main one being bumping packages version according to conventional commits and publishing it to npm - something that NX still does not support in the same manner.

Fast forward a week or so (yes, this is considered a long time in our ecosystem) and I see this:

Image description

Those without the sharp eye could have missed it since it looks so much like the previous message declaring the project is no longer actively maintained.

Image description

Ain’t that nice.
It appears that Lerna passed the stewardship over the project to… Nrwl.

What is “stewardship” you ask? Well according to Oxford it is: “the job of supervising or taking care of something, such as an organization or property.” Or in other words Nrwl is the owner of this project now.

Nrwl, for those who do not know, are the people behind NX. Yes, do you also feel you are in the middle of nasty tech soap opera ep.14532?

Ok, putting sarcasm aside, there are a few important questions to ask:

Is that a good thing?

I believe it is.
I hate to see a project like Lerna decay and go to waste. Not because I’m invested in it, but more because it still offers features that other solutions seem to struggle with or have lower priority for (like auto bumping the versions and publishing, did I mentioned that already, like 100 times?).
However, I hope that the Nrwl paid solutions won’t find their way in being an inseparable part of Lerna in its new format.

What do we do now then?

Well, I think that there are several lessons here for us to learn

We (including yours truly) should calm down our technology FOMO.
Seeing that some project has halted its maintenance does not mean that you need to jump right away to the next “best” thing and stir up your entire tech stack.
Even if Lerna was to be unmaintained, it does not mean that the project is getting off the grid and can no longer be used. We can still use it if we’re good with what it offers at the moment until a better solution presents itself.

We need to keep our solutions focused on the problem we want them to solve. If we’re talking about maintaining the linkage between packages on our monorepo, managing cross dependencies, running commands across all packages or auto bumping and publishing versions automatically (again with that?!). These aspects and others all have different solutions out there which take care of them separately. Putting all the eggs into a single basket is usually a bad idea and this case is no exception.

Using the right tool for the right job gives you the freedom to only change what requires a change while keeping the rest untouched. In a rapidly-changing technology world I think that this is the main lesson from these recent events.

As for me, I’m keeping with Lerna to a very specific task, that is bumping the versions and publishing to npm (😶). I admit that the recent events made my trust in Lerna drop, but as long as it does what I need it to and I know exactly where I depend on it I feel that I have control of the matter.

And on a higher note, I hope that Nrwl taking ownership over Lerna will boost Lerna up, attending neglected issues, improving the documentation, offering better learning materials and adding desired features.

As always, if you’re familiar with any information which might shed new light over this matter, or have any questions please share with the rest of us in the comments below.

Hey! If you liked what you've just read check out @mattibarzeev on Twitter 🍻

Top comments (2)

Collapse
 
juristr profile image
Juri Strumpflohner

We just released Lerna v5 with important package upgrades and security fixes.

In addition Lerna v5.1 alpha which adds Nx to the current options for task scheduling in Lerna. Basically speeds up your Lerna workspace drastically: blog.nrwl.io/lerna-used-to-walk-no...

However, I hope that the Nrwl paid solutions won’t find their way in being an inseparable part of Lerna in its new format.

That’s not gonna happen. It even doesn’t for Nx itself. We truly believe in OSS, so Lerna just as Nx will always be open source.

Collapse
 
mbarzeev profile image
Matti Bar-Zeev

These are great news! Thanks