Repository navigation
ci(repo): watch every checked-in package file in builds by default - #10659
austincalvelage wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 46f4ecd The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen 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 |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
ce73d63 to
d92c808
Compare
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.
d98cdac to
46f4ecd
Compare


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'sbuild-utils/parseVersionRange.ts, which its build config imports@clerk/nextjs'spackage.esm.jsonandpackage.cjs.json, which its build copies intodistpackage.jsonfiles behind subpath imports like@clerk/nextjs/server@clerk/ui'sregister/and@clerk/clerk-js'sno-rhc/@clerk/express'stsdown.config.mtsBuilds 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,mosaicanduihad their own lists. They now use the shared one.packages/express/turbo.jsonhad nothing else in it, so it's deleted.@clerk/shared's build bakes in the version numbers fromclerk-js's andui'spackage.json. Those files sit outsideshared, so Turbo never looked at them, and a version bump could leavesharedwith the old numbers.packages/shared/turbo.jsonnow adds those two files to its list.Builds also told Turbo to save
scripts/**and*/package.jsonfrom 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'sscripts/generate-guide.jsand then building quietly restored the old version. Builds now save onlydist/**.Everything that was watched before is still watched, except one
.spec.tstest file inui. Going by the last 300 commits onmain, 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 testruns as expected.pnpm buildruns as expected.Type of change