From d22456c3744864c91deef7d2fa90525ad2684511 Mon Sep 17 00:00:00 2001 From: Gustav Hansen Date: Fri, 29 May 2026 18:13:45 +0200 Subject: [PATCH] fix(ci): bust cli-test build cache when repo-root fixtures change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `@sanity/cli-test` bundles its test fixtures by copying them from the repo-root `fixtures/` via `copy:fixtures` at build time. The generic `build` task only keys its cache on files inside the package, so editing a repo-root fixture left the cache key unchanged and turbo replayed a stale bundled copy — tests then ran against an outdated fixture. Key cli-test's build on `$TURBO_ROOT$/fixtures` and the workspace catalog (also read by `copy:fixtures`) so fixture edits invalidate it. --- turbo.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/turbo.json b/turbo.json index 00473fd74..ee7d61a7f 100644 --- a/turbo.json +++ b/turbo.json @@ -15,6 +15,11 @@ "dependsOn": ["^build"], "outputs": [".next/**", "!.next/cache/**", "dist/**", ".sanity/**", "lib/**", "fixtures/**"] }, + "@sanity/cli-test#build": { + "dependsOn": ["^build"], + "inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/fixtures/**", "$TURBO_ROOT$/pnpm-workspace.yaml"], + "outputs": ["dist/**", "fixtures/**"] + }, "build:types": { "dependsOn": ["^build", "^build:types", "build"], "outputs": ["dist/**/*.d.ts"]