From 103ea6e61e801b15ebe2e73a838a561c1f0c8805 Mon Sep 17 00:00:00 2001 From: Jacek Date: Mon, 1 Jun 2026 17:46:49 -0500 Subject: [PATCH] build(shared): drop redundant tsc declarations build shared builds its published declarations with tsdown (dts: true); every exports target resolves to dist/runtime or dist/types (tsdown output), and the release pipeline runs only turbo build, never build:declarations. The tsc build:declarations step therefore only emitted unreferenced top-level dist/*.d.ts and redundantly overwrote dist/types/index.d.ts in CI, never affecting the published package. Remove the script, its tsconfig.declarations.json, and shared from the root build:declarations filter. break-check still snapshots shared via its tsdown-built dist/runtime (shared#build runs as a dependency of the other filtered packages). Tooling-only, no published output change. --- .changeset/shared-drop-redundant-tsc-declarations.md | 2 ++ package.json | 2 +- packages/shared/package.json | 1 - packages/shared/tsconfig.declarations.json | 4 ---- 4 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 .changeset/shared-drop-redundant-tsc-declarations.md delete mode 100644 packages/shared/tsconfig.declarations.json diff --git a/.changeset/shared-drop-redundant-tsc-declarations.md b/.changeset/shared-drop-redundant-tsc-declarations.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/shared-drop-redundant-tsc-declarations.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/package.json b/package.json index fff412306a9..4dc318bb69d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "MIT", "scripts": { "build": "FORCE_COLOR=1 turbo build --concurrency=${TURBO_CONCURRENCY:-80%}", - "build:declarations": "FORCE_COLOR=1 turbo build:declarations --concurrency=${TURBO_CONCURRENCY:-80%} --filter=@clerk/nextjs --filter=@clerk/react --filter=@clerk/shared", + "build:declarations": "FORCE_COLOR=1 turbo build:declarations --concurrency=${TURBO_CONCURRENCY:-80%} --filter=@clerk/nextjs --filter=@clerk/react", "bundlewatch": "turbo run bundlewatch", "changeset": "changeset", "changeset:empty": "pnpm changeset --empty", diff --git a/packages/shared/package.json b/packages/shared/package.json index 77aba462289..b2e52bbf840 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -125,7 +125,6 @@ ], "scripts": { "build": "tsdown", - "build:declarations": "tsc -p tsconfig.declarations.json", "clean": "rimraf ./dist", "dev": "tsdown --watch src", "dev:pub": "pnpm dev -- --env.publish", diff --git a/packages/shared/tsconfig.declarations.json b/packages/shared/tsconfig.declarations.json deleted file mode 100644 index 77130064259..00000000000 --- a/packages/shared/tsconfig.declarations.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["node_modules", "**/__tests__/**/*"] -}