-
Notifications
You must be signed in to change notification settings - Fork 14
chore(build): Rename git-build-clean to build:clean #909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for cedarjs canceled.
|
Greptile SummaryThis PR adds a clarifying comment to the Key Changes:
Review Notes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant yarn as yarn build:clean
participant gitClean as git clean -fdx
participant yarnInstall as yarn install
participant yarnBuild as yarn build
User->>yarn: Execute yarn build:clean
yarn->>User: Prompt for untracked files confirmation
User->>yarn: Confirm
yarn->>gitClean: Execute
gitClean-->>yarn: Complete
yarn->>yarnInstall: Execute in repo root
yarnInstall-->>yarn: Complete
yarn->>yarnInstall: Execute in packages/create-cedar-rsc-app
yarnInstall-->>yarn: Complete
yarn->>yarnInstall: Execute in docs
yarnInstall-->>yarn: Complete
yarn->>yarnBuild: Execute (triggers DEP0169 warning from Nx)
Note over yarnBuild: This warning is from nrwl/nx issue #33894<br/>Not Cedar's responsibility
yarnBuild-->>yarn: Complete
yarn->>User: All tasks completed successfully
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t test --minWorkers=1 --maxWorkers=4 |
✅ Succeeded | 5s | View ↗ |
nx run-many -t test:types |
✅ Succeeded | 10s | View ↗ |
nx run-many -t build:pack --exclude create-ceda... |
✅ Succeeded | 5s | View ↗ |
nx run-many -t build |
✅ Succeeded | 4s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-01-02 10:42:56 UTC

I never trusted
build:clean, so I always ended up runninggit-clean-buildinstead.Originally
git-clean-buildjust straight away rangit clean -fdx. But we figured this was too dangerous to make that the default "clean" script. But I've since turned it into a proper clean script with checks and confirmation prompts. That makes it not any more dangerous than a regular clean imo, so I'm promoting this deep clean script to the defaultbuild:cleancommand. But I'm also still keeping the older, much faster, clean script as a newcleanscript.TL;DR:
yarn git-clean-buildis nowyarn build:clean. The oldyarn build:cleanis nowyarn clean.This git clean approach is very slow though, so really I should think about when it's really needed and when something faster would suffice. Jumping between different PRs/branches with different versions of 3pp packages is typically when it's useful to nuke everything. But I wonder how far a simple
yarn installwould take us. Another scenario when git cleaning is useful is when I've been manually editing files inside node_modules to debug something and want to get back to 100% unedited code.Also added a comment about nrwl/nx#33894