From ad4bbf445930fb1071abed653e2456208676b3ae Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:15:26 -0300 Subject: [PATCH 01/10] build: upgrade workspace to TypeScript 6.0.2 --- bun.lock | 28 +++++++++++++++++----------- 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, 25 insertions(+), 16 deletions(-) diff --git a/bun.lock b/bun.lock index a9beb360..b317e9b2 100644 --- a/bun.lock +++ b/bun.lock @@ -19,7 +19,7 @@ }, "packages/cli": { "name": "clerk", - "version": "1.4.0", + "version": "1.5.0", "bin": { "clerk": "./bin/clerk", }, @@ -64,7 +64,7 @@ "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], - "@babel/parser": ["@babel/parser@7.29.3", "", { "dependencies": { "@babel/types": "^7.29.0" }, "bin": "./bin/babel-parser.js" }, "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA=="], + "@babel/parser": ["@babel/parser@7.29.7", "", { "dependencies": { "@babel/types": "^7.29.7" }, "bin": "./bin/babel-parser.js" }, "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg=="], "@babel/runtime": ["@babel/runtime@7.29.2", "", {}, "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g=="], @@ -104,19 +104,19 @@ "@changesets/write": ["@changesets/write@0.4.0", "", { "dependencies": { "@changesets/types": "^6.1.0", "fs-extra": "^7.0.1", "human-id": "^4.1.1", "prettier": "^2.7.1" } }, "sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q=="], - "@clack/core": ["@clack/core@1.3.1", "", { "dependencies": { "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-fT1qHVGAag4IEkrupZ6lRRbNCs1vS9P01KB/sG8zKgvUztbYtFBtQpjSITNwooDZ83tpsPzP0mRNs1/KVszCRA=="], + "@clack/core": ["@clack/core@1.4.1", "", { "dependencies": { "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-FILJa1gGKEFTGZAJE9RpVhrjKz3c3h4ar60dSv6cGuDqufQ84YEIS3GAGvZiN+H6yaLbbvTFNejjCC4tXpZEuw=="], - "@clack/prompts": ["@clack/prompts@1.4.0", "", { "dependencies": { "@clack/core": "1.3.1", "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-S0My7XPGIgpRWMDG8uRqalbgT+a6FmCUdOW+HaIOVVpUPHOb7RrpvjTjiODadKp06fsrVDJZlIzc6yCTp4AnxA=="], + "@clack/prompts": ["@clack/prompts@1.5.1", "", { "dependencies": { "@clack/core": "1.4.1", "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" } }, "sha512-zccHj2z2oCCO4yrDiRSlFOxWerGqRiysP7a5jPK6uoI9URKAquwY42Dd/iUP8JWHxEzdRe4TlbvZCo8z1/mhrw=="], - "@clerk/backend": ["@clerk/backend@3.4.13", "", { "dependencies": { "@clerk/shared": "^4.13.1", "standardwebhooks": "^1.0.0", "tslib": "2.8.1" } }, "sha512-3BABnKE1YZpQqJ/S8QD5FpzE7jq+mgaMrO7rLiWTI8Bfs/xk11XYSp1lMEf3BTo/rzEtaUsXaVDGvccYogKapg=="], + "@clerk/backend": ["@clerk/backend@3.5.0", "", { "dependencies": { "@clerk/shared": "^4.15.0", "standardwebhooks": "^1.0.0", "tslib": "2.8.1" } }, "sha512-g1bjzqj7/mb6rnrQ5zr+ybjpilTIWADaCoHE1HnEAjQfbcdfn3gb9PPX0wJ1KWw8OOQEQYSjzXPzvofEB1j+ww=="], "@clerk/cli-core": ["@clerk/cli-core@workspace:packages/cli-core"], "@clerk/cli-extras": ["@clerk/cli-extras@workspace:packages/extras"], - "@clerk/shared": ["@clerk/shared@4.13.1", "", { "dependencies": { "@tanstack/query-core": "^5.100.6", "dequal": "2.0.3", "glob-to-regexp": "0.4.1", "js-cookie": "3.0.7", "std-env": "^3.9.0" }, "peerDependencies": { "react": "^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0", "react-dom": "^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0" }, "optionalPeers": ["react", "react-dom"] }, "sha512-DyUtvNHgMmqjtTM0q285jKaAXUmCDSyItiGQTt1dNL0M6DZ3bxqsJz7wXPjh9zezmU4BAnLpwhj5gsM3OuNPzA=="], + "@clerk/shared": ["@clerk/shared@4.15.0", "", { "dependencies": { "@tanstack/query-core": "^5.100.6", "dequal": "2.0.3", "glob-to-regexp": "0.4.1", "js-cookie": "3.0.7" }, "peerDependencies": { "react": "^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0", "react-dom": "^18.0.0 || ~19.0.3 || ~19.1.4 || ~19.2.3 || ~19.3.0-0" }, "optionalPeers": ["react", "react-dom"] }, "sha512-uX8nfLb69m8mA6KWKWfuPSwoVNDRyUdufeCeTEZsdZxbRUsEYT/c0KWFN28IOQCtK09tpVtzrUHvW44v5Dc5OA=="], - "@clerk/testing": ["@clerk/testing@2.0.33", "", { "dependencies": { "@clerk/backend": "^3.4.13", "@clerk/shared": "^4.13.1", "dotenv": "17.2.2" }, "peerDependencies": { "@playwright/test": "^1", "cypress": "^13 || ^14" }, "optionalPeers": ["@playwright/test", "cypress"] }, "sha512-a1FXKIkIqKlJbYBwuDmtZOUjUPdh1oJTYzYTKYhDZpiN/CxcHj2fTAVKWE6Oh3yVfDWQRZnOI48KD0uEZHjpxA=="], + "@clerk/testing": ["@clerk/testing@2.0.35", "", { "dependencies": { "@clerk/backend": "^3.5.0", "@clerk/shared": "^4.15.0", "dotenv": "17.2.2" }, "peerDependencies": { "@playwright/test": "^1", "cypress": "^13 || ^14" }, "optionalPeers": ["@playwright/test", "cypress"] }, "sha512-VOSyWnmu2ldcUKboMZHDDNCFEFjXmrnbcrMoFb1kw1yAJejqfvIrVD06MJYiWWW9rWi0fWZWaMjwG7Lbm864YQ=="], "@commander-js/extra-typings": ["@commander-js/extra-typings@14.0.0", "", { "peerDependencies": { "commander": "~14.0.0" } }, "sha512-hIn0ncNaJRLkZrxBIp5AsW/eXEHNKYQBh0aPdoUqNgD+Io3NIykQqpKFyKcuasZhicGaEZJX/JBSIkZ4e5x8Dg=="], @@ -404,7 +404,7 @@ "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - "semver": ["semver@7.8.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg=="], + "semver": ["semver@7.8.0", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], @@ -424,8 +424,6 @@ "standardwebhooks": ["standardwebhooks@1.0.0", "", { "dependencies": { "@stablelib/base64": "^1.0.0", "fast-sha256": "^1.3.0" } }, "sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg=="], - "std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="], - "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], "strip-bom": ["strip-bom@3.0.0", "", {}, "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA=="], @@ -440,7 +438,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=="], @@ -450,6 +448,8 @@ "yaml": ["yaml@2.9.0", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA=="], + "@babel/parser/@babel/types": ["@babel/types@7.29.7", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA=="], + "@changesets/apply-release-plan/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], "@changesets/assemble-release-plan/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], @@ -458,6 +458,8 @@ "@changesets/get-dependents-graph/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], + "@clerk/cli-core/semver": ["semver@7.8.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ=="], + "@inquirer/external-editor/chardet": ["chardet@2.1.1", "", {}, "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ=="], "@inquirer/external-editor/iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="], @@ -472,6 +474,10 @@ "read-yaml-file/js-yaml": ["js-yaml@3.14.2", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg=="], + "@babel/parser/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.7", "", {}, "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw=="], + + "@babel/parser/@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], + "read-yaml-file/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="], } } 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 0cea9e0005f59057cc4629c79db16a4e02be72bd Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:15:38 -0300 Subject: [PATCH 02/10] 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 ++++++----- 6 files changed, 29 insertions(+), 14 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 d2780efc..3851f11c 100644 --- a/packages/cli-core/src/lib/help.ts +++ b/packages/cli-core/src/lib/help.ts @@ -108,14 +108,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)); } From 3a8ca30b29ac8583136d6cb9cac0437e61813a6c Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:15:53 -0300 Subject: [PATCH 03/10] 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 e2b59988..17241d6e 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 { libPromptsStubs, stubFetch, } from "../../test/lib/stubs.ts"; +import { getPlapiBaseUrl } from "../../lib/environment.ts"; let mockStoredToken: string | null = null; mock.module("../../lib/credential-store.ts", () => ({ @@ -463,8 +464,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 f69402d897eb8e1c8625f61657622637c85582a3 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 9 Apr 2026 17:16:15 -0300 Subject: [PATCH 04/10] 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 b25db8f6..dfddf8d7 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.29", "@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 44361bc4..c170a22a 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.15", "@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 1cbc48c6..32035297 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.15", "@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 15cece99c9fb231e22810cb49542f47b6c007214 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Fri, 24 Apr 2026 09:25:49 -0300 Subject: [PATCH 05/10] 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 08b15b949a19ddc059a5d749c7876a8ba87f4373 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sat, 25 Apr 2026 09:18:23 -0300 Subject: [PATCH 06/10] 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 330b30e3..5ac84f4d 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 a27479796f854a6a2c3c4eb82d62a3278499bd71 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sun, 26 Apr 2026 09:16:43 -0300 Subject: [PATCH 07/10] 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 82da0c000928cc02cf2688e46aa1df2f5879dcf0 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sat, 2 May 2026 09:15:58 -0300 Subject: [PATCH 08/10] 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 5ac84f4d..5e4f5d45 100644 --- a/packages/cli-core/src/commands/init/index.test.ts +++ b/packages/cli-core/src/commands/init/index.test.ts @@ -459,7 +459,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 () => { @@ -474,7 +474,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 () => { @@ -491,7 +491,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 4870c4106e37b0b919a978112efe873e5b4ad8c0 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Thu, 14 May 2026 09:17:39 -0300 Subject: [PATCH 09/10] 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 5e4f5d45..6f3a3836 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 = { @@ -507,7 +507,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({ @@ -918,7 +918,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 6ac6519518b7b79ce7d3a08e5401ce4687e08592 Mon Sep 17 00:00:00 2001 From: Rafael Thayto Date: Sat, 16 May 2026 09:16:01 -0300 Subject: [PATCH 10/10] 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 0acb8035..65ab2760 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.29", "@types/react-dom": "18.3.7", - "typescript": "5.9.3" + "typescript": "^6" } }, "node_modules/@clerk/backend": { @@ -624,9 +624,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 f8e41555..81c89643 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.15", "@types/react-dom": "19.2.3", - "typescript": "5.9.3" + "typescript": "^6" } }, "node_modules/@clerk/backend": { @@ -1102,9 +1102,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 e1bdf2e8..ae85bd07 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.15", "@types/react-dom": "19.2.3", - "typescript": "5.9.3" + "typescript": "^6" } }, "node_modules/@clerk/backend": { @@ -1102,9 +1102,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",