Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/chilled-bananas-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"license": "MIT",
"scripts": {
"build": "FORCE_COLOR=1 turbo build --concurrency=${TURBO_CONCURRENCY:-80%}",
"build:declarations": "FORCE_COLOR=1 turbo build:declarations --concurrency=${TURBO_CONCURRENCY:-80%} --filter=@clerk/nextjs --filter=@clerk/clerk-react --filter=@clerk/shared --filter=@clerk/types",
"bundlewatch": "turbo bundlewatch",
"changeset": "changeset",
"changeset:empty": "pnpm changeset --empty",
Expand Down
2 changes: 0 additions & 2 deletions packages/backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"declaration": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When touching the existing tsconfig.json I removed properties that are defined in tsconfig.declarations.json, just cleaning things up

"declarationMap": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"app:lint": "(cd examples/nextjs && pnpm lint)",
"build": "tsup --env.NODE_ENV production",
"build:analyze": "tsup --env.NODE_ENV production --metafile; open https://esbuild.github.io/analyze/",
"build:declarations": "tsc --env.NODE_ENV production -p tsconfig.json",
"build:declarations": "tsc -p tsconfig.declarations.json",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

--env.NODE_ENV isn't valid for tsc

"dev": "tsup --env.NODE_ENV development --watch",
"dev:example": "concurrently \"pnpm dev\" \"pnpm app:dev\"",
"dev:theme-builder": "TURBO_UI=0 concurrently --prefix-colors auto --names \"elements,ui,theme-builder\" \"turbo dev --filter=@clerk/elements\" \"pnpm dev -w @clerk/ui\" \"cd ../ui/theme-builder && pnpm dev\"",
Expand Down
2 changes: 0 additions & 2 deletions packages/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"compilerOptions": {
"allowJs": true,
"baseUrl": ".",
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"importHelpers": true,
"isolatedModules": true,
Expand Down
1 change: 1 addition & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"scripts": {
"build": "tsup",
"postbuild": "node ../../scripts/subpath-workaround.mjs react",
"build:declarations": "tsc -p tsconfig.declarations.json",
"clean": "rimraf ./dist",
"dev": "tsup --watch",
"dev:publish": "pnpm dev --env.publish",
Expand Down
11 changes: 11 additions & 0 deletions packages/react/tsconfig.declarations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"declarationMap": true,
"emitDeclarationOnly": true,
"skipLibCheck": true
},
"exclude": ["**/__tests__/**/*"]
}
3 changes: 0 additions & 3 deletions packages/react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"declarationMap": false,
"esModuleInterop": true,
"emitDeclarationOnly": true,
"importHelpers": true,
"isolatedModules": true,
"jsx": "react",
Expand Down
1 change: 1 addition & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"scripts": {
"build": "tsup",
"postbuild": "node ../../scripts/subpath-workaround.mjs shared",
"build:declarations": "tsc -p tsconfig.declarations.json",
"clean": "rimraf ./dist",
"dev": "tsup --watch",
"dev:publish": "pnpm dev -- --env.publish",
Expand Down
11 changes: 11 additions & 0 deletions packages/shared/tsconfig.declarations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"declarationMap": true,
"emitDeclarationOnly": true,
"skipLibCheck": true
},
"exclude": ["**/__tests__/**/*"]
}
4 changes: 0 additions & 4 deletions packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true,
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
"outDir": "dist",
"resolveJsonModule": true,
"declarationDir": "dist/types",
"jsx": "react",
"lib": ["ES6", "DOM", "WebWorker"],
"allowJs": true
Expand Down
1 change: 1 addition & 0 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
],
"scripts": {
"build": "tsup --env.NODE_ENV production",
"build:declarations": "tsc -p tsconfig.declarations.json",
"clean": "rimraf ./dist",
"dev": "tsup --watch",
"lint": "eslint src"
Expand Down
11 changes: 11 additions & 0 deletions packages/types/tsconfig.declarations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"declarationMap": true,
"emitDeclarationOnly": true,
"skipLibCheck": true
},
"exclude": ["**/__tests__/**/*"]
}
6 changes: 6 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
"outputLogs": "new-only",
"outputs": ["*/package.json", "dist/**", "scripts/**"]
},
"build:declarations": {
"dependsOn": ["build"],
"inputs": ["tsconfig.declarations.json"],
"outputLogs": "new-only",
"outputs": ["dist/**/*.d.ts", "dist/**/*.d.ts.map"]
},
"dev": {
"cache": false
},
Expand Down