Adopt Turborepo and a single root .env - #9
Merged
Conversation
Task orchestration moves to Turborepo and every common script is exposed from the root, so a contributor can clone → pnpm install → cp .env.example .env → pnpm dev with no per-package steps. - turbo.json: build/typecheck/test/dev/run-eval/report all dependsOn ["^build"] so packages/core builds before its dependents typecheck/run against its dist/. dev + eval tasks are cache:false; globalDependencies cover .env and tsconfig.base.json. - Root package.json: turbo devDependency + dev/build/test/typecheck and the eval scripts (run-eval/report/fetch-data/pin) all via `turbo run`. - Single root .env: new root .env.example (provider keys, PORT, eval settings); delete apps/playground/.env.example. Tiny loaders resolve the repo-root .env from import.meta.url (cwd-independent) — playground src/server/env.ts (imported first in index.ts) and packages/evals src/env.ts (imported in run/report/fetch/pin). vite.config.ts points loadEnv/envDir at the repo root. Ambient/exported vars still win. - Docs: root README gains a Development section; playground + evals READMEs point at the root .env and root scripts; CLAUDE.md notes pnpm + Turborepo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adopt Turborepo for task orchestration/caching, move to a single root
.envevery package reads, and expose every common script from the root. A contributor can now clone →pnpm install→cp .env.example .env→pnpm devwith no per-package steps.Changes
turbo.json—build/typecheck/test/dev/run-eval/reportalldependsOn: ["^build"], sopackages/corebuilds before its dependents typecheck/run against itsdist/(this replaces the ordering CI enforced by step comments).dev+ eval tasks arecache: false;globalDependenciescovers.envandtsconfig.base.json.package.json—turbodevDependency +dev/build/test/typecheckand the eval scripts (run-eval/report/fetch-data/pin) all viaturbo run..env— new root.env.example(provider keys,PORT, eval settings); deletesapps/playground/.env.example. Tiny loaders resolve the repo-root.envfromimport.meta.url(cwd-independent, works under Turbo):apps/playground/src/server/env.ts(imported first inindex.ts) andpackages/evals/src/env.ts(imported inrun/report/fetch/pin).vite.config.tspointsloadEnv/envDirat the repo root. Ambient/exported vars still win —loadEnvFilenever overrides..envand root scripts; CLAUDE.md notes "pnpm + Turborepo."Verification
pnpm buildcold → core first; re-run →>>> FULL TURBOcache hit.pnpm typecheck+pnpm testfrom root: all 3 packages pass, core built automatically.PORTproxy both read the root.env.dist/absent):pnpm devfrom root builds core via Turbo, then boots the server cleanly — noERR_MODULE_NOT_FOUND.ci.yml) needs no change — same script names.🤖 Generated with Claude Code