Files
ui/pkgs/shadcn/package.json
zeekayandHanzo Dev c79181b3bf types: TypeScript 7 native for the 18 packages where it agrees with tsc
Adds @typescript/native-preview (tsgo 7.0.0-dev.20260707.2) and points
`typecheck`/`tc` at it wherever the Go compiler was verified to reach the same
verdict as tsc. Measured, package by package, both compilers on the same
invocation:

  agree, green (18)   pkg/ui, pkg/data, annotate, canvas, cd, dashboard,
                      observe, observe-native, observe-svelte, products, react,
                      tests, agent-ui, commerce, checkout, apps/cd
  tsgo disagrees (2)  event  — TS2345 on Uint8Array<ArrayBufferLike> vs
                               ArrayBufferView<ArrayBuffer> in src/uid.ts:34
                      shop   — TS2591, does not pick up the node globals tsc
                               resolves for components/PaymentStep.tsx
  red under both (3)  shadcn, @hanzo/ui-web, v4 — pre-existing type errors,
                      left on tsc so the diff is the compiler, not the errors

event and shop stay on tsc. They are the report, not an oversight.

pkg/ui was red before this: `tsc --noEmit` failed on render.test.tsx, where
ResizablePanelGroup was written without its required `direction`. The build
never caught it because tsconfig.build.json excludes tests, so the shipped
package typechecked green in CI and red on a developer's machine. Fixed, and
pkg/ui is now green under both compilers: 21 test files, 212 tests passing.

Emit stays on tsc everywhere, deliberately. tsgo can emit pkg/ui — 920 files,
identical file list, and the only differences are comment retention in .js and
alphabetical member ordering in .d.ts, i.e. semantically equal. But this is a
published package and tsgo is a dev preview, so the artifact keeps the compiler
it has until tsgo ships stable. The flip is a one-line change when it does.

`tc` in commerce and checkout was `tsc` with no flags, against a tsconfig with
noEmit:false and declaration:true — running it emitted 188 .js/.d.ts files
directly into the source trees, next to the .ts they came from. A typecheck
script that writes build output into src is a trap; both are now `tsgo --noEmit`.

shadcn imported `type Config from "tailwindcss"` while declaring no dependency
on it, resolving through the root package.json instead. Now that the root no
longer carries Tailwind, the package declares the version it actually uses.

Verified: pnpm build → 21 successful, 21 total.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-03 18:02:20 -07:00

127 lines
3.6 KiB
JSON

{
"name": "shadcn",
"version": "4.1.0",
"description": "Add components to your apps.",
"license": "MIT",
"author": {
"name": "shadcn",
"url": "https://twitter.com/shadcn"
},
"repository": {
"type": "git",
"url": "https://github.com/shadcn-ui/ui.git",
"directory": "packages/shadcn"
},
"files": [
"dist"
],
"keywords": [
"components",
"ui",
"tailwind",
"radix-ui",
"shadcn"
],
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./registry": {
"types": "./dist/registry/index.d.ts",
"default": "./dist/registry/index.js"
},
"./schema": {
"types": "./dist/schema/index.d.ts",
"default": "./dist/schema/index.js"
},
"./mcp": {
"types": "./dist/mcp/index.d.ts",
"default": "./dist/mcp/index.js"
},
"./utils": {
"types": "./dist/utils/index.d.ts",
"default": "./dist/utils/index.js"
},
"./icons": {
"types": "./dist/icons/index.d.ts",
"default": "./dist/icons/index.js"
},
"./preset": {
"types": "./dist/preset/index.d.ts",
"default": "./dist/preset/index.js"
},
"./tailwind.css": {
"style": "./dist/tailwind.css"
}
},
"bin": "./dist/index.js",
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
"typecheck": "tsc --noEmit",
"clean": "rimraf dist && rimraf components",
"start:dev": "cross-env REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates node dist/index.js",
"start:prod": "cross-env REGISTRY_URL=https://ui.shadcn.com/r node dist/index.js",
"start": "node dist/index.js",
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
"pub:beta": "pnpm build && pnpm publish --no-git-checks --access public --tag beta",
"pub:next": "pnpm build && pnpm publish --no-git-checks --access public --tag next",
"pub:release": "pnpm build && pnpm publish --access public",
"test": "vitest run",
"test:dev": "REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates vitest run",
"mcp:inspect": "pnpm dlx @modelcontextprotocol/inspector node dist/index.js mcp"
},
"dependencies": {
"@babel/core": "^7.28.0",
"@babel/parser": "^7.28.0",
"@babel/plugin-transform-typescript": "^7.28.0",
"@babel/preset-typescript": "^7.27.1",
"@dotenvx/dotenvx": "^1.73.1",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/validate-npm-package-name": "^4.0.2",
"browserslist": "^4.26.2",
"commander": "^14.0.0",
"cosmiconfig": "^9.0.0",
"dedent": "^1.6.0",
"deepmerge": "^4.3.1",
"diff": "^8.0.2",
"execa": "^9.6.0",
"fast-glob": "^3.3.3",
"fs-extra": "^11.3.1",
"fuzzysort": "^3.1.0",
"https-proxy-agent": "^7.0.6",
"kleur": "^4.1.5",
"msw": "^2.10.4",
"node-fetch": "^3.3.2",
"open": "^11.0.0",
"ora": "^8.2.0",
"postcss": "^8.5.6",
"postcss-selector-parser": "^7.1.0",
"prompts": "^2.4.2",
"recast": "^0.23.11",
"stringify-object": "^5.0.0",
"tailwind-merge": "^3.0.1",
"ts-morph": "^26.0.0",
"tsconfig-paths": "^4.2.0",
"validate-npm-package-name": "^7.0.1",
"zod": "^3.24.1",
"zod-to-json-schema": "^3.24.6"
},
"devDependencies": {
"@antfu/ni": "^25.0.0",
"@types/babel__core": "^7.20.5",
"@types/fs-extra": "^11.0.4",
"@types/prompts": "^2.4.9",
"@types/stringify-object": "^4.0.5",
"rimraf": "^6.0.1",
"tailwindcss": "^4.3.0",
"tsup": "^8.5.0",
"type-fest": "^4.41.0",
"typescript": "^5.9.2"
},
"private": true
}