chore(ts): upgrade monorepo to TypeScript 6.0.3 - #57
Conversation
Upgrade typescript dependency to 6.0.3 across all monorepo workspaces and root package.json. Add ignoreDeprecations 6.0 compilerOption to tsconfig base and update package-level tsconfigs with rootDir and modern lib targets. Patch zod-prisma-types to use fs.rmSync avoiding deprecated fs.rmdirSync. Re-export PLATFORM_PERMISSION from constants avoiding circular enum/types issue. Update vitest.config.mts and tsconfig exclusions to isolate test files from production typechecking. Verify turbo type-check, Vitest unit tests, and Next.js Turbopack production build.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_90dad572-8808-4ab3-9dcd-c6b3538d4a07) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (38)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe repository upgrades development tooling to TypeScript 6.0.3, updates compiler scopes and exclusions, centralizes the platform permission type, and adjusts Prisma post-install and Vitest exclusions. ChangesTypeScript 6.0 migration
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to This TypeScript upgrade is merge-ready after normal checks and review; the reported repository type-check, test, and production build validations passed, with no actionable merge-blocking risk remaining. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (34 skipped: 34 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request upgrades TypeScript to version 6.0.3 across the workspace, updates various tsconfig.json configurations (such as excluding test files and ignoring deprecations), patches zod-prisma-types to support fs.rmSync, and refactors platform permission types. Feedback on the changes highlights a potential TypeScript compiler error in packages/embeds/embed-snippet/tsconfig.json due to a rootDir and include mismatch, as well as redundant inputs and outputs configurations in turbo.json when caching is disabled.
| } | ||
| }, | ||
| "include": ["."], | ||
| "include": ["src", "env.d.ts"], |
There was a problem hiding this comment.
Setting "rootDir": "src" while including "env.d.ts" (which resides at the root, outside of src) can trigger the TypeScript compiler error TS6059: File '.../env.d.ts' is not under 'rootDir' 'src'. To resolve this cleanly, move env.d.ts into the src/ directory (e.g., src/env.d.ts) and update the include array to only target the src folder.
| "include": ["src", "env.d.ts"], | |
| "include": ["src"], |
| "cache": false, | ||
| "dependsOn": [], | ||
| "outputs": ["../../node_modules/@prisma/client/**", "../../node_modules/@prisma/admin-client/**"], | ||
| "outputs": ["dist/**", "../../node_modules/@prisma/client/**", "../../node_modules/@prisma/admin-client/**"], | ||
| "inputs": ["./schema.prisma", "./prisma/schema.prisma"], | ||
| "env": ["PRISMA_GENERATE_DATAPROXY"] |
There was a problem hiding this comment.
When "cache": false is specified for a task in Turborepo, caching is completely disabled. As a result, the "inputs" and "outputs" configurations have no effect and are ignored by Turbo. To keep the configuration clean and avoid confusion, you should either remove the redundant "inputs" and "outputs" fields if you want to always run post-install without caching, or enable caching by setting "cache": true (or removing "cache": false since it defaults to true) if you want Turborepo to cache and restore the generated Prisma client outputs.
Summary
Test plan
Note
Medium Risk
Wide toolchain bump (TS 6 + prisma generator dependency) affects every package’s compile and post-install codegen; runtime behavior is mostly unchanged aside from generator/tooling paths.
Overview
This PR bumps the monorepo from TypeScript 5.9.3 to 6.0.3 and adjusts compiler config so
type-checkand builds stay green under stricter TS 6 behavior.Shared tsconfig updates add
ignoreDeprecations: "6.0", set explicitrootDirwhere needed (e.g. API v2, tRPC declaration builds, embed packages), raise embed targets to ES2022, and exclude test files from several package type-check graphs. Vitest now ignores**/.next/**; Turbopost-installis uncached and tracksdist/**outputs.Prisma codegen moves to
zod-prisma-types3.3.11 with a Yarn patch so directory cleanup usesfs.rmSyncinstead of deprecated recursivermdirSync.PLATFORM_PERMISSIONis defined on@calcom/platform-constantsand re-exported from@calcom/platform-typesso platform packages type-check without circular import issues.Reviewed by Cursor Bugbot for commit a4f75a2. Configure here.
Summary by CodeRabbit
Chores
Bug Fixes
Refactor