Uh oh!
There was an error while loading. Please reload this page.
fix(release): use directory-relative turbo filter in prepack scripts - #1073
Conversation
The nightly release renames every package (e.g. @nuxt/devtools -> @nuxt/devtools-nightly) before running `pnpm publish` in each package dir. Each package's `prepack` script ran `turbo run build --filter=@nuxt/devtools` (hardcoded to the pre-rename name), so turbo could no longer find a package by that name and the nightly release job failed with 'No package found with name ... in workspace'. Use turbo's directory-relative filter (`--filter=.`) instead, which resolves to whatever package lives in the current directory regardless of its name field. Co-authored-by: opencode <noreply@opencode.ai>
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughFour package Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk:⚪ Minimal · up to This localized change makes prepack builds continue to target the current package after nightly renaming, with no actionable merge-blocking risk remaining beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
Problem
The nightly release job (
Release Nightlystep in CI) has been failing:https://github.com/nuxt/devtools/actions/runs/32479282934/job/96761993765
Cause
scripts/bump-nightly.tsrenames every publishable package (e.g.@nuxt/devtools->@nuxt/devtools-nightly) beforescripts/release-nightly.shrunspnpm publishin each packagedirectory.
pnpm publishtriggers each package'sprepackscript,which called
turbo run build --filter=@nuxt/devtools(and theequivalent hardcoded name for the other three packages) — a filter
that stopped matching anything as soon as the package was renamed.
This was introduced when
prepackwas switched frompnpm buildtoa turbo-filtered build in #1071.
Fix
Use turbo's directory-relative filter,
--filter=., in all fourprepackscripts. It resolves to whichever package lives in thecurrent directory (and its dependencies), independent of the
namefield, so it keeps working after the nightly rename.
Verified locally that
--filter=.produces the same dependency graphas the previous name-based filter for all four packages, and that it
keeps resolving correctly after simulating the nightly rename (whereas
the old name-based filter fails, reproducing the CI error).
This PR was created with the help of an agent.