diff --git a/package.json b/package.json index bf422c2522..f71ea29390 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "test:integration:tanstack-start": "E2E_APP_ID=tanstack.start pnpm test:integration:base --grep @tanstack-start", "test:integration:vue": "E2E_APP_ID=vue.vite pnpm test:integration:base --grep @vue", "turbo:clean": "turbo daemon clean", + "typecheck": "FORCE_COLOR=1 turbo typecheck", "version-packages": "changeset version && pnpm install --lockfile-only --engine-strict=false", "version-packages:canary": "./scripts/canary.mjs", "version-packages:snapshot": "./scripts/snapshot.mjs", diff --git a/packages/astro/package.json b/packages/astro/package.json index 33a610c671..3f0429b19d 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -78,7 +78,8 @@ "lint": "eslint src/", "lint:attw": "attw --pack . --ignore-rules no-resolution cjs-resolves-to-esm internal-resolution-error", "lint:publint": "pnpm copy:components && publint", - "publish:local": "pnpm yalc push --replace --sig" + "publish:local": "pnpm yalc push --replace --sig", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/backend/package.json b/packages/backend/package.json index bfcc251689..32ba0841e8 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -89,7 +89,8 @@ "test": "run-s test:node test:edge-runtime test:cloudflare-miniflare", "test:node": "vitest --environment node", "test:edge-runtime": "vitest --environment edge-runtime", - "test:cloudflare-miniflare": "vitest --environment miniflare" + "test:cloudflare-miniflare": "vitest --environment miniflare", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/shared": "workspace:^", diff --git a/packages/chrome-extension/package.json b/packages/chrome-extension/package.json index 0d097860d6..9ac049322e 100644 --- a/packages/chrome-extension/package.json +++ b/packages/chrome-extension/package.json @@ -44,7 +44,8 @@ "test": "jest", "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%", - "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html" + "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/clerk-js": "workspace:^", diff --git a/packages/clerk-js/package.json b/packages/clerk-js/package.json index e1ae2460fd..760bdcbdca 100644 --- a/packages/clerk-js/package.json +++ b/packages/clerk-js/package.json @@ -49,6 +49,7 @@ "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%", "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html", + "typecheck": "tsc --noEmit", "watch": "rspack build --config rspack.config.js --env production --watch" }, "browserslist": "last 2 years, Safari > 12, iOS > 12", diff --git a/packages/elements/package.json b/packages/elements/package.json index 391e4860d5..6d09ff518f 100644 --- a/packages/elements/package.json +++ b/packages/elements/package.json @@ -68,7 +68,8 @@ "lint:attw": "attw --pack . --ignore-rules no-resolution", "lint:publint": "publint", "test": "jest", - "test:cache:clear": "jest --clearCache --useStderr" + "test:cache:clear": "jest --clearCache --useStderr", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/clerk-react": "workspace:^", diff --git a/packages/expo-passkeys/package.json b/packages/expo-passkeys/package.json index 4a02cac3a2..a117ba130f 100644 --- a/packages/expo-passkeys/package.json +++ b/packages/expo-passkeys/package.json @@ -28,7 +28,8 @@ "lint": "eslint src/", "open:android": "open -a \"Android Studio\" example/android", "open:ios": "xed example/ios", - "publish:local": "pnpm yalc push --replace --sig" + "publish:local": "pnpm yalc push --replace --sig", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/shared": "workspace:^", diff --git a/packages/expo/package.json b/packages/expo/package.json index 00eff40f72..7950ded885 100644 --- a/packages/expo/package.json +++ b/packages/expo/package.json @@ -63,7 +63,8 @@ "dev:publish": "pnpm dev -- --env.publish", "lint": "eslint src/", "publish:local": "pnpm yalc push --replace --sig", - "test": "vitest" + "test": "vitest", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/clerk-js": "workspace:^", diff --git a/packages/express/package.json b/packages/express/package.json index 218b10d048..1022c2fd5d 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -52,7 +52,8 @@ "publish:local": "pnpm yalc push --replace --sig", "test": "jest", "test:cache:clear": "jest --clearCache --useStderr", - "test:ci": "jest --maxWorkers=70%" + "test:ci": "jest --maxWorkers=70%", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/fastify/package.json b/packages/fastify/package.json index 2de0021b28..e37b75133b 100644 --- a/packages/fastify/package.json +++ b/packages/fastify/package.json @@ -37,7 +37,8 @@ "lint:publint": "publint", "publish:local": "pnpm yalc push --replace --sig", "test": "jest", - "test:cache:clear": "jest --clearCache --useStderr" + "test:cache:clear": "jest --clearCache --useStderr", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 9b36cfd99f..c768147b30 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -62,7 +62,8 @@ "lint:attw": "attw --pack . --ignore-rules no-resolution unexpected-module-syntax", "lint:publint": "publint", "publish:local": "pnpm yalc push --replace --sig", - "test": "vitest" + "test": "vitest", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/nextjs/src/server/__tests__/clerkMiddleware.test.ts b/packages/nextjs/src/server/__tests__/clerkMiddleware.test.ts index 9d06d9e10a..19548e9f4e 100644 --- a/packages/nextjs/src/server/__tests__/clerkMiddleware.test.ts +++ b/packages/nextjs/src/server/__tests__/clerkMiddleware.test.ts @@ -591,7 +591,7 @@ describe('clerkMiddleware(params)', () => { describe('debug', () => { beforeEach(() => { - global.console.log.mockClear(); + vi.mocked(global.console.log).mockClear(); }); it('outputs debug logs when used with only params', async () => { diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 3f804360a0..6ed6d6f269 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -55,7 +55,8 @@ "lint:attw": "attw --pack . --ignore-rules no-resolution cjs-resolves-to-esm", "lint:publint": "publint", "publish:local": "pnpm yalc push --replace --sig", - "test": "vitest" + "test": "vitest", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 47ead7b339..28a658f28a 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -68,7 +68,8 @@ "lint": "eslint src/", "lint:attw": "attw --pack . --ignore-rules cjs-resolves-to-esm", "lint:publint": "publint", - "publish:local": "pnpm dlx yalc push --replace --sig" + "publish:local": "pnpm dlx yalc push --replace --sig", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/react/package.json b/packages/react/package.json index be547a79e1..ad81460cdd 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -71,7 +71,8 @@ "lint:attw": "attw --pack .", "lint:publint": "publint", "publish:local": "pnpm yalc push --replace --sig", - "test": "vitest" + "test": "vitest", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/shared": "workspace:^", diff --git a/packages/react/src/isomorphicClerk.ts b/packages/react/src/isomorphicClerk.ts index f27c338546..448f6b5cd4 100644 --- a/packages/react/src/isomorphicClerk.ts +++ b/packages/react/src/isomorphicClerk.ts @@ -1151,6 +1151,7 @@ export class IsomorphicClerk implements IsomorphicLoadedClerk { } }; + // @ts-expect-error authenticateWithOKXWallet = async (params: AuthenticateWithOKXWalletParams): Promise => { const callback = () => this.clerkjs?.authenticateWithOKXWallet(params); if (this.clerkjs && this.#loaded) { diff --git a/packages/remix/package.json b/packages/remix/package.json index acaeeb83cc..0dddcb2f51 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -70,7 +70,8 @@ "lint": "eslint src/", "lint:attw": "attw --pack .", "lint:publint": "publint", - "publish:local": "pnpm yalc push --replace --sig" + "publish:local": "pnpm yalc push --replace --sig", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/sdk-node/package.json b/packages/sdk-node/package.json index 9ed4697439..017053b4d6 100644 --- a/packages/sdk-node/package.json +++ b/packages/sdk-node/package.json @@ -50,7 +50,8 @@ "lint:attw": "attw --pack .", "test": "jest", "test:cache:clear": "jest --clearCache --useStderr", - "test:ci": "jest --maxWorkers=70%" + "test:ci": "jest --maxWorkers=70%", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/shared/package.json b/packages/shared/package.json index f310fb41b9..39611ad289 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -130,7 +130,8 @@ "test": "jest", "test:cache:clear": "jest --clearCache --useStderr", "test:ci": "jest --maxWorkers=70%", - "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html" + "test:coverage": "jest --collectCoverage && open coverage/lcov-report/index.html", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/types": "workspace:^", diff --git a/packages/tailwindcss-transformer/package.json b/packages/tailwindcss-transformer/package.json index bccbeb9dd4..3a06760fb3 100644 --- a/packages/tailwindcss-transformer/package.json +++ b/packages/tailwindcss-transformer/package.json @@ -26,7 +26,8 @@ "scripts": { "build": "tsup", "dev": "tsup --watch", - "test": "jest" + "test": "jest", + "typecheck": "tsc --noEmit" }, "dependencies": { "@babel/parser": "^7.24.5", diff --git a/packages/tanstack-start/package.json b/packages/tanstack-start/package.json index c7fdcc70eb..49505fe328 100644 --- a/packages/tanstack-start/package.json +++ b/packages/tanstack-start/package.json @@ -56,7 +56,8 @@ "lint": "eslint src/", "lint:attw": "attw --pack . --ignore-rules cjs-resolves-to-esm", "lint:publint": "publint", - "publish:local": "pnpm yalc push --replace --sig" + "publish:local": "pnpm yalc push --replace --sig", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/testing/package.json b/packages/testing/package.json index f5c464dbfd..b100428953 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -59,7 +59,8 @@ "build": "tsup --env.NODE_ENV production", "clean": "rimraf ./dist", "dev": "tsup --watch", - "lint": "eslint src/" + "lint": "eslint src/", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/backend": "workspace:^", diff --git a/packages/themes/package.json b/packages/themes/package.json index 06ae0c08aa..bd8f8d0d85 100644 --- a/packages/themes/package.json +++ b/packages/themes/package.json @@ -34,7 +34,8 @@ "build": "tsc -p tsconfig.build.json", "clean": "rimraf ./dist", "dev": "tsc -p tsconfig.build.json --watch", - "lint": "eslint src/" + "lint": "eslint src/", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/types": "workspace:^", diff --git a/packages/types/package.json b/packages/types/package.json index 6c582961b3..a1861c9c5d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -33,7 +33,8 @@ "build": "tsup --env.NODE_ENV production", "clean": "rimraf ./dist", "dev": "tsup --watch", - "lint": "eslint src/" + "lint": "eslint src/", + "typecheck": "tsc --noEmit" }, "dependencies": { "csstype": "3.1.1" diff --git a/packages/ui/package.json b/packages/ui/package.json index 9e7ea85ed1..61b04816b7 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -49,7 +49,8 @@ "bundlewatch": "pnpm dlx bundlewatch --config bundlewatch.config.json", "dev": "tsup --watch", "dev:theme-builder": "concurrently \"pnpm dev\" \"cd theme-builder && pnpm dev\"", - "test": "vitest" + "test": "vitest", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/elements": "workspace:^", diff --git a/packages/vue/package.json b/packages/vue/package.json index 365fd8deb9..443091b1a1 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -48,7 +48,8 @@ "lint:publint": "publint", "publish:local": "pnpm yalc push --replace --sig", "test": "vitest", - "test:ci": "vitest --maxWorkers=70%" + "test:ci": "vitest --maxWorkers=70%", + "typecheck": "tsc --noEmit" }, "dependencies": { "@clerk/shared": "workspace:^", diff --git a/turbo.json b/turbo.json index 180db7fc82..de4bc07ce6 100644 --- a/turbo.json +++ b/turbo.json @@ -138,6 +138,10 @@ "format:check": { "outputs": [] }, + "typecheck": { + "dependsOn": ["build"], + "outputs": [] + }, "//#test:integration:ap-flows": { "dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build"], "env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],