Skip to content

Commit

Permalink
Pin version of shadcn, fixes #309 (#330)
Browse files Browse the repository at this point in the history
The latest version of the UI package does not include the CLI anymore,
it's published under `shadcn` now - this PR fixes that by pinning the
version to `0.8.0`, the latest previous version that works.

It would be nice to start using the new CLI, but it's incompatible with
the current setup inside NX: it expects package.json and components.json
to be defined within the same directory. I think the better approach
would be to implement a NX-specific version of the `add` command instead
of using the upstream CLI - it's [not particularly
complex](https://github.com/shadcn-ui/ui/blob/main/packages/cli/src/commands/add.ts).
  • Loading branch information
TriPSs authored Oct 22, 2024
2 parents 4c5e74d + c940745 commit 9ea43e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shadcn-ui/src/executors/add/add.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function addExecutor(

return execPackageManagerCommand(
buildCommand([
'shadcn-ui@latest add',
'shadcn-ui@0.8.0 add',
(options.component ?? '').length === 0 ? '--all' : options.component,
options.overwrite && '--overwrite',
'--path=src',
Expand Down

0 comments on commit 9ea43e9

Please sign in to comment.