Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
ci(repo): extend break-check coverage to all SDK packages by jacekradko · Pull Request #8691 · clerk/javascript · GitHub
Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' ci(repo): extend break-check coverage to all SDK packages by jacekradko · Pull Request #8691 · clerk/javascript · GitHub
Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' ci(repo): extend break-check coverage to all SDK packages by jacekradko · Pull Request #8691 · clerk/javascript · GitHub
Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' ci(repo): extend break-check coverage to all SDK packages by jacekradko · Pull Request #8691 · clerk/javascript · GitHub
Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' ci(repo): extend break-check coverage to all SDK packages by jacekradko · Pull Request #8691 · clerk/javascript · GitHub
Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' ci(repo): extend break-check coverage to all SDK packages by jacekradko · Pull Request #8691 · clerk/javascript · GitHub
Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); ci(repo): extend break-check coverage to all SDK packages by jacekradko · Pull Request #8691 · clerk/javascript · GitHub
Skip to content

ci(repo): extend break-check coverage to all SDK packages - #8691

Merged
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages
Jun 1, 2026
Merged

ci(repo): extend break-check coverage to all SDK packages#8691
jacekradko merged 14 commits into
mainfrom
jacek/snapi-coverage-all-packages

Conversation

@jacekradko

@jacekradkojacekradko commented May 28, 2026

Copy link
Copy Markdown
Contributor

Extends break-check API-change tracking from the original 6 packages to all 19 publishable SDKs (skipping @clerk/upgrade, @clerk/dev-cli, and @clerk/msw, which either have no public JS API or are private).

Most of the work is mechanical: each newly-tracked package gets a 3-line tsconfig.declarations.json and a "build:declarations": "tsc -p tsconfig.declarations.json" script, mirroring the pattern already in backend, clerk-js, nextjs, react, shared, and ui. @clerk/vue uses vue-tsc instead of tsc so SFCs resolve correctly. The choice to standardize on a TypeScript-compiler-emitted per-file .d.ts tree (vs tsup's bundled .d.ts) is deliberate: per-file output is what API Extractor / break-check can analyze without inventing duplicate-index-signature errors.

Two non-mechanical bits worth a look:

  • packages/nuxt/src/runtime/components/uiComponents.ts adds explicit typeof BaseUserProfile / typeof BaseOrganizationProfile annotations. Without them tsc emits TS2742 ("inferred type cannot be named without a reference to '../../../node_modules/@clerk/vue/dist/types'") because Object.assign(component, { Page, Link }) produces a structural type that can only be written by reaching into a transitive dep. Same emitted type, just spelled out.

  • packages/tanstack-react-start/tsconfig.declarations.json adds an exclude for __tests__ / *.test.{ts,tsx}. The pre-existing config didn't exclude tests, so its build:declarations was actually failing on a test file's type assertion. It just hadn't been wired into the workflow yet, so nobody noticed.

break-check.config.json and .github/workflows/api-changes.yml are expanded to cover the new packages in both the path filter and BREAK_CHECK_FILTERS. Verified locally: pnpm turbo build:declarations across all 19 packages runs clean (38 tasks, ~57s).

The tool itself was also renamed upstream from snapi to break-check (package @clerk/break-check, binary break-check), so this branch moves with it: the workflow points at the new pkg.pr.new build, snapi.config.json becomes break-check.config.json, and the SNAPI_* env/secret names become BREAK_CHECK_*. No backwards-compat shims left behind.

@changeset-bot

changeset-botBot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0228509

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

@vercel

vercelBot commented May 28, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxSkippedSkippedJun 1, 2026 3:15pm

Request Review

@pkg-pr-new

pkg-pr-newBot commented May 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0228509

@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR expands API-change detection to many more packages by updating snapi.config.json and the api-changes workflow, rewrites the workflow’s report-posting step to use actions/github-script, and changes cache key derivation for snapi baselines. It also adds per-package tsconfig.declarations.json files and build:declarations scripts across multiple packages, updates package build scripts (astro/vue/testing/tsup) to run the declaration flow, and adds explicit typeof annotations to two Nuxt component exports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • clerk/javascript#8621: Both PRs update the api-changes.yml and snapi.config.json SNAPI package/snapshot filtering and baseline/detection behavior, so the main PR’s SNAPI workflow/config changes are directly related.
  • clerk/javascript#8677: Both PRs modify .github/workflows/api-changes.yml, specifically the SNAPI_PACKAGE version reference used by the snapi CLI.
  • clerk/javascript#8670: Both PRs modify .github/workflows/api-changes.yml by updating the SNAPI_PACKAGE pin and its triggering/coverage behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title accurately summarizes the main objective: extending break-check/snapi API-change coverage to all SDK packages, which is the primary focus of this PR.
Description check✅ PassedThe description is comprehensive and directly related to the changeset, explaining the mechanical additions of tsconfig files, script changes, and tooling updates across all 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

205-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update hardcoded message to reflect expanded package coverage.

The hardcoded message lists only the original 6 packages, but the workflow now monitors 19 packages. This creates confusion about the actual scope of API-change detection.

💬 Proposed fix to list all monitored packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'

Alternatively, consider making this message dynamic based on the snapi.config.json packages list to avoid future mismatches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml at line 205, The hardcoded echo message in
the api-changes workflow (the line that runs echo '**Snapi**: no API changes
detected...') lists only six packages but the workflow actually monitors 19;
update that string to enumerate all 19 monitored packages or (better) make the
message dynamic by reading the package list from snapi.config.json so it always
reflects the actual snapi package set; locate the echo command (the exact shell
command containing '**Snapi**: no API changes detected in') and either expand
the list to include every monitored package name or replace it with logic that
builds the package list from snapi.config.json before echoing.
🧹 Nitpick comments (2)
packages/astro/package.json (1)

80-81: ⚡ Quick win

Add a lightweight CI test for declaration build wiring.

Since this PR changes package build/declaration scripts and no tests were added, please add a small CI assertion (or workspace script check) that build:declarations exists and runs for touched packages.

As per coding guidelines: "**/*: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/astro/package.json` around lines 80 - 81, Add a lightweight CI check
that validates the package script "build:declarations" exists and runs
successfully for packages touched by the PR: implement a new workspace script or
CI job that (1) detects changed packages from the commit/PR, (2) for each
changed package reads its package.json and asserts the "build:declarations"
script key exists (e.g., "build:declarations": "tsc -p
tsconfig.declarations.json"), and (3) runs that script (or runs tsc -p
tsconfig.declarations.json directly) to ensure declaration wiring succeeds;
update CI workflow to call this check for changed packages so future PRs must
include or update declaration scripts when build changes are made.
packages/localizations/tsconfig.declarations.json (1)

1-8: 💤 Low value

Consider standardizing compiler options across declaration configs.

This config uses declarationDir and relies on the base tsconfig.json for options like declaration, emitDeclarationOnly, and noEmit. Other packages in this PR (e.g., packages/nuxt/tsconfig.declarations.json) explicitly set these options and use outDir instead. While both approaches work, explicit configuration improves maintainability and makes the intent clearer.

📋 Suggestion for explicit configuration
 {
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "./dist",- "skipLibCheck": true+ "declaration": true,+ "declarationMap": true,+ "emitDeclarationOnly": true,+ "noEmit": false,+ "outDir": "./dist",+ "skipLibCheck": true
},
"exclude": ["node_modules", "tmp", "dist", "**/__tests__/**/*"]
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/localizations/tsconfig.declarations.json` around lines 1 - 8, This
declaration tsconfig currently only sets "declarationDir" and inherits other
flags from the base, so make the file explicit and consistent with other
packages by adding compilerOptions: set "declaration": true,
"emitDeclarationOnly": true, and explicitly set "outDir": "./dist" (and
adjust/remove "declarationDir" if you prefer outDir semantics), ensure "noEmit"
is not blocking (set to false or omit if base sets true), and keep
"skipLibCheck": true; update the JSON in this tsconfig to explicitly declare
these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Line 205: The hardcoded echo message in the api-changes workflow (the line
that runs echo '**Snapi**: no API changes detected...') lists only six packages
but the workflow actually monitors 19; update that string to enumerate all 19
monitored packages or (better) make the message dynamic by reading the package
list from snapi.config.json so it always reflects the actual snapi package set;
locate the echo command (the exact shell command containing '**Snapi**: no API
changes detected in') and either expand the list to include every monitored
package name or replace it with logic that builds the package list from
snapi.config.json before echoing.
---
Nitpick comments:
In `@packages/astro/package.json`:
- Around line 80-81: Add a lightweight CI check that validates the package
script "build:declarations" exists and runs successfully for packages touched by
the PR: implement a new workspace script or CI job that (1) detects changed
packages from the commit/PR, (2) for each changed package reads its package.json
and asserts the "build:declarations" script key exists (e.g.,
"build:declarations": "tsc -p tsconfig.declarations.json"), and (3) runs that
script (or runs tsc -p tsconfig.declarations.json directly) to ensure
declaration wiring succeeds; update CI workflow to call this check for changed
packages so future PRs must include or update declaration scripts when build
changes are made.
In `@packages/localizations/tsconfig.declarations.json`:
- Around line 1-8: This declaration tsconfig currently only sets
"declarationDir" and inherits other flags from the base, so make the file
explicit and consistent with other packages by adding compilerOptions: set
"declaration": true, "emitDeclarationOnly": true, and explicitly set "outDir":
"./dist" (and adjust/remove "declarationDir" if you prefer outDir semantics),
ensure "noEmit" is not blocking (set to false or omit if base sets true), and
keep "skipLibCheck": true; update the JSON in this tsconfig to explicitly
declare these keys so the intent and behavior match packages/nuxt's
tsconfig.declarations.json.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: baf3d4f9-d55d-4bce-92e9-55c2225d2019

📥 Commits

Reviewing files that changed from the base of the PR and between c24a965 and be63baa.

📒 Files selected for processing (24)
  • .changeset/snapi-coverage-all-packages.md
  • .github/workflows/api-changes.yml
  • packages/astro/package.json
  • packages/astro/tsconfig.declarations.json
  • packages/express/package.json
  • packages/express/tsconfig.declarations.json
  • packages/fastify/package.json
  • packages/fastify/tsconfig.declarations.json
  • packages/hono/package.json
  • packages/hono/tsconfig.declarations.json
  • packages/localizations/package.json
  • packages/localizations/tsconfig.declarations.json
  • packages/nuxt/package.json
  • packages/nuxt/src/runtime/components/uiComponents.ts
  • packages/nuxt/tsconfig.declarations.json
  • packages/react-router/package.json
  • packages/react-router/tsconfig.declarations.json
  • packages/tanstack-react-start/tsconfig.declarations.json
  • packages/testing/package.json
  • packages/testing/tsconfig.declarations.json
  • packages/testing/tsup.config.ts
  • packages/vue/package.json
  • packages/vue/tsconfig.declarations.json
  • snapi.config.json

@coderabbitai

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/api-changes.yml (1)

204-205: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the "no changes" message to reflect all tracked packages.

The message lists only 6 packages (@clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui), but SNAPI_FILTERS now includes 19 packages. This inconsistency could mislead PR authors about the scope of API-change detection.

📝 Proposed fix to include all tracked packages
- echo '**Snapi**: no API changes detected in `@clerk/backend`, `@clerk/clerk-js`, `@clerk/nextjs`, `@clerk/react`, `@clerk/shared`, `@clerk/ui`.'+ echo '**Snapi**: no API changes detected in `@clerk/astro`, `@clerk/backend`, `@clerk/chrome-extension`, `@clerk/clerk-js`, `@clerk/expo`, `@clerk/expo-passkeys`, `@clerk/express`, `@clerk/fastify`, `@clerk/hono`, `@clerk/localizations`, `@clerk/nextjs`, `@clerk/nuxt`, `@clerk/react`, `@clerk/react-router`, `@clerk/shared`, `@clerk/tanstack-react-start`, `@clerk/testing`, `@clerk/ui`, `@clerk/vue`.'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/api-changes.yml around lines 204 - 205, The "no API
changes" echo is out-of-date: replace the hardcoded six-package list with the
full set of tracked packages (or reference the SNAPI_FILTERS variable) so the
message matches SNAPI_FILTERS; locate the check that greps api-changes-report.md
and update the echoed string to enumerate all 19 package names (or dynamically
expand SNAPI_FILTERS) so PR authors see an accurate list of packages covered by
API-change detection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/api-changes.yml:
- Around line 204-205: The "no API changes" echo is out-of-date: replace the
hardcoded six-package list with the full set of tracked packages (or reference
the SNAPI_FILTERS variable) so the message matches SNAPI_FILTERS; locate the
check that greps api-changes-report.md and update the echoed string to enumerate
all 19 package names (or dynamically expand SNAPI_FILTERS) so PR authors see an
accurate list of packages covered by API-change detection.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 42d0ad54-4bb5-4675-883c-9f32d2168f9d

📥 Commits

Reviewing files that changed from the base of the PR and between 7cdc34d and 599e224.

📒 Files selected for processing (1)
  • .github/workflows/api-changes.yml

The snapi tool was renamed to break-check (package @clerk/break-check,
binary break-check, repo clerk/break-check). Point the API Changes
workflow at the new pkg.pr.new build, rename the config file and all
SNAPI_* env vars to BREAK_CHECK_*, and update cache keys, worktree
paths, and the PR-comment marker. The deprecated snapi.config.json
fallback and the old secret mapping are dropped; the workflow reads
the BREAK_CHECK_ANTHROPIC_API_KEY secret directly.
@jacekradkojacekradko changed the title ci(repo): extend snapi coverage to all SDK packagesci(repo): extend break-check coverage to all SDK packagesMay 29, 2026
@github-actions

github-actionsBot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Break Check: no API changes detected across the tracked packages.

The check-api checkout resolved refs/pull/N/merge by default, so the
"current" side floated with the base branch tip and break-check attributed
unrelated base-branch changes to the PR (clerk/break-check#32). Pin the
checkout to pull_request.head.sha; the baseline is already pinned to base.sha.
The baseline-seeding guard must skip seeding when the base ref already
tracks coverage under either config name. A base that predates this
rename still carries snapi.config.json, so the break-check-only check
treated it as untracked and force-fit the full 19-package config onto
it. That diffed newly-tracked packages (astro, nuxt, react-router)
against their bundled .d.ts and produced phantom breaking changes. This
reads the base's real coverage and goes no-op once main carries
break-check.config.json.
The build:dts -> build:declarations rename updated package.json and the
build script's inline --onSuccess, but left the stale build:dts reference
in the tsup config onSuccess. pnpm build masks it via the CLI override;
pnpm dev / dev:pub run the config onSuccess and hit a missing script.
Comment on lines +61 to +67
export const UserProfile: typeof BaseUserProfile = Object.assign(_UserProfile, {
Page: BaseUserProfile.Page,
Link: BaseUserProfile.Link,
});

const _OrganizationProfile = wrapComponentWithRouting(BaseOrganizationProfile, 'OrganizationProfile');
export const OrganizationProfile = Object.assign(_OrganizationProfile, {
export const OrganizationProfile: typeof BaseOrganizationProfile = Object.assign(_OrganizationProfile, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! ty

@jacekradko
jacekradko merged commit cfb9394 into mainJun 1, 2026
45 checks passed
@jacekradko
jacekradko deleted the jacek/snapi-coverage-all-packages branch June 1, 2026 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jacekradko@wobsoriano