Skip to content

chore(ui): add tsc-based build:declarations task#8627

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

chore(ui): add tsc-based build:declarations task#8627
jacekradko merged 1 commit into
mainfrom
jacek/ui-build-declarations

Conversation

@jacekradko
Copy link
Copy Markdown
Member

Adds a declarations-only tsc emit for @clerk/ui, mirroring what @clerk/shared already does. tsconfig.declarations.json extends ui's existing tsconfig with emitDeclarationOnly: true and the standard test/spec excludes, and build:declarations runs tsc -p tsconfig.declarations.json.

Pulled out of #8621 so the snapi watcher there can start filtering on @clerk/ui without the baseline worktree having to materialize the script itself.

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-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

🦋 Changeset detected

Latest commit: 524f813

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 3:59pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 72bd9f46-a1e0-41ea-a9a8-7acecdf8a435

📥 Commits

Reviewing files that changed from the base of the PR and between 99aab85 and 524f813.

📒 Files selected for processing (3)
  • .changeset/ui-build-declarations.md
  • packages/ui/package.json
  • packages/ui/tsconfig.declarations.json

📝 Walkthrough

Walkthrough

This PR establishes a TypeScript declarations build pipeline for the packages/ui package. A new tsconfig.declarations.json configuration file is added to emit only declaration files while excluding test and spec directories. An npm script build:declarations is added to package.json to invoke the TypeScript compiler with this configuration. A changeset entry documents the addition.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • clerk/javascript#8623: Addresses the same declarations-build wiring pattern for TypeScript declarations generation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a tsc-based build:declarations task to the ui package, which aligns with the changeset content.
Description check ✅ Passed The description provides relevant context about the changes, explaining the purpose of adding a declarations-only emit for @clerk/ui and its relationship to existing infrastructure.
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.

✏️ 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@8627

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 524f813

@jacekradko jacekradko merged commit fc740b2 into main May 22, 2026
43 checks passed
@jacekradko jacekradko deleted the jacek/ui-build-declarations branch May 22, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants