Skip to content

Evaluate Turborepo for workspace task caching #1223

@danieliser

Description

@danieliser

Context

PR #1220 removes Nx in favor of native pnpm -r orchestration for package scripts (build:tsc, build:types, lint, etc.).

That simplification is working, but we intentionally give up Nx task caching. Local benchmarks showed warm package rebuilds are noticeably slower without a cache:

Step Nx (cached) pnpm -r
build:tsc ~1s ~9s
build:types ~1s ~3s

Cold builds are roughly equivalent (~21–23s for build:tsc).

Proposal

Evaluate Turborepo as a lighter alternative to Nx that could restore:

  • Task caching for unchanged packages
  • Topological task execution (dependsOn)
  • Optional remote cache for CI

…without reintroducing the full Nx toolchain we removed.

Scope to investigate

  • turbo.json task definitions for build:tsc, build:types, lint, format, clean
  • Local cache hit rates on day-to-day dev workflows
  • CI integration (turbo run + optional remote cache)
  • Compare install/tooling overhead vs current pnpm-only setup
  • Confirm compatibility with existing postinstall / prepack lifecycle approach

Acceptance criteria

  • Document recommendation: adopt Turborepo, defer, or stay pnpm-only
  • If adopted: warm rebuild time should be materially closer to former Nx cache performance without breaking fresh pnpm install --frozen-lockfile

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions