From 6677052e01a0af35fd5924053c1dfd7a36be1e45 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 13:08:29 -0700 Subject: [PATCH 1/3] ci(repo): watch every checked-in package file in builds by default Package builds listed the files they watch, so a build file missing from the list could change without a rebuild. React's build helper, Next.js's copied package.json files, shipped subpath entries and native sources were all unwatched. Builds now start from Turbo's default of every checked-in file and exclude tests, docs and tooling that can't change the output. --- .changeset/build-inputs-turbo-default.md | 2 ++ packages/clerk-js/turbo.json | 20 ---------------- packages/express/turbo.json | 19 ---------------- packages/mosaic/turbo.json | 20 ---------------- packages/ui/turbo.json | 20 ---------------- turbo.json | 29 +++++++++++++----------- 6 files changed, 18 insertions(+), 92 deletions(-) create mode 100644 .changeset/build-inputs-turbo-default.md delete mode 100644 packages/express/turbo.json diff --git a/.changeset/build-inputs-turbo-default.md b/.changeset/build-inputs-turbo-default.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/build-inputs-turbo-default.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/clerk-js/turbo.json b/packages/clerk-js/turbo.json index 5d5f376289a..f0dfdb33a95 100644 --- a/packages/clerk-js/turbo.json +++ b/packages/clerk-js/turbo.json @@ -1,25 +1,6 @@ { "extends": ["//"], "tasks": { - "build": { - "inputs": [ - "*.d.ts", - "src/**", - "tsconfig.json", - "tsconfig.declarations.json", - "rspack.config.mjs", - - "!**/*.test.*", - "!**/test/**", - "!**/tests/**", - "!**/__tests__/**", - "!**/__mocks__/**", - "!**/__snapshots__/**", - "!coverage/**", - "!examples/**", - "!node_modules/**" - ] - }, "build:sandbox": { "dependsOn": ["^build", "@clerk/localizations#build"], "inputs": ["sandbox/**"], @@ -40,7 +21,6 @@ "tsconfig.*.json", "tsup.config.ts", "webpack.config.js", - "!**/__snapshots__/**", "!coverage/**", "!examples/**", diff --git a/packages/express/turbo.json b/packages/express/turbo.json deleted file mode 100644 index 4379d6c1c35..00000000000 --- a/packages/express/turbo.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "inputs": [ - "*.d.ts", - "**/package.json", - "src/**", - "tsconfig.json", - "tsup.config.ts", - - "!**/__tests__/**", - "!**/__snapshots__/**", - "!coverage/**", - "!node_modules/**" - ] - } - } -} diff --git a/packages/mosaic/turbo.json b/packages/mosaic/turbo.json index 65219661ea9..35be9c68fa8 100644 --- a/packages/mosaic/turbo.json +++ b/packages/mosaic/turbo.json @@ -2,26 +2,6 @@ "extends": ["//"], "tasks": { "build": { - "inputs": [ - "package.json", - "*.d.ts", - "src/**", - "tsconfig.json", - "tsconfig.base.json", - "tsdown.config.mts", - "tsdown.css.config.mts", - "stylex-lightningcss.config.mjs", - "scripts/**", - "!**/*.test.*", - "!**/test/**", - "!**/tests/**", - "!**/__tests__/**", - "!**/__mocks__/**", - "!**/__snapshots__/**", - "!coverage/**", - "!examples/**", - "!node_modules/**" - ], "outputs": ["dist/**"] } } diff --git a/packages/ui/turbo.json b/packages/ui/turbo.json index dc2b9940748..f45efe46b7e 100644 --- a/packages/ui/turbo.json +++ b/packages/ui/turbo.json @@ -7,25 +7,6 @@ "persistent": true }, "build": { - "inputs": [ - "*.d.ts", - "src/**", - "tsconfig.json", - "tsconfig.base.json", - "tsconfig.src.json", - "rspack.config.js", - "tsdown.config.mts", - - "!**/*.test.*", - "!**/test/**", - "!**/tests/**", - "!**/__tests__/**", - "!**/__mocks__/**", - "!**/__snapshots__/**", - "!coverage/**", - "!examples/**", - "!node_modules/**" - ], "outputs": ["*/package.json", "dist/**"] }, "test": { @@ -37,7 +18,6 @@ "tsconfig.*.json", "rspack.config.js", "vitest.*.mts", - "!**/__snapshots__/**", "!coverage/**", "!examples/**", diff --git a/turbo.json b/turbo.json index 7c560eac6fe..e9586eeb5b8 100644 --- a/turbo.json +++ b/turbo.json @@ -45,25 +45,28 @@ "build": { "dependsOn": ["^build"], "inputs": [ - "package.json", - "*.d.ts", - "bundlewatch.config.json", - "src/**", - "tsconfig.json", - "tsconfig.build.json", - "tsconfig.declarations.json", - "tsdown.config.mts", - "tsdown.config.ts", - "tsup.config.ts", - "vite.config.*", - "subpaths.mjs", + "$TURBO_DEFAULT$", "!**/*.test.*", + "!**/*.spec.*", "!**/test/**", "!**/tests/**", "!**/__tests__/**", "!**/__mocks__/**", "!**/__snapshots__/**", - "!CHANGELOG.md", + "!*.md", + "!docs/**", + "!LICENSE", + "!.gitignore", + "!.claude/**", + "!eslint-suppressions.json", + "!eslint/**", + "!oxlint.config.*", + "!playwright.config.*", + "!sandbox/**", + "!typedoc.json", + "!vercel.json", + "!vitest.config.*", + "!vitest.setup.*", "!coverage/**", "!dist/**", "!examples/**", From 5cbea8d68e6648b1f20603d9eb9908a60fedd441 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 4 Nov 2026 20:53:19 -0700 Subject: [PATCH 2/3] ci(repo): stop caching checked-in files as build outputs The scripts/** and */package.json build outputs matched no generated files, only checked-in sources, so a cache hit could restore an old copy over a local edit. --- packages/ui/turbo.json | 3 --- turbo.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/ui/turbo.json b/packages/ui/turbo.json index f45efe46b7e..b3693977202 100644 --- a/packages/ui/turbo.json +++ b/packages/ui/turbo.json @@ -6,9 +6,6 @@ "dependsOn": ["build"], "persistent": true }, - "build": { - "outputs": ["*/package.json", "dist/**"] - }, "test": { "inputs": [ "*.d.ts", diff --git a/turbo.json b/turbo.json index e9586eeb5b8..a0b75106f1f 100644 --- a/turbo.json +++ b/turbo.json @@ -73,7 +73,7 @@ "!node_modules/**" ], "outputLogs": "new-only", - "outputs": ["*/package.json", "dist/**", "scripts/**"] + "outputs": ["dist/**"] }, "build:declarations": { "dependsOn": ["build"], From 46f4ecd080d0187b93a131e97d6808eb8e5d7aba Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Thu, 5 Nov 2026 09:29:19 -0700 Subject: [PATCH 3/3] ci(repo): rebuild shared when the clerk-js or ui version changes --- packages/shared/turbo.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/shared/turbo.json diff --git a/packages/shared/turbo.json b/packages/shared/turbo.json new file mode 100644 index 00000000000..0004b897b5e --- /dev/null +++ b/packages/shared/turbo.json @@ -0,0 +1,12 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "inputs": [ + "$TURBO_EXTENDS$", + "$TURBO_ROOT$/packages/clerk-js/package.json", + "$TURBO_ROOT$/packages/ui/package.json" + ] + } + } +}