Skip to content

Commit ead5ee8

Browse files
dominic-clerkclaude
andcommitted
chore(repo): Exclude test files from published packages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent fdf7509 commit ead5ee8

7 files changed

Lines changed: 24 additions & 5 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@clerk/astro': patch
3+
'@clerk/backend': patch
4+
'@clerk/chrome-extension': patch
5+
'@clerk/expo-native-components': patch
6+
'@clerk/nextjs': patch
7+
'@clerk/upgrade': patch
8+
---
9+
10+
Published packages no longer include compiled test files, test type declarations, or test fixtures.

‎packages/astro/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
],
7979
"scripts": {
8080
"build": "tsdown --onSuccess \"pnpm build:dts\" && pnpm copy:components",
81-
"build:dts": "tsc --emitDeclarationOnly --declaration",
81+
"build:dts": "tsc -p tsconfig.declarations.json",
8282
"copy:components": "rm -rf ./components && mkdir -p ./components/ && cp -r ./src/astro-components/* ./components/ && cp ./src/types.ts ./",
8383
"dev": "tsdown --watch",
8484
"dev:pub": "pnpm dev -- --env.publish",

‎packages/backend/tsconfig.declarations.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@
99
"skipLibCheck": true,
1010
"sourceMap": false
1111
},
12-
"exclude": ["node_modules", "dist", "/src/runtime/*", "src/**/__tests__/*.test.ts", "src/tests"]
12+
"exclude": [
13+
"node_modules",
14+
"dist",
15+
"/src/runtime/*",
16+
"src/**/__tests__/*.test.ts",
17+
"src/**/__tests__/*.test-d.ts",
18+
"src/tests"
19+
]
1320
}

‎packages/chrome-extension/tsconfig.declarations.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"declarationMap": true,
99
"sourceMap": false,
1010
"declarationDir": "./dist/types"
11-
}
11+
},
12+
"exclude": ["src/**/__tests__/**"]
1213
}

‎packages/expo-native-components/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"dist",
3838
"android",
3939
"ios",
40-
"src/specs",
40+
"src/specs/*.ts",
4141
"expo-module.config.json",
4242
"react-native.config.js",
4343
"app.plugin.js",

‎packages/nextjs/tsup.config.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default defineConfig(overrideOptions => {
1313
entry: [
1414
'./src/**/*.{ts,tsx,js,jsx}',
1515
'!./src/**/*.test.{ts,tsx}',
16+
'!./src/**/*.test-d.{ts,tsx}',
1617
'!./src/**/server-actions.ts',
1718
'!./src/**/keyless-actions.ts',
1819
'!./src/vendor/**',

‎packages/upgrade/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dist"
1717
],
1818
"scripts": {
19-
"build": "pnpm clean && NODE_ENV=production babel --keep-file-extension --out-dir=dist src --copy-files",
19+
"build": "pnpm clean && NODE_ENV=production babel --keep-file-extension --out-dir=dist src --copy-files && rimraf --glob 'dist/**/__tests__'",
2020
"clean": "rm -rf dist/*",
2121
"dev": "babel --keep-file-extension --out-dir=dist --watch src --copy-files",
2222
"format": "node ../../scripts/format-package.mjs",

0 commit comments

Comments
 (0)