facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
56.28k stars 8.45k forks source link

Move from Lerna to alternative toolset (like Nx) #7333

Open seyoon20087 opened 2 years ago

seyoon20087 commented 2 years ago

Have you read the Contributing Guidelines on issues?

Motivation

Lerna is not maintained anymore. As a result, you may want to switch to an alternative solution (such as Nx).

Self-service

Josh-Cena commented 2 years ago

Agree 👍 I've also talked to @slorber about this on Discord. My main candidate for now is monodeploy, because we are also migrating to Yarn v3 in #6028. cc @RDIL in case you want to make the DX fully prepared in that PR. The publishing process needs investigation.

We'll see if Nx is necessary after we've made the migration to Yarn v3.

slorber commented 2 years ago

We also have good feedback about using Turborepo from @yangshun

Please don't submit any PR on this for now, we'll figure out the setup we want to adopt

For the time being, our Lerna setup still works

Josh-Cena commented 2 years ago

For me, the choice is either monodeploy (works best with Yarn v3 workspaces), or Nx (I work on several other projects that use it with great success). I'm open to try Turborepo, but I'll need some comparisons.

Josh-Cena commented 2 years ago

https://github.com/lerna/lerna/issues/3121 Large thonk

yangshun commented 2 years ago

If we move to Vercel hosting then using Turborepo would be a no-brainer.

Josh-Cena commented 2 years ago

Does Vercel hosting offer special integration with TR? If that, I'm very interested in seeing a working example 😄

yangshun commented 2 years ago

Yes, they have remote caching, but I'm not sure whether it's free or a paid feature.

Josh-Cena commented 2 years ago

A great amount of our CI time (in PR) is spent on building packages. If we can cut that down (through persisting some cache), we can greatly speed up the deploy preview. Looking forward to any solution.

slorber commented 2 years ago

Afaik Meta is already using Vercel for many sites (like the new Beta site) and maybe not using Nx cloud already.

I'd rather ask @zpao what is possible for us to use there before choosing the definitive tool.

Having caching would be very nice for sure.

Lerna still works and is not maintained again, so there's no need to hurry

Josh-Cena commented 2 years ago

Lerna 5.0 has just been released, with a lot of dependency upgrades! This makes me hate it a lot less.

pavankjadda commented 2 years ago

Lerna 5.0 has just been released, with a lot of dependency upgrades! This makes me hate it a lot less.

It seems Lerna 5.1.x is way faster than TR (5.3 times). Quoting Victor tweet

🎉 Lerna now supports:

  • distributed caching
  • tasks pipelines (e.g., tests can depend on builds)
  • distributed task execution

It's super fast 🚀

➡️ Lerna is 5.3 times faster than Turborepo!

Blog: link

Josh-Cena commented 2 years ago

I'm not even sure if we need to do anything at this stage, since I don't know if it's Lerna or tsc being slow, but I'd still like to play with different managers just to confirm. I'd definitely try out 5.1 in this weekend's dependency upgrade.

RDIL commented 2 years ago

@Josh-Cena usually the performance boils down to:

maverictopgun72 commented 1 year ago

https://github.com/facebook/docusaurus/issues/7333#issue-1226196895