From 5554c556811d8fb4938284da16f0aac5686c8a11 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:15:26 -0300 Subject: [PATCH 01/11] build: upgrade workspace to TypeScript 6.0.2 --- bun.lock | 24 ++++++++++++++++++++++-- packages/cli-core/mocks/bun.lock | 5 +++-- packages/cli-core/mocks/package.json | 2 +- packages/cli-core/mocks/src/main.ts | 4 ++-- packages/cli-core/tsconfig.json | 1 + tsconfig.json | 1 + 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/bun.lock b/bun.lock index cdf81511..bbb80a6f 100644 --- a/bun.lock +++ b/bun.lock @@ -122,7 +122,7 @@ "@inquirer/confirm": ["@inquirer/confirm@6.0.13", "", { "dependencies": { "@inquirer/core": "^11.1.10", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-wkGPC7yJ5WJk1DJ5SX7fzk+gfj4BM8cf5dDDi71B/551xHrdsZVRJOC0WyikXd0pEsb/9cLniuE4atbsMqmFkw=="], - "@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + "@inquirer/core": ["@inquirer/core@11.1.9", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-BDE4fG22uYh1bGSifcj7JSx119TVYNViMhMu85usp4Fswrzh6M0DV3yld64jA98uOAa2GSQ4Bg4bZRm2d2cwSg=="], "@inquirer/editor": ["@inquirer/editor@5.1.2", "", { "dependencies": { "@inquirer/core": "^11.1.10", "@inquirer/external-editor": "^3.0.0", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-Y3Nor7S/DhIPo+8Ym/dSY4efwKI4BsflKDwXh0jNeXJsSF3dteS/3Yf+z4wkibVZDvYMyCgknSTQlNahfunGHg=="], @@ -462,7 +462,7 @@ "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], + "typescript": ["typescript@6.0.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ=="], "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], @@ -480,8 +480,28 @@ "@changesets/get-dependents-graph/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], + "@inquirer/checkbox/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/confirm/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/editor/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + "@inquirer/editor/@inquirer/external-editor": ["@inquirer/external-editor@3.0.0", "", { "dependencies": { "chardet": "^2.1.1", "iconv-lite": "^0.7.2" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-lDSwMgg+M5rq6JKBYaJwSX6T9e/HK2qqZ1oxmOwn4AQoJE5D+7TumsxLGC02PWS//rkIVqbZv3XA3ejsc9FYvg=="], + "@inquirer/expand/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/input/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/number/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/password/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/rawlist/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/search/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + + "@inquirer/select/@inquirer/core": ["@inquirer/core@11.1.10", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-a4Q5BXHQAHa9eO202sTaFCHFYVB3x5fauDuThEAdZ9gfn76pSxiKU7wWcEH0N1O0XmQvNfQNU6QXpiRxmYQx+A=="], + "@manypkg/find-root/@types/node": ["@types/node@12.20.55", "", {}, "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="], "@manypkg/find-root/fs-extra": ["fs-extra@8.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g=="], diff --git a/packages/cli-core/mocks/bun.lock b/packages/cli-core/mocks/bun.lock index 9fa0c179..512895e9 100644 --- a/packages/cli-core/mocks/bun.lock +++ b/packages/cli-core/mocks/bun.lock @@ -1,10 +1,11 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "clerk-cli-mock-auth", "devDependencies": { - "typescript": "^5", + "typescript": "^6.0.2", "vite": "^6.3.5", }, }, @@ -134,7 +135,7 @@ "tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="], - "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "typescript": ["typescript@6.0.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ=="], "vite": ["vite@6.4.1", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", "picomatch": "^4.0.2", "postcss": "^8.5.3", "rollup": "^4.34.9", "tinyglobby": "^0.2.13" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g=="], } diff --git a/packages/cli-core/mocks/package.json b/packages/cli-core/mocks/package.json index d7f08b02..6a401f75 100644 --- a/packages/cli-core/mocks/package.json +++ b/packages/cli-core/mocks/package.json @@ -6,7 +6,7 @@ "dev": "vite" }, "devDependencies": { - "typescript": "^5", + "typescript": "^6.0.2", "vite": "^6.3.5" } } diff --git a/packages/cli-core/mocks/src/main.ts b/packages/cli-core/mocks/src/main.ts index 0df3200a..ec7c5bd7 100644 --- a/packages/cli-core/mocks/src/main.ts +++ b/packages/cli-core/mocks/src/main.ts @@ -4,9 +4,9 @@ const app = document.getElementById("app")!; const params = new URLSearchParams(window.location.search); const callbackPort = params.get("callback_port"); -type Screen = "sign-in" | "sign-up" | "select-app" | "success-new" | "success-existing"; +type AppScreen = "sign-in" | "sign-up" | "select-app" | "success-new" | "success-existing"; -function render(screen: Screen) { +function render(screen: AppScreen) { switch (screen) { case "sign-in": return renderSignIn(); diff --git a/packages/cli-core/tsconfig.json b/packages/cli-core/tsconfig.json index ed9a1874..e73b39d8 100644 --- a/packages/cli-core/tsconfig.json +++ b/packages/cli-core/tsconfig.json @@ -8,6 +8,7 @@ "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, + "types": ["bun"], // Bundler mode "moduleResolution": "bundler", diff --git a/tsconfig.json b/tsconfig.json index f0c97eeb..a92b47bf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, + "types": ["bun"], // Bundler mode "moduleResolution": "bundler", From cf9608f3239160b6f819d730017f79133e2d42a7 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:15:38 -0300 Subject: [PATCH 02/11] fix: resolve TypeScript 6 diagnostics in cli-core --- .../src/commands/init/frameworks/react-router.ts | 7 ++++--- .../src/commands/init/frameworks/transformations.ts | 2 +- packages/cli-core/src/commands/init/heuristics.ts | 8 +++++++- packages/cli-core/src/lib/auth-server.ts | 7 ++++++- packages/cli-core/src/lib/dotenv.ts | 8 +++++--- packages/cli-core/src/lib/help.ts | 11 ++++++----- packages/cli-core/src/lib/spinner.ts | 2 +- 7 files changed, 30 insertions(+), 15 deletions(-) diff --git a/packages/cli-core/src/commands/init/frameworks/react-router.ts b/packages/cli-core/src/commands/init/frameworks/react-router.ts index 27667aff..e4e5d43a 100644 --- a/packages/cli-core/src/commands/init/frameworks/react-router.ts +++ b/packages/cli-core/src/commands/init/frameworks/react-router.ts @@ -235,7 +235,8 @@ function ensureRouteImported(source: string): string { const importMatch = source.match( /import\s*\{([^}]*)\}\s*from\s*["']@react-router\/dev\/routes["']/, ); - if (!importMatch || /\broute\b/.test(importMatch[1]!)) return source; + const importedNames = importMatch?.[1]; + if (!importedNames || /\broute\b/.test(importedNames)) return source; return source.replace( /(\bimport\s*\{[^}]*)(\}\s*from\s*["']@react-router\/dev\/routes["'])/, @@ -311,7 +312,7 @@ function injectRouteEntries( const canonicalPattern = /export default \[([^\]]*)\]\s*satisfies\s*RouteConfig\s*;/s; const canonical = source.match(canonicalPattern); if (canonical) { - const innerContent = canonical[1]!.trimEnd(); + const innerContent = (canonical[1] ?? "").trimEnd(); const separator = innerContent.length > 0 && !innerContent.endsWith(",") ? "," : ""; const newInner = `${innerContent}${separator}\n ${newEntries},\n`; return source.replace(canonicalPattern, `export default [${newInner}] satisfies RouteConfig;`); @@ -321,7 +322,7 @@ function injectRouteEntries( const simplePattern = /(export\s+default\s+\[)([\s\S]*?)(\]\s*;)/; const simple = source.match(simplePattern); if (simple) { - const innerContent = simple[2]!.trimEnd(); + const innerContent = (simple[2] ?? "").trimEnd(); const separator = innerContent.length > 0 && !innerContent.endsWith(",") ? "," : ""; const newInner = `${innerContent}${separator}\n ${newEntries},\n`; return source.replace(simplePattern, `$1${newInner}$3`); diff --git a/packages/cli-core/src/commands/init/frameworks/transformations.ts b/packages/cli-core/src/commands/init/frameworks/transformations.ts index 8eff9afb..dda2c970 100644 --- a/packages/cli-core/src/commands/init/frameworks/transformations.ts +++ b/packages/cli-core/src/commands/init/frameworks/transformations.ts @@ -121,7 +121,7 @@ export function wrapBodyWithProvider(content: string, provider: string): string const providerIndent = bodyIndent + " "; const contentIndent = providerIndent + " "; - const trimmedInner = inner.trim(); + const trimmedInner = (inner ?? "").trim(); const reindented = trimmedInner .split("\n") .map((line) => { diff --git a/packages/cli-core/src/commands/init/heuristics.ts b/packages/cli-core/src/commands/init/heuristics.ts index fab992ba..9e2b6a7d 100644 --- a/packages/cli-core/src/commands/init/heuristics.ts +++ b/packages/cli-core/src/commands/init/heuristics.ts @@ -18,9 +18,15 @@ async function runPmInstall( label: string, { fromLockfile = false }: { fromLockfile?: boolean } = {}, ): Promise { - const pmBinary = addCmd.split(" ")[0]!; const manualCmd = `${addCmd} ${packages.join(" ")}`; + // The package manager is detected from lockfiles, which can exist without + // the actual binary being installed (e.g. teammate committed bun.lock, you + // only have npm). Fail fast with a useful message rather than a raw ENOENT. + const pmBinary = addCmd.split(" ")[0]; + if (!pmBinary) { + throw new Error(`Invalid package manager install command: ${addCmd}`); + } if (Bun.which(pmBinary) === null) { const hint = fromLockfile ? ` (detected from lockfile — install ${pmBinary} or switch package managers)` diff --git a/packages/cli-core/src/lib/auth-server.ts b/packages/cli-core/src/lib/auth-server.ts index ec6d8f02..fc855dbe 100644 --- a/packages/cli-core/src/lib/auth-server.ts +++ b/packages/cli-core/src/lib/auth-server.ts @@ -264,8 +264,13 @@ export function startAuthServer(expectedState: string): AuthServerResult { const activeServer = server; log.debug(`auth-server: listening on 127.0.0.1:${activeServer.port} for ${CALLBACK_PATH}`); + const port = server.port; + if (port === undefined) { + throw new Error("Failed to determine auth server port."); + } + return { - port: activeServer.port!, + port, waitForCallback: () => callbackPromise, stop: () => { clearTimeout(timeout); diff --git a/packages/cli-core/src/lib/dotenv.ts b/packages/cli-core/src/lib/dotenv.ts index 2b5d0cb2..8f14b1a2 100644 --- a/packages/cli-core/src/lib/dotenv.ts +++ b/packages/cli-core/src/lib/dotenv.ts @@ -42,8 +42,9 @@ export function parseEnvFile(content: string): EnvLine[] { if (line.trim() === "") return { type: "blank" }; const match = line.match(ENTRY_RE); if (!match) return { type: "comment", raw: line }; - const key = match[2]!; - let value = match[3]!; + const key = match[2]; + if (!key) return { type: "comment", raw: line }; + let value = match[3] ?? ""; // Strip surrounding quotes if ( (value.startsWith('"') && value.endsWith('"')) || @@ -59,7 +60,8 @@ export function mergeEnvVars(lines: EnvLine[], vars: Record): En const remaining = { ...vars }; const result = lines.map((line): EnvLine => { if (line.type !== "entry" || !(line.key in remaining)) return line; - const value = remaining[line.key]!; + const value = remaining[line.key]; + if (value === undefined) return line; delete remaining[line.key]; return { type: "entry", key: line.key, value, raw: `${line.key}=${value}` }; }); diff --git a/packages/cli-core/src/lib/help.ts b/packages/cli-core/src/lib/help.ts index ff4cb0c0..db984818 100644 --- a/packages/cli-core/src/lib/help.ts +++ b/packages/cli-core/src/lib/help.ts @@ -102,14 +102,15 @@ export function clerkHelpConfig(): Partial { c.argsStr ? c.name.padEnd(maxNameLen + 2) + c.argsStr : c.name, ); const termWidth = Math.max(...terms.map((t) => helper.displayWidth(t))); - const items = terms.map((term, i) => - helper.formatItem( + const items = terms.map((term, i) => { + const description = cmdData[i]?.description ?? ""; + return helper.formatItem( helper.styleSubcommandTerm(term), termWidth, - helper.styleSubcommandDescription(cmdData[i]!.description), + helper.styleSubcommandDescription(description), helper, - ), - ); + ); + }); output = output.concat(helper.formatItemList("Commands:", items, helper)); } diff --git a/packages/cli-core/src/lib/spinner.ts b/packages/cli-core/src/lib/spinner.ts index d3bebfdc..5d65dd53 100644 --- a/packages/cli-core/src/lib/spinner.ts +++ b/packages/cli-core/src/lib/spinner.ts @@ -62,7 +62,7 @@ function createSpinner() { } stream.write("\x1b[?25l"); // hide cursor timer = setInterval(() => { - const char = cyan(FRAMES[frame++ % FRAMES.length]!); + const char = cyan(FRAMES[frame++ % FRAMES.length] ?? FRAMES[0]!); stream.write(`\r\x1b[K${char} ${message}`); }, INTERVAL); }, From 652b39013476065700c53886fa45853122a195c1 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:15:53 -0300 Subject: [PATCH 03/11] test: align cli-core tests with TypeScript 6 --- packages/cli-core/src/commands/api/index.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli-core/src/commands/api/index.test.ts b/packages/cli-core/src/commands/api/index.test.ts index d66b3613..4102d656 100644 --- a/packages/cli-core/src/commands/api/index.test.ts +++ b/packages/cli-core/src/commands/api/index.test.ts @@ -11,6 +11,7 @@ import { promptsStubs, stubFetch, } from "../../test/lib/stubs.ts"; +import { getPlapiBaseUrl } from "../../lib/environment.ts"; let mockStoredToken: string | null = null; mock.module("../../lib/credential-store.ts", () => ({ @@ -460,8 +461,7 @@ describe("api command", () => { }); await runApi("/v1/platform/applications", { platform: true }); - expect(capturedUrl).toContain("api.clerk.com"); - expect(capturedUrl).not.toContain("api.clerk.dev"); + expect(capturedUrl).toStartWith(`${getPlapiBaseUrl()}/`); expect(capturedHeaders?.get("Authorization")).toBe("Bearer plat_key_123"); }); From fc49ec8ed69a4f35b0c01b8d8672d65d45903004 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:16:15 -0300 Subject: [PATCH 04/11] chore: upgrade e2e fixtures to TypeScript 6 --- test/e2e/fixtures/nextjs-app-router-next14/package.json | 2 +- test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json | 1 + test/e2e/fixtures/nextjs-app-router/package.json | 2 +- test/e2e/fixtures/nextjs-pages-router/package.json | 2 +- test/e2e/fixtures/react-router/package.json | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/e2e/fixtures/nextjs-app-router-next14/package.json b/test/e2e/fixtures/nextjs-app-router-next14/package.json index d3732db8..7759b972 100644 --- a/test/e2e/fixtures/nextjs-app-router-next14/package.json +++ b/test/e2e/fixtures/nextjs-app-router-next14/package.json @@ -15,7 +15,7 @@ "@clerk/nextjs": "latest" }, "devDependencies": { - "typescript": "5.9.3", + "typescript": "^6", "@types/node": "20.19.41", "@types/react": "18.3.28", "@types/react-dom": "18.3.7" diff --git a/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json b/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json index e7ff90fd..e5b8b1b5 100644 --- a/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json +++ b/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json @@ -4,6 +4,7 @@ "allowJs": true, "skipLibCheck": true, "strict": true, + "noUncheckedSideEffectImports": false, "noEmit": true, "esModuleInterop": true, "module": "esnext", diff --git a/test/e2e/fixtures/nextjs-app-router/package.json b/test/e2e/fixtures/nextjs-app-router/package.json index 5237b842..1e846f12 100644 --- a/test/e2e/fixtures/nextjs-app-router/package.json +++ b/test/e2e/fixtures/nextjs-app-router/package.json @@ -17,6 +17,6 @@ "@types/node": "20.19.41", "@types/react": "19.2.14", "@types/react-dom": "19.2.3", - "typescript": "5.9.3" + "typescript": "^6" } } diff --git a/test/e2e/fixtures/nextjs-pages-router/package.json b/test/e2e/fixtures/nextjs-pages-router/package.json index 7179896d..a53119e6 100644 --- a/test/e2e/fixtures/nextjs-pages-router/package.json +++ b/test/e2e/fixtures/nextjs-pages-router/package.json @@ -17,6 +17,6 @@ "@types/node": "20.19.41", "@types/react": "19.2.14", "@types/react-dom": "19.2.3", - "typescript": "5.9.3" + "typescript": "^6" } } diff --git a/test/e2e/fixtures/react-router/package.json b/test/e2e/fixtures/react-router/package.json index a380883c..34d5280b 100644 --- a/test/e2e/fixtures/react-router/package.json +++ b/test/e2e/fixtures/react-router/package.json @@ -24,7 +24,7 @@ "@types/react": "19.2.14", "@types/react-dom": "19.2.3", "tailwindcss": "4.3.0", - "typescript": "5.9.3", + "typescript": "^6", "vite": "8.0.13" } } From 5a918d0dbcc41cca68ccd86e916817fc7480fa2b Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Fri, 24 Apr 2026 09:25:49 -0300 Subject: [PATCH 05/11] fix: address review feedback for TypeScript 6 upgrade - Remove duplicate `types` key in root and cli-core tsconfig.json (rebase artifact) - Remove duplicate `typecheck` script key in root package.json (rebase artifact) - Remove unnecessary `noUncheckedSideEffectImports: false` from next14 fixture - Add patch changeset for the TypeScript 6 upgrade - Regenerate bun.lock after rebase --- .changeset/typescript-6-upgrade.md | 5 +++++ packages/cli-core/tsconfig.json | 1 - test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json | 1 - tsconfig.json | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .changeset/typescript-6-upgrade.md diff --git a/.changeset/typescript-6-upgrade.md b/.changeset/typescript-6-upgrade.md new file mode 100644 index 00000000..e2333c1f --- /dev/null +++ b/.changeset/typescript-6-upgrade.md @@ -0,0 +1,5 @@ +--- +"clerk": patch +--- + +Upgrade workspace and e2e fixtures to TypeScript 6 diff --git a/packages/cli-core/tsconfig.json b/packages/cli-core/tsconfig.json index e73b39d8..ed9a1874 100644 --- a/packages/cli-core/tsconfig.json +++ b/packages/cli-core/tsconfig.json @@ -8,7 +8,6 @@ "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, - "types": ["bun"], // Bundler mode "moduleResolution": "bundler", diff --git a/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json b/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json index e5b8b1b5..e7ff90fd 100644 --- a/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json +++ b/test/e2e/fixtures/nextjs-app-router-next14/tsconfig.json @@ -4,7 +4,6 @@ "allowJs": true, "skipLibCheck": true, "strict": true, - "noUncheckedSideEffectImports": false, "noEmit": true, "esModuleInterop": true, "module": "esnext", diff --git a/tsconfig.json b/tsconfig.json index a92b47bf..f0c97eeb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,6 @@ "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, - "types": ["bun"], // Bundler mode "moduleResolution": "bundler", From 6a26086b3aec48ac72f67a8e8debfa14f4ed3e67 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sat, 25 Apr 2026 09:18:23 -0300 Subject: [PATCH 06/11] fix: correct FAKE_CTX envFile for React and changeset package name - Fix FAKE_CTX framework.envFile from ".env" to ".env.local" to match the canonical React FrameworkInfo definition - Fix changeset to target @clerk/cli-core (the package where TS6 changes live) instead of the wrapper clerk package --- .changeset/typescript-6-upgrade.md | 2 +- packages/cli-core/src/commands/init/index.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/typescript-6-upgrade.md b/.changeset/typescript-6-upgrade.md index e2333c1f..05a6407c 100644 --- a/.changeset/typescript-6-upgrade.md +++ b/.changeset/typescript-6-upgrade.md @@ -1,5 +1,5 @@ --- -"clerk": patch +"@clerk/cli-core": patch --- Upgrade workspace and e2e fixtures to TypeScript 6 diff --git a/packages/cli-core/src/commands/init/index.test.ts b/packages/cli-core/src/commands/init/index.test.ts index a109145c..958c4d59 100644 --- a/packages/cli-core/src/commands/init/index.test.ts +++ b/packages/cli-core/src/commands/init/index.test.ts @@ -29,14 +29,14 @@ const FAKE_CTX = { name: "React", sdk: "@clerk/react", envVar: "VITE_CLERK_PUBLISHABLE_KEY", - envFile: ".env" as const, + envFile: ".env.local" as const, }, typescript: true, srcDir: false, packageManager: "npm" as const, existingClerk: true, deps: { react: "^19.0.0" }, - envFile: ".env", + envFile: ".env.local", }; const FAKE_BOOTSTRAP = { From 8e2147ad4b16bc6afbafc236bce1366b1da3cc5b Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sun, 26 Apr 2026 09:16:43 -0300 Subject: [PATCH 07/11] fix(e2e): add CSS module declaration for Next 14 fixture TypeScript 6 enables noUncheckedSideEffectImports by default, which causes `import "./globals.css"` to fail without a type declaration. Add a css.d.ts file to declare the module, matching what Next.js 16 provides built-in. --- test/e2e/fixtures/nextjs-app-router-next14/css.d.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/e2e/fixtures/nextjs-app-router-next14/css.d.ts diff --git a/test/e2e/fixtures/nextjs-app-router-next14/css.d.ts b/test/e2e/fixtures/nextjs-app-router-next14/css.d.ts new file mode 100644 index 00000000..ef6d741f --- /dev/null +++ b/test/e2e/fixtures/nextjs-app-router-next14/css.d.ts @@ -0,0 +1 @@ +declare module "*.css" {} From 2561dc03d2c21b6dd492d6bb5934d19c93729377 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sat, 2 May 2026 09:15:58 -0300 Subject: [PATCH 08/11] fix(test): use correct envFile in FAKE_CTX for all framework tests The top-level envFile in makeCtx/FAKE_CTX should match the canonical FRAMEWORK_MAP value (.env.local) for React, React Router, Vue, and TanStack Start frameworks. Also update the init/index.test.ts pull expectations and vue.test.ts env file action paths accordingly. --- .../src/commands/init/frameworks/react-router.test.ts | 2 +- .../cli-core/src/commands/init/frameworks/react.test.ts | 2 +- .../src/commands/init/frameworks/tanstack-start.test.ts | 2 +- packages/cli-core/src/commands/init/frameworks/vue.test.ts | 6 +++--- packages/cli-core/src/commands/init/index.test.ts | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/cli-core/src/commands/init/frameworks/react-router.test.ts b/packages/cli-core/src/commands/init/frameworks/react-router.test.ts index c97234cc..054db146 100644 --- a/packages/cli-core/src/commands/init/frameworks/react-router.test.ts +++ b/packages/cli-core/src/commands/init/frameworks/react-router.test.ts @@ -22,7 +22,7 @@ function makeCtx(overrides?: Partial): ProjectContext { packageManager: "npm", existingClerk: false, deps: { "react-router": "7.0.0" }, - envFile: ".env", + envFile: ".env.local", ...overrides, }; } diff --git a/packages/cli-core/src/commands/init/frameworks/react.test.ts b/packages/cli-core/src/commands/init/frameworks/react.test.ts index c0d82578..5b268fee 100644 --- a/packages/cli-core/src/commands/init/frameworks/react.test.ts +++ b/packages/cli-core/src/commands/init/frameworks/react.test.ts @@ -22,7 +22,7 @@ function makeCtx(overrides?: Partial): ProjectContext { packageManager: "npm", existingClerk: false, deps: {}, - envFile: ".env", + envFile: ".env.local", ...overrides, }; } diff --git a/packages/cli-core/src/commands/init/frameworks/tanstack-start.test.ts b/packages/cli-core/src/commands/init/frameworks/tanstack-start.test.ts index d3c384ee..069f3f08 100644 --- a/packages/cli-core/src/commands/init/frameworks/tanstack-start.test.ts +++ b/packages/cli-core/src/commands/init/frameworks/tanstack-start.test.ts @@ -22,7 +22,7 @@ function makeCtx(overrides?: Partial): ProjectContext { packageManager: "npm", existingClerk: false, deps: { "@tanstack/react-start": "1.0.0" }, - envFile: ".env", + envFile: ".env.local", ...overrides, }; } diff --git a/packages/cli-core/src/commands/init/frameworks/vue.test.ts b/packages/cli-core/src/commands/init/frameworks/vue.test.ts index 4bba889f..7476a3f6 100644 --- a/packages/cli-core/src/commands/init/frameworks/vue.test.ts +++ b/packages/cli-core/src/commands/init/frameworks/vue.test.ts @@ -22,7 +22,7 @@ function makeCtx(overrides?: Partial): ProjectContext { packageManager: "npm", existingClerk: false, deps: {}, - envFile: ".env", + envFile: ".env.local", ...overrides, }; } @@ -149,7 +149,7 @@ test("creates entry file when none exists", async () => { // Auth pages and env should still be scaffolded expect(findAction(plan.actions, "src/views/sign-in.vue").type).toBe("create"); expect(findAction(plan.actions, "src/views/sign-up.vue").type).toBe("create"); - expect(findAction(plan.actions, ".env").type).toBe("modify"); + expect(findAction(plan.actions, ".env.local").type).toBe("modify"); // No post-instruction about entry file since it was created expect(plan.postInstructions.some((i) => i.includes("@clerk/vue"))).toBe(false); @@ -205,7 +205,7 @@ test("skips auth pages when they already exist", async () => { test("scaffolds env vars with VITE_ prefix", async () => { const plan = await vue.scaffold(makeCtx()); - const envAction = findAction(plan.actions, ".env"); + const envAction = findAction(plan.actions, ".env.local"); expect(envAction.type).toBe("modify"); if (envAction.type === "modify") { expect(envAction.content).toContain("VITE_CLERK_SIGN_IN_URL"); diff --git a/packages/cli-core/src/commands/init/index.test.ts b/packages/cli-core/src/commands/init/index.test.ts index 958c4d59..458fa014 100644 --- a/packages/cli-core/src/commands/init/index.test.ts +++ b/packages/cli-core/src/commands/init/index.test.ts @@ -463,7 +463,7 @@ describe("init", () => { cwd: KEYLESS_CTX.cwd, createIfMissing: expect.any(String), }); - expect(pullMod.pull).toHaveBeenCalledWith({ file: ".env", cwd: KEYLESS_CTX.cwd }); + expect(pullMod.pull).toHaveBeenCalledWith({ file: ".env.local", cwd: KEYLESS_CTX.cwd }); }); test("agent mode with keyless framework uses linked profile as a real app target", async () => { @@ -478,7 +478,7 @@ describe("init", () => { expect(heuristics.printKeylessInfo).not.toHaveBeenCalled(); expect(linkMod.link).not.toHaveBeenCalled(); - expect(pullMod.pull).toHaveBeenCalledWith({ file: ".env", cwd: KEYLESS_CTX.cwd }); + expect(pullMod.pull).toHaveBeenCalledWith({ file: ".env.local", cwd: KEYLESS_CTX.cwd }); }); test("agent mode with keyless framework and --app uses real app flow", async () => { @@ -495,7 +495,7 @@ describe("init", () => { cwd: KEYLESS_CTX.cwd, createIfMissing: expect.any(String), }); - expect(pullMod.pull).toHaveBeenCalledWith({ file: ".env", cwd: KEYLESS_CTX.cwd }); + expect(pullMod.pull).toHaveBeenCalledWith({ file: ".env.local", cwd: KEYLESS_CTX.cwd }); }); test("agent mode with non-keyless framework and no app target prints manual setup", async () => { From 95d8a313de0272545cd17192b3524d1b0653fa94 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sat, 9 May 2026 09:16:58 -0300 Subject: [PATCH 09/11] fix: type FRAMES as const to remove non-null assertion in spinner Address review nit: use `as const` on the FRAMES array so TypeScript knows it is a non-empty tuple, removing the need for the `!` non-null assertion on the fallback access. --- packages/cli-core/src/lib/spinner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli-core/src/lib/spinner.ts b/packages/cli-core/src/lib/spinner.ts index 5d65dd53..4823a4b4 100644 --- a/packages/cli-core/src/lib/spinner.ts +++ b/packages/cli-core/src/lib/spinner.ts @@ -2,7 +2,7 @@ import { isHuman } from "../mode.ts"; import { dim, cyan, green, red } from "./color.ts"; import { pushPrefix, popPrefix } from "./log.ts"; -const FRAMES = ["◒", "◐", "◓", "◑"]; +const FRAMES = ["◒", "◐", "◓", "◑"] as const; const INTERVAL = 80; const S_BAR = "│"; @@ -62,7 +62,7 @@ function createSpinner() { } stream.write("\x1b[?25l"); // hide cursor timer = setInterval(() => { - const char = cyan(FRAMES[frame++ % FRAMES.length] ?? FRAMES[0]!); + const char = cyan(FRAMES[frame++ % FRAMES.length] ?? FRAMES[0]); stream.write(`\r\x1b[K${char} ${message}`); }, INTERVAL); }, From e3232e9f575226bbd3a911c4db9bf7f5a6dffcab Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 14 May 2026 09:17:39 -0300 Subject: [PATCH 10/11] fix: tighten ProjectContext.envFile to EnvFileName literal union Export EnvFileName type from dotenv.ts (derived from ENV_FILE_CANDIDATES) and use it for ProjectContext.envFile and findExistingEnvFile's return type. This replaces the loose `string` type with the precise literal union, matching the review feedback on m4. --- packages/cli-core/src/commands/init/frameworks/types.ts | 3 ++- packages/cli-core/src/commands/init/index.test.ts | 6 +++--- packages/cli-core/src/lib/dotenv.ts | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/cli-core/src/commands/init/frameworks/types.ts b/packages/cli-core/src/commands/init/frameworks/types.ts index b9e0c460..4f74b113 100644 --- a/packages/cli-core/src/commands/init/frameworks/types.ts +++ b/packages/cli-core/src/commands/init/frameworks/types.ts @@ -1,3 +1,4 @@ +import type { EnvFileName } from "../../../lib/dotenv.js"; import type { FrameworkInfo } from "../../../lib/framework.js"; import type { PackageManager } from "../../../lib/package-manager.js"; @@ -9,7 +10,7 @@ export interface ProjectContext { packageManager: PackageManager; existingClerk: boolean; deps: Record; - envFile: string; + envFile: EnvFileName; /** Framework-specific variant (e.g., "app-router" | "pages-router"). Populated by enrichContext. */ variant?: "app-router" | "pages-router" | null; /** Path to the layout/entry file. Populated by enrichContext. */ diff --git a/packages/cli-core/src/commands/init/index.test.ts b/packages/cli-core/src/commands/init/index.test.ts index 458fa014..a63596d4 100644 --- a/packages/cli-core/src/commands/init/index.test.ts +++ b/packages/cli-core/src/commands/init/index.test.ts @@ -36,7 +36,7 @@ const FAKE_CTX = { packageManager: "npm" as const, existingClerk: true, deps: { react: "^19.0.0" }, - envFile: ".env.local", + envFile: ".env.local" as const, }; const FAKE_BOOTSTRAP = { @@ -511,7 +511,7 @@ describe("init", () => { envVar: "VITE_CLERK_PUBLISHABLE_KEY", envFile: ".env.local" as const, }, - envFile: ".env.local", + envFile: ".env.local" as const, }; spyOn(context, "gatherContext").mockResolvedValue(noKeylessCtx); spyOn(scaffoldMod, "scaffold").mockResolvedValue({ @@ -922,7 +922,7 @@ describe("init", () => { packageManager: "npm" as const, existingClerk: false, deps: { next: "15.0.0" }, - envFile: ".env.local", + envFile: ".env.local" as const, }; gatherContextSpy.mockResolvedValue(mockCtx); diff --git a/packages/cli-core/src/lib/dotenv.ts b/packages/cli-core/src/lib/dotenv.ts index 8f14b1a2..3778ab5d 100644 --- a/packages/cli-core/src/lib/dotenv.ts +++ b/packages/cli-core/src/lib/dotenv.ts @@ -17,11 +17,16 @@ export const ENV_FILE_CANDIDATES = [ ".env", ] as const; +export type EnvFileName = (typeof ENV_FILE_CANDIDATES)[number]; + /** * Returns the first candidate from ENV_FILE_CANDIDATES that exists on disk, * or `fallback` if none do. */ -export async function findExistingEnvFile(cwd: string, fallback: string): Promise { +export async function findExistingEnvFile( + cwd: string, + fallback: EnvFileName, +): Promise { for (const candidate of ENV_FILE_CANDIDATES) { if (await Bun.file(join(cwd, candidate)).exists()) return candidate; } From e8eb3cd7e7571607e9b572bb744d1a2f1e3ab452 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sat, 16 May 2026 09:16:01 -0300 Subject: [PATCH 11/11] fix(e2e): regenerate fixture lock files for TypeScript 6 The package-lock.json files in 4 E2E fixtures still had typescript@5.9.3 locked while their package.json specified "^6", causing `npm ci` to fail with EUSAGE during CI E2E test setup. --- .../nextjs-app-router-next14/package-lock.json | 8 ++++---- test/e2e/fixtures/nextjs-app-router/package-lock.json | 8 ++++---- .../e2e/fixtures/nextjs-pages-router/package-lock.json | 8 ++++---- test/e2e/fixtures/react-router/package-lock.json | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/e2e/fixtures/nextjs-app-router-next14/package-lock.json b/test/e2e/fixtures/nextjs-app-router-next14/package-lock.json index e0529d6e..fe7ec9f3 100644 --- a/test/e2e/fixtures/nextjs-app-router-next14/package-lock.json +++ b/test/e2e/fixtures/nextjs-app-router-next14/package-lock.json @@ -17,7 +17,7 @@ "@types/node": "20.19.41", "@types/react": "18.3.28", "@types/react-dom": "18.3.7", - "typescript": "5.9.3" + "typescript": "^6" } }, "node_modules/@clerk/backend": { @@ -636,9 +636,9 @@ "license": "0BSD" }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/test/e2e/fixtures/nextjs-app-router/package-lock.json b/test/e2e/fixtures/nextjs-app-router/package-lock.json index 6523c7fc..cc8bcf08 100644 --- a/test/e2e/fixtures/nextjs-app-router/package-lock.json +++ b/test/e2e/fixtures/nextjs-app-router/package-lock.json @@ -17,7 +17,7 @@ "@types/node": "20.19.41", "@types/react": "19.2.14", "@types/react-dom": "19.2.3", - "typescript": "5.9.3" + "typescript": "^6" } }, "node_modules/@clerk/backend": { @@ -1162,9 +1162,9 @@ "license": "0BSD" }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/test/e2e/fixtures/nextjs-pages-router/package-lock.json b/test/e2e/fixtures/nextjs-pages-router/package-lock.json index 8c29380b..d7cbc4b1 100644 --- a/test/e2e/fixtures/nextjs-pages-router/package-lock.json +++ b/test/e2e/fixtures/nextjs-pages-router/package-lock.json @@ -17,7 +17,7 @@ "@types/node": "20.19.41", "@types/react": "19.2.14", "@types/react-dom": "19.2.3", - "typescript": "5.9.3" + "typescript": "^6" } }, "node_modules/@clerk/backend": { @@ -1162,9 +1162,9 @@ "license": "0BSD" }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/test/e2e/fixtures/react-router/package-lock.json b/test/e2e/fixtures/react-router/package-lock.json index 3ae7d85e..4055c960 100644 --- a/test/e2e/fixtures/react-router/package-lock.json +++ b/test/e2e/fixtures/react-router/package-lock.json @@ -21,7 +21,7 @@ "@types/react": "19.2.14", "@types/react-dom": "19.2.3", "tailwindcss": "4.3.0", - "typescript": "5.9.3", + "typescript": "^6", "vite": "8.0.13" } }, @@ -4450,10 +4450,10 @@ } }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc",