Features I was looking for (you’d be surprised how hard it is to get all of them)
1. pnpm support out of the box. WHY: pnpm just seems to be faster/smaller footprint than yarn, definitely npm.
2. Support for intramonorepo dependencies. WHY: our services can auto generate service-clients. It’s extremely helpful to be able to hack a couple of changes on one service and instantly see how your new API breaks other systems. No pushing packages to a private npm registry, waiting for devs to approve your request.
3. Global build system. Why: we have a bunch of micro services that are all frameworked out pretty much the same way, so for the sake of productivity it’s useful that we should be able to reuse the same Dockerfile to produce each, that way we can minify the container pretty efficiently.
4. topologically ordered build jobs. WHY: like I said, we have libraries & autogen service-clients in our monorepo. Building low level components first is a must.
5. Ability to add new projects at minimal overhead cost. WHY: it’s surprising how verbose most monorepo managers expect you to be just to add a new face to the group.
Turbo knocks it out of the park on almost all of these, a feat no other manager is capable of IME. It’s a little shaky on its pnpm support, and I wish that they’d expedite it, but we were able to separate build and development to use yarn & pnpm respectively (turbo has a Docker mode which is why this is relevant), so we can work around it.
Turbo then also brings its own “I didn’t know I wanted that” features to the table. Turbo’s caching functionality is crazy. You can configure it to be smart enough to detect when each of your libs/apps actually changes, otherwise the cached version of the build is bubbled up the chain.
If you want to monorepo in typescript, I’d recommend Turbo.
Preview builds on push to any branch with a status update in the Github PR and prod deployment on push to main. Easy to roll back to an older version too.
It does other things too, like act as a remote cache for Turborepo, handles env files, and can do more and more analytics. But it’s the seamless preview and deployment integration that does it for me.
Pricy though.
It can be replaced with netlify, deno deploy, Cloudflare, aws or azure.
But these alternative platforms might need extra human effort to sort out the whole workflow.