Skip to content

Fix Lanyard shadcn registry output to exclude binary assets#969

Merged
DavidHDev merged 3 commits into
mainfrom
copilot/fix-lanyard-js-add-error
May 21, 2026
Merged

Fix Lanyard shadcn registry output to exclude binary assets#969
DavidHDev merged 3 commits into
mainfrom
copilot/fix-lanyard-js-add-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

@react-bits/Lanyard-JS-CSS and @react-bits/Lanyard-JS-TW were failing during shadcn add because the generated registry entries included card.glb and lanyard.png as component files. That caused shadcn to parse binary payloads during the update step and abort with Unexpected character ''. (1:4).

  • Registry generation

    • Remove the Lanyard-specific folder/file override that was collapsing the item into asset-only output.
    • Treat Lanyard as a manual dependency-resolution case in jsrepo.config.ts so imported non-code assets are not pulled into the published shadcn registry payload.
  • Published registry payload

    • Generate Lanyard variants with source files only:
      • JS-CSS: Lanyard.css, Lanyard.jsx
      • JS-TW: Lanyard.jsx
      • TS-CSS: Lanyard.css, Lanyard.tsx
      • TS-TW: Lanyard.tsx
    • Regenerate the corresponding public/r/Lanyard-*.json entries and public/r/registry.json.
  • Install behavior

    • Preserve the existing manual asset workflow for card.glb and lanyard.png.
    • Avoid publishing binary files as registry:component entries, which is what was breaking shadcn add.
const filesForVariant = (basePath: string, sourceFile: string, styleFile?: string) =>
  title === 'Lanyard'
    ? [
        ...(styleFile ? [{ path: `${basePath}/${styleFile}` }] : []),
        { path: `${basePath}/${sourceFile}` }
      ]
    : [{ path: basePath }];

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ui.shadcn.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits May 21, 2026 15:56
Copilot AI changed the title [WIP] Fix issue with lanyard component installation failing Fix Lanyard shadcn registry output to exclude binary assets May 21, 2026
Copilot AI requested a review from DavidHDev May 21, 2026 15:58
@DavidHDev DavidHDev marked this pull request as ready for review May 21, 2026 16:09
@DavidHDev DavidHDev merged commit 366f4c8 into main May 21, 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.

[BUG]: Lanyard-JS-TW and Lanyard-JS-CSS fails during shadcn add with Unexpected character ''. (1:4)

2 participants