ui
ui copied to clipboard
[bug]: Cli `add` seems to strip jsdoc comments at the beginning of `content` in a registry item.
Describe the bug
The registry item https://oui.mw10013.workers.dev/r/oui-index.json has a jsdoc comment at the beginning of content.
Adding it with pnpm dlx shadcn@latest add --overwrite @oui/oui-index seems to strip the jsdoc comment and the first line ends up being the export statement. Note that the jsdoc comment underneath the first export is preserved.
Naturally, I would prefer not to have redundant comments, but that seems to be a workaround for now.
Also note that if content begins with "use client", a jsdoc comment underneath is preserved.
For reference, here is the source file, corresponding registry item json, and result of running the add command.
Affected component/components
cli
How to reproduce
- pnpm dlx shadcn@latest add --overwrite @oui/oui-index
Codesandbox/StackBlitz link
No response
Logs
System Info
Latest version of shadcn cli
Before submitting
- [x] I've made research efforts and searched the documentation
- [x] I've searched for existing issues