Skip to content

Conversation

@Tobbe
Copy link
Member

@Tobbe Tobbe commented Jan 2, 2026

I never trusted build:clean, so I always ended up running git-clean-build instead.

Originally git-clean-build just straight away ran git 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 default build:clean command. But I'm also still keeping the older, much faster, clean script as a new clean script.

TL;DR: yarn git-clean-build is now yarn build:clean. The old yarn build:clean is now yarn 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 install would 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

@netlify
Copy link

netlify bot commented Jan 2, 2026

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 828ba6c
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/69579d2931b486000881147f

@github-actions github-actions bot added this to the chore milestone Jan 2, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 2, 2026

Greptile Summary

This PR adds a clarifying comment to the build:clean script explaining that the Node DEP0169 deprecation warning emitted during the build process originates from an upstream issue in Nx, not from Cedar's code. The comment includes a reference to the specific Nx issue (#33894) and a TODO marker for when the upstream issue is resolved.

Key Changes:

  • Added explanatory comment in tasks/clean-build.mts (lines 54-56) documenting the DEP0169 warning source
  • Comment appropriately clarifies this is an external dependency issue
  • Includes reference to tracking issue for future cleanup

Review Notes:

  • No breaking changes or behavioral modifications
  • Documentation improvement only
  • All references to the renamed script (build:clean) are correctly in place
  • No other files require updates

Confidence Score: 5/5

  • This PR is safe to merge. It only adds a documentation comment with no functional changes or behavioral impact.
  • This PR receives a perfect confidence score because it contains only a documentation/comment addition with zero functional or behavioral changes. The comment accurately documents a known issue with an upstream dependency (Nx), provides proper context and reference information, and includes a TODO marker for future cleanup. The change follows good practices by documenting non-obvious behaviors that developers may encounter.
  • No files require special attention. This is a straightforward documentation improvement.

Important Files Changed

Filename Overview
tasks/clean-build.mts Added clarifying comment about DEP0169 Node warning triggered during yarn build, with reference to upstream Nx issue #33894. Comment appropriately explains it's not Cedar's fault and includes TODO to remove when issue is fixed.

Sequence Diagram

sequenceDiagram
    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
Loading

@nx-cloud
Copy link

nx-cloud bot commented Jan 2, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 828ba6c

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

@Tobbe Tobbe enabled auto-merge (squash) January 2, 2026 10:42
@Tobbe Tobbe merged commit ee5d570 into main Jan 2, 2026
42 checks passed
@Tobbe Tobbe deleted the tobbe-chore-build-clean-script branch January 2, 2026 10:42
@Tobbe Tobbe modified the milestones: chore, v2.3.0 Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants