Skip to content

(Chore) Add Turborepo #2016

Closed
Closed
@drwpow

Description

@drwpow

Description

As we’re running a TS monorepo, using Turborepo would help speed up local dev and simplify configuration

Proposal

We don’t have a ton of packages, but even understanding the build order from openapi-typescript → openapi-fetch → openapi-react-query can be an annoyance. pnpm does handle some of this, but a simple version. But it can’t handle, say, testing, where running pnpm run test knows that packages need to be built (or rebuilt). At best you end up with complex configuration; at worst, a small change breaks everything

Turborepo is an elegant, drop-in solution for what we have already. It doesn’t change how packages are built or tested. It only reduces misconfigurations and mistakes when working locally. Unlike some other build systems, Turborepo doesn’t tell you how your packages should or shouldn’t be built, and can be added without disrupting anything. It can also be easily removed if we don’t like it (no lock in). For all these reasons, I’ve really enjoyed projects that use it, and would like to add it here.

Turborepo also has configurable caching. That’s a secondary benefit to the real advantage—simpler cross-package dependency management (it “just works”). But in case the caching causes any undesirable results, it can be tuned down or opted out of, which is nice.

There are really no downsides with Turborepo; this just simplifies monorepo configuration.

Alternatives

Nx and Bazel are the two other popular build systems. Nx I’ve had bad experiences with (the plugins are invasive, and each one comes with its own set of debugging woes—nice when you get it running but the setup can be painful). Bazel is a nonstarter because it’s completely incompatible with JS. I’m not aware of any other alternatives.

Checklist

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions