Skip to content

ci(repo): watch every checked-in package file in builds by default - #10659

Open
austincalvelage wants to merge 3 commits into
mainfrom
austin/build-inputs-turbo-default
Open

austincalvelage wants to merge 3 commits into
mainfrom
austin/build-inputs-turbo-default

Conversation

@austincalvelage

@austincalvelage austincalvelage commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

Turbo decides whether to rebuild a package by checking a list of its files. We wrote those lists by hand, and they missed files that do change the build. Editing one of them didn't trigger a rebuild, so CI kept using the old build. The missed files included:

  • @clerk/react's build-utils/parseVersionRange.ts, which its build config imports
  • @clerk/nextjs's package.esm.json and package.cjs.json, which its build copies into dist
  • the small package.json files behind subpath imports like @clerk/nextjs/server
  • shipped folders like @clerk/ui's register/ and @clerk/clerk-js's no-rhc/
  • the Android and iOS code in the Expo native packages
  • @clerk/express's tsdown.config.mts

Builds now watch every checked-in file in the package, which is Turbo's recommended setup ($TURBO_DEFAULT$), minus the files that can't change the build: tests, mocks, snapshots, Markdown at the package root, docs/, the license, and lint, test and docs configs. New files are watched without anyone having to add them.

clerk-js, express, mosaic and ui had their own lists. They now use the shared one. packages/express/turbo.json had nothing else in it, so it's deleted.

@clerk/shared's build bakes in the version numbers from clerk-js's and ui's package.json. Those files sit outside shared, so Turbo never looked at them, and a version bump could leave shared with the old numbers. packages/shared/turbo.json now adds those two files to its list.

Builds also told Turbo to save scripts/** and */package.json from each package, but no build writes there. Those paths hold checked-in files, so a cache hit could put an old copy back over a local edit. Editing @clerk/upgrade's scripts/generate-guide.js and then building quietly restored the old version. Builds now save only dist/**.

Everything that was watched before is still watched, except one .spec.ts test file in ui. Going by the last 300 commits on main, this adds about 3% more rebuilds, mostly from Expo native code changes that used to be missed.

#10648 also edits packages/express/turbo.json. Whichever of the two merges second should keep this PR's deletion. The integration suites in #10648, #10653 and #10661 rerun only when a build's watched files change, so this PR should merge before them.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 6, 2026 8:05pm UTC
swingset Ready Ready Preview Nov 6, 2026 8:05pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 46f4ecd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d98cdac and 46f4ecd.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The root Turbo build configuration now uses $TURBO_DEFAULT$ as its input basis and changes its exclusions. Its outputs now include only dist/**. Package-specific Turbo configurations or entries were removed from Clerk JS, Express, Mosaic, and UI. The shared package adds a build configuration that extends the root configuration and adds two package manifests to its inputs. The changes also add two YAML document separators to a changeset file.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • clerk/javascript#10667: Both PRs change Turbo task hashing. This PR removes package-specific build tasks that the other PR configures with task-specific environment inputs.
  • clerk/javascript#10648: Both PRs change the Express build task inputs. This PR deletes the Express Turbo configuration that the other PR updates.
  • clerk/javascript#10669: Both PRs change Turbo build outputs. This PR changes the default outputs, while the other PR adds an Astro-specific output.
Merge Risk: Minimal · previous review d98cd

No merge-blocking issue was established. The broader build-output check remains incomplete.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly and concisely summarizes the main change: Turbo builds now watch checked-in package files by default.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description directly explains the Turbo input and output configuration changes, affected packages, build-cache behavior, testing status, and merge coordination.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d92c808 and d98cdac.

Files selected for processing: 1

  • packages/shared/turbo.json
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@blacksmith-sh

blacksmith-sh Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Matches Unlisted build files now bust the build cache

Before, editing each of the eight listed files left its package's build hash unchanged; after, every edit changes the hash.

Merge-base

Build hash before

This PR d98cdac6

Build hash after

Also checked · 4 match

Matches No previously watched input is dropped
Matches Tests, docs and tooling configs stay excluded
Matches Cache hit no longer reverts checked-in scripts
Matches Shared rebuilds on clerk-js or ui version bump

Proof on d98cdac6 (from ce73d638) · Did Proof get it right? Yes · No

View full Proof report

@pkg-pr-new

pkg-pr-new Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10659

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10659

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10659

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10659

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10659

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10659

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10659

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10659

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10659

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10659

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10659

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10659

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10659

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10659

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10659

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10659

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10659

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10659

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10659

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10659

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10659

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10659

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10659

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10659

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10659

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10659

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10659

commit: 46f4ecd

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-11-06T20:07:24.346Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 46f4ecd.

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.
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.

This branch was successfully deployed

2 active deployments
Preview – swingset — 46f4ecd0 Deployed Nov 6, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 46f4ecd0 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant