@@ -75,21 +75,41 @@ Integration tests run in Tilt (via the `tilt ci` command). The Tilt CI workflow
7575
7676### Typescript Monorepo
7777
78- All of the typescript / javascript packages in this repository are part of a lerna monorepo.
79- This setup allows each package to reference the current version of the others.
80- You can install dependencies using ` pnpm i ` from the repository root.
81- You can build all of the packages using ` pnpm exec lerna run build ` and test with ` pnpm exec lerna run test ` .
82-
83- Lerna has some common failure modes that you may encounter:
84-
85- 1 . ` pnpm i ` fails with a typescript compilation error about a missing package.
86- This error likely means that the failing package has a ` prepare ` entry compiling the typescript in its ` package.json ` .
87- Fix this error by moving that logic to the ` prepublishOnly ` entry.
88- 2 . The software builds locally but fails in CI, or vice-versa.
89- This error likely means that some local build caches need to be cleaned.
90- The build error may not indicate that this is a caching issue, e.g., it may appear that the packages are being built in the wrong order.
91- Delete ` node_modules/ ` , ` lib/ ` and ` tsconfig.tsbuildinfo ` from each package's subdirectory. then try again.
92- 3 . ` pnpm i ` fails due to wrong node version. Make sure to be using ` v18 ` . Node version ` v21 ` is not supported and known to cause issues.
78+ All of the typescript / javascript packages in this repository are part of a
79+ [ turborepo] ( https://turbo.build/repo/docs ) monorepo.
80+
81+ #### Setting up
82+
83+ If you use nix and direnv, just cd to the project directory and ` direnv allow ` .
84+
85+ If you use nix but not direnv, just cd to the project directory and enter a nix
86+ development shell with ` nix develop ` .
87+
88+ If you don't use nix at all, then install the required system packages:
89+
90+ - [ Node.js] ( https://nodejs.org/en ) -- match the version to ` .nvmrc ` ; you can use
91+ [ nvm] ( https://github.com/nvm-sh/nvm ) to manage your Node.js version.
92+ - [ pnpm] ( https://pnpm.io/ ) -- match the version to the version specified in
93+ ` package.json ` ; you can experiment with
94+ [ corepack] ( https://nodejs.org/api/corepack.html ) to manage your pnpm version
95+ for you.
96+
97+ #### Common tasks
98+
99+ The following tasks are the most common ways to interact with the monorepo.
100+ Thanks to [ turborepo] ( https://turbo.build/repo/docs ) , these tasks will
101+ coordinate building any needed dependencies, and task execution will be cached
102+ and will only re-run as necessary. For any of the following tasks, you can pass
103+ [ any valid ` turbo run ` option] ( https://turbo.build/repo/docs/reference/run )
104+ after ` -- ` , for instance you could run ` pnpm test -- --concurrency 2 ` .
105+
106+ - ` pnpm test ` : Run all unit tests, integration tests, linting, and format
107+ checks, as well as whatever other code checks any packages support.
108+ - ` pnpm fix ` : Run auto fixes, including reformatting code and auto-fixing lint
109+ rules where possible.
110+ - ` pnpm start:dev ` : Start all development servers in parallel.
111+ - ` pnpm start:prod ` : Run production builds and start production mode servers in
112+ parallel.
93113
94114## Audit / Feature Status
95115
0 commit comments