From 549c2d26903c4da5212ae71f7e95e0f4825c04d7 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 16:43:39 -0700 Subject: [PATCH 1/2] ci(repo): hash NODE_VERSION only into test tasks NODE_VERSION was in globalEnv, so the Unit Tests jobs (which set it per Node version) computed different build hashes from the Build Packages job (which does not set it) and rebuilt every package the PR changed. Scoping it to the test task keeps test results separate per Node version and lets every job share build cache entries. --- .changeset/turbo-node-version-test-env.md | 2 ++ turbo.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .changeset/turbo-node-version-test-env.md diff --git a/.changeset/turbo-node-version-test-env.md b/.changeset/turbo-node-version-test-env.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/turbo-node-version-test-env.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/turbo.json b/turbo.json index 7c560eac6fe..00ac31c34cf 100644 --- a/turbo.json +++ b/turbo.json @@ -19,7 +19,6 @@ "NEXT_PHASE", "NEXT_PUBLIC_CLERK_*", "NODE_ENV", - "NODE_VERSION", "NPM_VERSION", "PLASMO_PUBLIC_CLERK_*", "PUBLIC_CLERK_*", @@ -107,6 +106,7 @@ }, "test": { "dependsOn": ["build"], + "env": ["NODE_VERSION"], "inputs": [ "$TURBO_DEFAULT$", "*.d.ts", From 1f9f62fe65b9a2003a9b5a6755f3b232e1345f67 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 17:07:38 -0700 Subject: [PATCH 2/2] ci(repo): scope the remaining global environment variables to the tasks they affect Remove NPM_VERSION and NEXT_PHASE, which nothing reads. Hash RSDOCTOR only into the clerk-js and ui builds that read it, and TZ only into tests. Pass TZ and the VERCEL variables through to tasks without hashing them, since they don't change any task's output. --- packages/clerk-js/turbo.json | 2 ++ packages/ui/turbo.json | 1 + turbo.json | 15 ++++++--------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/clerk-js/turbo.json b/packages/clerk-js/turbo.json index 5d5f376289a..26a423c080a 100644 --- a/packages/clerk-js/turbo.json +++ b/packages/clerk-js/turbo.json @@ -2,6 +2,7 @@ "extends": ["//"], "tasks": { "build": { + "env": ["RSDOCTOR"], "inputs": [ "*.d.ts", "src/**", @@ -22,6 +23,7 @@ }, "build:sandbox": { "dependsOn": ["^build", "@clerk/localizations#build"], + "env": ["RSDOCTOR"], "inputs": ["sandbox/**"], "outputs": ["dist/**"] }, diff --git a/packages/ui/turbo.json b/packages/ui/turbo.json index dc2b9940748..835aa76e50d 100644 --- a/packages/ui/turbo.json +++ b/packages/ui/turbo.json @@ -7,6 +7,7 @@ "persistent": true }, "build": { + "env": ["RSDOCTOR"], "inputs": [ "*.d.ts", "src/**", diff --git a/turbo.json b/turbo.json index 00ac31c34cf..0bae2c53e36 100644 --- a/turbo.json +++ b/turbo.json @@ -16,18 +16,11 @@ "globalEnv": [ "CLERK_*", "EXPO_PUBLIC_CLERK_*", - "NEXT_PHASE", "NEXT_PUBLIC_CLERK_*", "NODE_ENV", - "NPM_VERSION", "PLASMO_PUBLIC_CLERK_*", "PUBLIC_CLERK_*", "REACT_APP_CLERK_*", - "RSDOCTOR", - "TZ", - "VERCEL", - "VERCEL_PROJECT_PRODUCTION_URL", - "VERCEL_TARGET_ENV", "VITE_CLERK_*" ], "globalPassThroughEnv": [ @@ -38,7 +31,11 @@ "ACTIONS_STEP_DEBUG", "VERCEL_AUTOMATION_BYPASS_SECRET", "PORT", - "UI_PORT" + "TZ", + "UI_PORT", + "VERCEL", + "VERCEL_PROJECT_PRODUCTION_URL", + "VERCEL_TARGET_ENV" ], "tasks": { "build": { @@ -106,7 +103,7 @@ }, "test": { "dependsOn": ["build"], - "env": ["NODE_VERSION"], + "env": ["NODE_VERSION", "TZ"], "inputs": [ "$TURBO_DEFAULT$", "*.d.ts",