Skip to content

chore(shared): exclude tests from build:declarations#8623

Merged
jacekradko merged 1 commit into
mainfrom
jacek/shared-build-declarations-tests
May 22, 2026
Merged

chore(shared): exclude tests from build:declarations#8623
jacekradko merged 1 commit into
mainfrom
jacek/shared-build-declarations-tests

Conversation

@jacekradko
Copy link
Copy Markdown
Member

@jacekradko jacekradko commented May 22, 2026

Brings @clerk/shared in line with every other package. Its build:declarations script was running tsc -p tsconfig.json, which sweeps in src/__tests__/** under strict: true and fails on implicit any in older test files. Nothing in regular CI invokes the script (the published bundle is built by tsdown), so it had been broken without anyone noticing, until a new workflow tried to use it. Adds a tsconfig.declarations.json that mirrors the pattern used in packages/react, packages/clerk-js, etc.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

🦋 Changeset detected

Latest commit: 3189d74

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 22, 2026 1:54am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR configures TypeScript declaration generation to exclude test files from the output. A new tsconfig.declarations.json is added to the packages/shared directory, extending the root TypeScript configuration while excluding node_modules and all **/__tests__/**/* paths. The build:declarations script in package.json is updated to invoke TypeScript using this new configuration instead of the default tsconfig.json. A changeset file documents this change.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: excluding tests from the build:declarations script in the shared package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description clearly explains the issue being fixed: the build:declarations script was failing due to strict type checking on test files, and the solution mirrors patterns used in other packages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 22, 2026

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8623

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8623

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8623

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8623

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8623

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8623

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8623

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8623

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8623

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8623

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8623

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8623

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8623

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8623

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8623

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8623

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8623

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8623

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8623

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8623

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8623

commit: 3189d74

@jacekradko jacekradko merged commit a47d66e into main May 22, 2026
43 of 45 checks passed
@jacekradko jacekradko deleted the jacek/shared-build-declarations-tests branch May 22, 2026 03:16
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.

2 participants