From e1def884f397c769ddec60f95b225fb99df409f5 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Tue, 2 Sep 2025 21:51:12 -0300 Subject: [PATCH] perf: fix Turborepo caching for app-store CLI build (#23515) * feat: fix Turborepo caching for app-store CLI build - Fix incorrect output paths from app-store/ to packages/app-store/ - Fix incorrect input paths to match actual file locations - Remove cache: false to enable caching - Add all 11 generated files to outputs array - Add NEXT_PUBLIC_IS_E2E env var for proper cache invalidation - Add specific input patterns to avoid cache invalidation from generated files - Improves local dev experience with cache hits vs ~3.1s cache misses Performance improvement: builds go from ~3.1 seconds (cache miss) to instant cache hits when inputs haven't changed. Co-Authored-By: keith@cal.com * Use new turbo command so it uses cache * Made the output more flexible * Added back a .tsx output * fixed file path * Removed global IS_E2E var that Devin added --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- package.json | 2 +- turbo.json | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 714fcf9b1c..a4b5c9ac35 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ ], "scripts": { "app-store-cli": "yarn workspace @calcom/app-store-cli", - "app-store:build": "yarn app-store-cli build", + "app-store:build": "yarn turbo build --filter=@calcom/app-store-cli", "app-store:watch": "yarn app-store-cli watch", "app-store": "yarn app-store-cli cli", "create-app": "yarn app-store create", diff --git a/turbo.json b/turbo.json index 344481f7fe..6de1629c0a 100644 --- a/turbo.json +++ b/turbo.json @@ -467,9 +467,16 @@ "outputs": ["dist/**", "build/**"] }, "@calcom/app-store-cli#build": { - "cache": false, - "inputs": ["../../app-store/**"], - "outputs": ["../../app-store/apps.server.generated.ts", "../../app-store/apps.browser.generated.tsx"] + "inputs": [ + "../../packages/app-store/**/package.json", + "../../packages/app-store/**/config.json", + "../../packages/app-store/**/api/**", + "../../packages/app-store/**/components/**", + "../../packages/app-store/**/lib/**", + "../../packages/app-store/**/pages/**", + "../../packages/app-store-cli/src/**" + ], + "outputs": ["../../packages/app-store/*.generated.ts", "../../packages/app-store/*.generated.tsx"] }, "@calcom/embed-react#type-check": { "dependsOn": ["@calcom/embed-core#build", "@calcom/embed-snippet#build"],