feat: add --dry-run plan output and post-apply summary to stanza add#28
Conversation
- Introduce `PlanAction` type and accumulate a `plan: PlanAction[]` in `applyModule` alongside the deferred writes so the preview can never drift from what a real apply does; each template, dep, script, env var, and codemod step pushes a `create`/`modify`/`skip` entry with a human label and optional skip reason - Add `plan-format.ts` with `formatPlanLines` (grouped, detail list for `--dry-run`) and `summarizePlan` (single-line tally shown after every apply) - Print the full plan on `--dry-run` and the one-line tally (dimmed) on a real apply; dry-run now reads source files to detect blockers (e.g. missing root layout) before touching anything, still writes nothing
🦋 Changeset detectedLatest commit: 62bfe7c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 55 minutes and 13 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughThis PR enriches the ChangesDry-run preview plan feature
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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 |
Summary by cubic
Adds a detailed plan preview to
stanza add --dry-runand a one-line post-apply summary tostanza add. Dry runs now execute codemods in memory to list edits and surface blockers while writing nothing.stanza add --dry-runprints a grouped plan for each file action (create/modify/skip) with paths, detail labels, and skip reasons (e.g. dependency already pinned higher); includes templates, dependencies, scripts, env vars, and codemods.stanza addprints a one-line tally after completion (e.g. "1 created, 3 modified, 1 skipped"); dry runs show the same tally with "no files were written (dry run)".Written for commit 62bfe7c. Summary will update on new commits.