Skip to content

chore(repo): Exclude test files from published packages - #10522

Open
dominic-clerk wants to merge 1 commit into
mainfrom
dominic/sec-493-exclude-test-files
Open

dominic-clerk wants to merge 1 commit into
mainfrom
dominic/sec-493-exclude-test-files

Conversation

@dominic-clerk

Copy link
Copy Markdown
Contributor

Description

Stacked on #10521. Stops publishing test files that leaked into six packages (they're in the current npm releases too):

  • @clerk/nextjs: tsup entry also excludes *.test-d.* (compiled type tests that import vitest)
  • @clerk/backend: declarations tsconfig also excludes *.test-d.ts
  • @clerk/chrome-extension: declarations tsconfig excludes __tests__
  • @clerk/astro: build:dts uses the existing tsconfig.declarations.json (from ci(repo): extend break-check coverage to all SDK packages #8691, reverted by chore(repo): Upgrade to TypeScript 6.0 #8177's merge)
  • @clerk/upgrade: strips dist/**/__tests__ after the babel build (68 files, incl. fixtures)
  • @clerk/expo-native-components: files ships src/specs/*.ts instead of all of src/specs, so codegen's jsSrcsDir no longer contains a test

#2005 set this intent for the tsup builds; these are the paths it didn't cover. No other packed file changes.

Part of SEC-493

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 30, 2026 8:04am UTC
swingset Ready Ready Preview Oct 30, 2026 8:04am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between ad9cbf3 and 649306a.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fdf7509 and ead5ee8.

Files selected for processing: 7
  • .changeset/exclude-test-files-from-packages.md
  • packages/astro/package.json
  • packages/backend/tsconfig.declarations.json
  • packages/chrome-extension/tsconfig.declarations.json
  • packages/expo-native-components/package.json
  • packages/nextjs/tsup.config.ts
  • packages/upgrade/package.json
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

Walkthrough

Build and package configuration changes exclude test files, test type declarations, and test fixtures from package outputs. The changes include declaration and bundle build exclusions, a narrower published-files pattern for Expo Native Components, and removal of generated test directories from the Upgrade build output. A changeset records patch releases for six packages.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: clerk-cookie

Merge Risk: Minimal · previous review ead5e

The package-output cleanup is ready to merge; no confirmed regression remains in the reviewed scope.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description clearly explains the package build and publishing changes, identifies the affected packages, and states the validation performed.
Title check Passed The title concisely and accurately summarizes the main change: excluding test files from published packages.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (6 skipped: 6 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

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

@changeset-bot

changeset-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 649306a

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

This PR includes changesets to release 15 packages
Name Type
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/expo-native-components Patch
@clerk/nextjs Patch
@clerk/upgrade Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/expo Patch
@clerk/swingset Patch

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

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10522

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10522

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10522

@clerk/expo

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

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10522

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10522

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10522

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10522

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 649306a

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-10-30T08:06:45.144Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 649306a.

Base automatically changed from dominic/sec-493-fix-dependency-scopes to main October 30, 2026 08:01
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – swingset — 649306a5 Deployed Oct 30, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 649306a5 Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to 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