From 524f813f9418db2ac3b9a4cda933abad7f469545 Mon Sep 17 00:00:00 2001 From: Jacek Date: Fri, 22 May 2026 10:58:27 -0500 Subject: [PATCH] chore(ui): add tsc-based build:declarations task Matches the convention used by @clerk/shared (which also ships with tsdown). Produces declaration-only output via tsc against a dedicated tsconfig so other tooling (snapi) can build types without rerunning the full tsdown pipeline. --- .changeset/ui-build-declarations.md | 2 ++ packages/ui/package.json | 1 + packages/ui/tsconfig.declarations.json | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 .changeset/ui-build-declarations.md create mode 100644 packages/ui/tsconfig.declarations.json diff --git a/.changeset/ui-build-declarations.md b/.changeset/ui-build-declarations.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/ui-build-declarations.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/ui/package.json b/packages/ui/package.json index 256b30f6bfa..70945f0288d 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -71,6 +71,7 @@ "scripts": { "build": "pnpm build:umd && pnpm build:esm && pnpm check:no-rhc && pnpm type-check", "build:analyze": "rspack build --config rspack.config.js --env production --env analyze --analyze", + "build:declarations": "tsc -p tsconfig.declarations.json", "build:esm": "tsdown", "build:rsdoctor": "RSDOCTOR=true rspack build --config rspack.config.js --env production", "build:umd": "rspack build --config rspack.config.js --env production", diff --git a/packages/ui/tsconfig.declarations.json b/packages/ui/tsconfig.declarations.json new file mode 100644 index 00000000000..a1fc0a91dee --- /dev/null +++ b/packages/ui/tsconfig.declarations.json @@ -0,0 +1,21 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "declaration": true, + "declarationDir": "./dist", + "declarationMap": true, + "emitDeclarationOnly": true, + "skipLibCheck": true + }, + "exclude": [ + "node_modules", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.spec.ts", + "**/*.spec.tsx", + "**/__tests__/**", + "**/__mocks__/**", + "**/test/**", + "**/tests/**" + ] +}