mirror of
https://github.com/hanzoai/ui.git
synced 2026-11-20 22:36:27 +00:00
pkg/ui/package.json carried TWO "dependencies" objects. JSON is last-key-wins, so the 3-entry block appended after "author" in88407a608(the telemetry subpath) silently overwrote the real 24-entry block added in4b1d95506(the shadcn backend + core/tokens). @hanzo/ui therefore declared none of the packages its own source imports: npx tsc --noEmit -> 43 errors npm run build -> "Build failed with 25 errors" (ESM and CJS alike) Nothing was wrong with the components. Every error was an unresolvable import: Radix/cva/clsx/tailwind-merge/cmdk/sonner from src/backends/shadcn + src/core/cn -- which the ROOT barrel re-exports (src/index.ts -> ./backends/shadcn) -- plus @hanzo/tokens. The TS2339 on ButtonProps and the TS7006 implicit-anys were cascades off those unresolved modules, not separate defects. Merging the two blocks into one restores the manifest AND the bundling: tsup externalizes declared dependencies, so Radix is now imported by dist/index.js instead of inlined into it. Two copies of @radix-ui/react-dialog in one app means two React contexts and dead dialogs. @hanzo/tokens also moves file:../../pkgs/tokens -> workspace:*. pnpm rewrites the workspace: protocol to a real version on pack; a file: specifier publishes verbatim and resolves for nobody. pkgs/{tokens,products}/tsconfig.json: drop ignoreDeprecations "6.0". Both declare typescript ^5.9.3, where the only accepted value is "5.0", so tsup's dts worker died with TS5103 and these two never emitted the .d.ts that @hanzo/ui imports. Neither config uses an option deprecated in 5.0 -- the escape hatch was inert dead weight that only broke the build. Gates in pkg/ui: npx tsc --noEmit -> 0 errors; npm run build -> ESM+CJS+dts success from a clean dist; vitest 45/45. The 8 social components verified through the published exports map (consumer tsc + esbuild bundle). Most of the pnpm-lock.yaml diff is pre-existing churn -- a plain `pnpm install` with zero source changes rewrites 3169 lines on this repo. The delta owed to this fix is +594/-20; the removals are Radix peer-hash dedup (one copy, not two). Co-authored-by: Hanzo Dev <[email protected]>