Repository navigation
deps: bump shadcn to 4.15.0 and single-source the CLI pin - #401
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe shadcn dependency is upgraded to 4.15.0. Build-time injection and runtime fallback resolution now derive the CLI package from ChangesShadcn version synchronization
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. 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 |
Supersedes the Dependabot bump in #368, which could only ever touch the `shadcn` devDependency and so always failed the release gate. The version was previously written in four places — the devDependency, `shadcnCliPackage` in tools/payload-components/utils.ts (compiled into the published CLI), the mocked argument strings in the registry install spec, and a literal `toBe('4.7.0')` assertion. Any bump that moved only one of them tripped the gate, which is why #259, #300 and #368 each failed identically. Now the `shadcn` devDependency is the single source. tsup inlines it into the bundle via `define`, so the published CLI keeps working without reading the repo's package.json at runtime; the source path (vitest, tsx) falls back to reading the pin off package.json. The gate still asserts what it cared about — that the pin is an exact version, not a range, and that the CLI spec tracks it. Verified against 4.15.0: - `shadcn add` output is byte-identical to 4.7.0 for our full public-UI surface (accordion, badge, button, card, input, textarea) and for a built registry item; still Radix-backed, no Base UI switch on the default style - `registry:build` produces zero artifact churn - test:int 379 passed, lint / test:registry / test:pack all clean - a simulated future bump to 4.16.0 passes with no test or source edits Co-Authored-By: Claude Opus 5 <[email protected]>
99fb2d6 to
c7d0b15
Compare
…dening, dependency refresh (#416) Brings main level with dev ahead of publishing 1.2.1. - wall fit guard tightened from 60px to 50px, and the fumadocs int spec no longer pins prettier's line breaks (#413) - CodeRabbit findings from the last five days closed (#411) - tsconfig drops the redundant react types path that blocked every vite 8 bump (#412), unblocking vite 8.1.5; dependency refresh for lucide-react, fumadocs and the test tooling (#365, #366, #367) - shadcn bumped to 4.15.0 with the CLI pin single-sourced, so a version bump no longer has to be written in four places (#401) Tree is identical to dev by construction: branched from dev, reparented onto main, so the diff is exactly the main..dev delta with no squash-divergence conflicts.
Supersedes #368. Closes #368.
Why the Dependabot PR could never pass
The shadcn version was written in four places, and Dependabot can only touch one:
package.jsondevDependency4.7.0← the only thing Dependabot bumpstools/payload-components/utils.ts→shadcnCliPackage[email protected](compiled into the published CLI)tests/int/payload-components-registry.int.spec.ts[email protected]×4 (mocked arg strings)tests/int/public-registry.int.spec.tsexpect(...).toBe('4.7.0')So every bump tripped the gate on the last row. That's why #259, #300 and #368 each failed identically — and why "re-attempt when a later version passes the gate" could never happen. The gate asserted a literal.
What this does
Makes the
shadcndevDependency the single source of truth.tsup.config.tsreads the pin at build time and inlines it viadefine, so the published CLI never needs the repo's package.json at runtime.utils.tsuses that build-time constant, falling back to reading the pin offpackage.jsonon the source path (vitest, tsx), where the bundler doesn't run.shadcnCliPackageinstead of hardcoding a version.Future Dependabot bumps become a genuine one-line change.
Verification
shadcn addoutput is byte-identical between 4.7.0 and 4.15.0 — both for a built registry item and for our complete public-UI dependency surface (accordion, badge, button, card, input, textarea, extracted from all 68 registry items):This also settles the concern that closed #259 — that 4.13+ switches the default component backend to Base UI. It doesn't, on the default
new-yorkstyle we use:test:intlinttest:registrytest:packregistry:buildpublic/r4.15.0(__SHADCN_CLI_VERSION__fully replaced)Lockfile churn is entirely shadcn's own transitive dev tree;
shadcnis the only top-level specifier that moved.Note
Targets 4.15.0 (what #368 proposed and what I verified end to end), not the current
@latest4.16.0.Worth a separate look: every docs page ships
pnpm dlx shadcn@latest, while the CLI pins exact — so the documented path and the CLI have been on different shadcn majors for weeks. This PR doesn't change that; it just makes the pin cheap to move.🤖 Generated with Claude Code
Summary by CodeRabbit