Skip to content

chore(ts): upgrade monorepo to TypeScript 6.0.3 - #57

Merged
JOY (JOY) merged 1 commit into
devfrom
feat/ts6-upgrade
Sep 1, 2026
Merged

chore(ts): upgrade monorepo to TypeScript 6.0.3#57
JOY (JOY) merged 1 commit into
devfrom
feat/ts6-upgrade

Conversation

@JOY

@JOY JOY (JOY) commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • Upgraded monorepo to TypeScript 6.0.3 across all workspaces (�pps/web, �pps/api/v2, packages/trpc, packages/ui, packages/embeds/, packages/platform/, packages/mcp-server, etc.)
  • Added ignoreDeprecations: 6.0 to root tsconfig base and updated package tsconfigs with explicit rootDir and modern target/lib options.
  • Patched zod-prisma-types with fs.rmSync replacing deprecated fs.rmdirSync.
  • Re-exported PLATFORM_PERMISSION from @calcom/platform-constants resolving circular platform dependencies under stricter TS 6 type resolution.
  • Updated vitest.config.mts and package test exclusions to isolate test suites and prevent .next compile artifacts leakage into Vitest.
  • Verified monorepo turbo type-check (0 errors across 114 packages), Vitest unit tests, and Next.js Turbopack production build.

Test plan

  • Run yarn turbo run type-check -> All 114 packages in scope passed with 0 errors
  • Run yarn vitest run for custom Crove features & MCP tools -> 8 test files, 52 tests passed
  • Run yarn workspace @calcom/web build -> Next.js Turbopack build succeeded with exit code 0

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-check and builds stay green under stricter TS 6 behavior.

Shared tsconfig updates add ignoreDeprecations: "6.0", set explicit rootDir where 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/**; Turbo post-install is uncached and tracks dist/** outputs.

Prisma codegen moves to zod-prisma-types 3.3.11 with a Yarn patch so directory cleanup uses fs.rmSync instead of deprecated recursive rmdirSync. PLATFORM_PERMISSION is defined on @calcom/platform-constants and re-exported from @calcom/platform-types so platform packages type-check without circular import issues.

Reviewed by Cursor Bugbot for commit a4f75a2. Configure here.

Summary by CodeRabbit

  • Chores

    • Upgraded the project’s TypeScript tooling to version 6.0.3 across supported applications and packages.
    • Updated related build and test settings to improve compilation reliability and avoid processing test-only files.
    • Improved generated build output tracking and post-install consistency.
  • Bug Fixes

    • Updated supporting schema-generation tooling and applied a compatibility patch to improve generated types.
  • Refactor

    • Consolidated platform permission type definitions for more consistent type checking.

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.
@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 08e749f1-7d33-4ab9-a97f-e047084c777f

📥 Commits

Reviewing files that changed from the base of the PR and between 335510c and a4f75a2.

⛔ Files ignored due to path filters (2)
  • .yarn/patches/zod-prisma-types-npm-3.3.11.patch is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (38)
  • apps/api/v2/package.json
  • apps/api/v2/tsconfig.json
  • apps/docs/package.json
  • apps/web/package.json
  • apps/web/tsconfig.json
  • example-apps/credential-sync/package.json
  • package.json
  • packages/app-store-cli/package.json
  • packages/app-store-cli/tsconfig.json
  • packages/app-store/package.json
  • packages/app-store/tsconfig.json
  • packages/config/package.json
  • packages/coss-ui/package.json
  • packages/embeds/embed-core/package.json
  • packages/embeds/embed-core/tsconfig.json
  • packages/embeds/embed-react/package.json
  • packages/embeds/embed-react/tsconfig.json
  • packages/embeds/embed-snippet/package.json
  • packages/embeds/embed-snippet/tsconfig.json
  • packages/i18n/package.json
  • packages/lib/package.json
  • packages/mcp-server/package.json
  • packages/mcp-server/tsconfig.json
  • packages/platform/atoms/package.json
  • packages/platform/constants/permissions.ts
  • packages/platform/enums/permissions.ts
  • packages/platform/examples/base/package.json
  • packages/platform/libraries/package.json
  • packages/platform/types/permissions.ts
  • packages/prisma/package.json
  • packages/trpc/package.json
  • packages/trpc/tsconfig.react.json
  • packages/trpc/tsconfig.server.json
  • packages/tsconfig/base.json
  • packages/ui/package.json
  • packages/ui/tsconfig.json
  • turbo.json
  • vitest.config.mts

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

TypeScript 6.0 migration

Layer / File(s) Summary
Dependency and resolution updates
package.json, apps/*/package.json, packages/*/package.json, example-apps/credential-sync/package.json
Development dependencies now use TypeScript 6.0.3. The root configuration pins the local zod-prisma-types patch.
Compiler scope updates
packages/tsconfig/base.json, apps/*/tsconfig.json, packages/*/tsconfig*.json, turbo.json, vitest.config.mts
Compiler configurations add TypeScript 6.0 deprecation handling, root directories, ES2022 and DOM libraries, and broader test exclusions. Post-install outputs and Vitest exclusions also include generated directories.
Permission type re-export
packages/platform/constants/permissions.ts, packages/platform/types/permissions.ts, packages/platform/enums/permissions.ts
PLATFORM_PERMISSION is exported from platform constants and imported or re-exported from that package.

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: ⚪ Minimal · up to a4f75

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: upgrading the monorepo to TypeScript 6.0.3.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ts6-upgrade

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

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.

Suggested change
"include": ["src", "env.d.ts"],
"include": ["src"],

Comment thread turbo.json
Comment on lines +532 to 536
"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"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

@JOY
JOY (JOY) merged commit ba4fc83 into dev Sep 1, 2026
12 checks passed
@JOY
JOY (JOY) deleted the feat/ts6-upgrade branch September 1, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant