-
Notifications
You must be signed in to change notification settings - Fork 12k
refactor: reorganize platform packages with /src folders and fix cyclic dependencies #26143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
c5dbd29
refactor: reorganize platform packages with /src folders and fix cycl…
devin-ai-integration[bot] 03ed6c4
chore: update yarn.lock after removing unused dependency
devin-ai-integration[bot] 645e92b
fix: add exports for deep import paths in platform packages
devin-ai-integration[bot] b2c8957
fix: update relative imports and tsconfig paths for platform packages…
devin-ai-integration[bot] 260623e
fix: add platform-constants and platform-utils as workspace dependencies
devin-ai-integration[bot] f713aae
refactor: upgrade tsconfig target to ES2021 and fix monorepo.ts exports
devin-ai-integration[bot] 53f40bd
fix: use import type for SortOrderType to fix TS1272 error
devin-ai-integration[bot] a65156d
fix: update atoms package import to use @calcom/platform-constants
devin-ai-integration[bot] 19e7a90
fix: add typesVersions for legacy moduleResolution compatibility
devin-ai-integration[bot] 9b0fd48
fix: update Jest transformIgnorePatterns to allow platform packages
devin-ai-integration[bot] b4248a1
fix: add moduleNameMapper for platform packages in Jest config
devin-ai-integration[bot] c1280d5
fix: correct Jest moduleNameMapper paths (3 levels up from apps/api/v2)
devin-ai-integration[bot] 97cc05e
fix: map Jest moduleNameMapper to TypeScript source files instead of …
devin-ai-integration[bot] 9e003b6
fix: remove platform-libraries mapping from Jest to avoid dayjs inter…
devin-ai-integration[bot] 3c59d5e
fix: add traceContext to confirmBookingHandler calls in API v2 bookin…
devin-ai-integration[bot] e72989e
refactor: remove platform package paths from API v2 tsconfig
devin-ai-integration[bot] 1eec8b5
refactor: remove @calcom/prisma/enums path from API v2 tsconfig
devin-ai-integration[bot] 8a5e6b9
fix: add module CommonJS to platform packages for Node.js runtime com…
devin-ai-integration[bot] 5311aae
fix: add postbuild symlink for Swagger plugin path resolution
devin-ai-integration[bot] 92dd398
fix: correct prisma client path in API v2 tsconfig to point to JS files
devin-ai-integration[bot] e161de1
Merge branch 'main' into devin/platform-packages-reorganization-17664…
volnei 4e79f4c
fix: add postbuild symlink for NestJS Swagger plugin path resolution
devin-ai-integration[bot] ed66f25
Merge branch 'devin/platform-packages-reorganization-1766487758' of h…
devin-ai-integration[bot] 02b6b7b
Merge remote-tracking branch 'origin/devin/platform-packages-reorgani…
devin-ai-integration[bot] eadee41
fix: add exports to prisma package.json and remove tsconfig path mapping
devin-ai-integration[bot] c0e5cb2
revert: remove exports from prisma package.json (caused build failures)
devin-ai-integration[bot] 440016a
fix: correct symlink location for NestJS Swagger plugin path resolution
devin-ai-integration[bot] d36c5dd
Merge branch 'main' into devin/platform-packages-reorganization-17664…
volnei 4bcba52
Merge branch 'main' into devin/platform-packages-reorganization-17664…
volnei e64f599
fix: add both symlinks for NestJS Swagger plugin path resolution
devin-ai-integration[bot] e0c1b0c
fix: simplify postbuild to single symlink at dist/packages
devin-ai-integration[bot] 4e48edc
debug: add filesystem state logging to generate-swagger script
devin-ai-integration[bot] 221ddcb
debug: add targeted test for prisma/client module resolution in CI
devin-ai-integration[bot] 21eb09b
fix: add CommonJS shim for prisma/client to fix E2E API v2 test
devin-ai-integration[bot] 5293277
Revert "fix: add CommonJS shim for prisma/client to fix E2E API v2 test"
devin-ai-integration[bot] 893fdea
fix: wrap postbuild for loop in bash -c for Yarn Berry compatibility
devin-ai-integration[bot] 33a5d3e
Merge branch 'main' into devin/platform-packages-reorganization-17664…
devin-ai-integration[bot] 5d948be
Merge branch 'main' into devin/platform-packages-reorganization-17664…
volnei 896ba8c
fix: correct export paths in platform packages to match actual dist o…
devin-ai-integration[bot] 47f06d2
fix: revert incorrect export paths - dist/src/ is correct for TypeScr…
devin-ai-integration[bot] 9980c52
fix: add platform packages as dependencies for type-check task
devin-ai-integration[bot] 1cd4879
fix: update permissions test import path after src folder reorganization
devin-ai-integration[bot] b4ddfe1
Merge branch 'main' into devin/platform-packages-reorganization-17664…
devin-ai-integration[bot] 71749cd
Revert "Merge branch 'main' into devin/platform-packages-reorganizati…
keithwillcode 7105f14
Merge branch 'main' into devin/platform-packages-reorganization-17664…
devin-ai-integration[bot] ebaf111
Merge branch 'main' into devin/platform-packages-reorganization-17664…
devin-ai-integration[bot] 44cf71b
fix: resolve CI failures in type-check, atoms build, and API v2 break…
devin-ai-integration[bot] dd713a7
fix: add @calcom/platform-libraries to web deps and create prisma/enu…
devin-ai-integration[bot] 9e2cc2d
fix: use sed for prisma/enums CJS shim and restore tsconfig path alias
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| export * from "./api"; | ||
| export * from "./apps"; | ||
| export * from "./permissions"; | ||
| export * from "./src/api"; | ||
| export * from "./src/apps"; | ||
| export * from "./src/permissions"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,41 @@ | |
| "main": "./dist/index.js", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The Prompt for AI agents |
||
| "types": "./dist/index.d.ts", | ||
| "private": true, | ||
| "exports": { | ||
| ".": { | ||
| "require": "./dist/index.js", | ||
| "import": "./dist/index.js", | ||
| "types": "./dist/index.d.ts" | ||
| }, | ||
| "./permissions": { | ||
| "require": "./dist/src/permissions.js", | ||
| "import": "./dist/src/permissions.js", | ||
| "types": "./dist/src/permissions.d.ts" | ||
| }, | ||
| "./apps": { | ||
| "require": "./dist/src/apps.js", | ||
| "import": "./dist/src/apps.js", | ||
| "types": "./dist/src/apps.d.ts" | ||
| }, | ||
| "./api": { | ||
| "require": "./dist/src/api.js", | ||
| "import": "./dist/src/api.js", | ||
| "types": "./dist/src/api.d.ts" | ||
| } | ||
| }, | ||
| "typesVersions": { | ||
| "*": { | ||
| "permissions": [ | ||
| "./dist/src/permissions.d.ts" | ||
| ], | ||
| "apps": [ | ||
| "./dist/src/apps.d.ts" | ||
| ], | ||
| "api": [ | ||
| "./dist/src/api.d.ts" | ||
| ] | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "build": "tsc --build --force tsconfig.json", | ||
| "build:watch": "tsc --build --force ./tsconfig.json --watch", | ||
|
|
||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| { | ||
| "extends": "@calcom/tsconfig/base.json", | ||
| "compilerOptions": { | ||
| "target": "ES5", | ||
| "target": "ES2021", | ||
| "module": "CommonJS", | ||
| "resolveJsonModule": true, | ||
| "baseUrl": "./", | ||
| "outDir": "./dist" | ||
| }, | ||
| "include": ["."], | ||
| "include": ["src", "index.ts"], | ||
| "exclude": ["dist", "**/node_modules/**"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| export * from "./event-types/booking-window.enum"; | ||
| export * from "./event-types/editable"; | ||
| export * from "./event-types/field-type"; | ||
| export * from "./event-types/interval-limits.enum"; | ||
| export * from "./event-types/period-type"; | ||
| export * from "./event-types/scheduling-type"; | ||
| export * from "./event-types/frequency"; | ||
| export * from "./event-types/booker-layouts.enum"; | ||
| export * from "./event-types/confirmation-policy.enum"; | ||
| export * from "./slot-format.enum"; | ||
| export * from "./src/event-types/booking-window.enum"; | ||
| export * from "./src/event-types/editable"; | ||
| export * from "./src/event-types/field-type"; | ||
| export * from "./src/event-types/interval-limits.enum"; | ||
| export * from "./src/event-types/period-type"; | ||
| export * from "./src/event-types/scheduling-type"; | ||
| export * from "./src/event-types/frequency"; | ||
| export * from "./src/event-types/booker-layouts.enum"; | ||
| export * from "./src/event-types/confirmation-policy.enum"; | ||
| export * from "./src/slot-format.enum"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,2 @@ | ||
| export * from "./event-types/booking-window.enum"; | ||
| export * from "./event-types/editable"; | ||
| export * from "./event-types/field-type"; | ||
| export * from "./event-types/interval-limits.enum"; | ||
| export * from "./event-types/period-type"; | ||
| export * from "./event-types/scheduling-type"; | ||
| export * from "./event-types/frequency"; | ||
| export * from "./event-types/booker-layouts.enum"; | ||
| export * from "./event-types/confirmation-policy.enum"; | ||
| // Re-export everything from index to avoid divergence | ||
| export * from "./index"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions
10
packages/platform/enums/permissions.ts → packages/platform/enums/src/permissions.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,13 @@ | ||
| { | ||
| "extends": "@calcom/tsconfig/base.json", | ||
| "compilerOptions": { | ||
| "target": "ES5", | ||
| "target": "ES2021", | ||
| "module": "CommonJS", | ||
| "resolveJsonModule": true, | ||
| "experimentalDecorators": true, | ||
| "baseUrl": "./", | ||
| "outDir": "./dist" | ||
| }, | ||
| "include": ["."], | ||
| "include": ["src", "index.ts", "monorepo.ts"], | ||
| "exclude": ["dist", "**/node_modules/**"] | ||
| } |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export { CalendarsTaskService } from "@calcom/features/calendars/lib/tasker/CalendarsTaskService"; | ||
| export { CalendarsSyncTasker } from "@calcom/features/calendars/lib/tasker/CalendarsSyncTasker"; | ||
| export { CalendarsTriggerTasker } from "@calcom/features/calendars/lib/tasker/CalendarsTriggerTasker"; | ||
| export { CalendarsTasker } from "@calcom/features/calendars/lib/tasker/CalendarsTasker"; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export { | ||
| CANCEL_USAGE_INCREMENT_JOB_ID, | ||
| getIncrementUsageIdempotencyKey, | ||
| getIncrementUsageJobTag, | ||
| INCREMENT_USAGE_JOB_ID, | ||
| RESCHEDULE_USAGE_INCREMENT_JOB_ID, | ||
| } from "@calcom/features/ee/organizations/lib/billing/tasker/constants"; |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: The exports paths may not align with the actual TypeScript build output. Since
tsconfig.jsonincludes bothindex.ts(at root) andsrc/folder without an explicitrootDir, TypeScript computes rootDir as the package root. This meanssrc/permissions.tscompiles todist/src/permissions.js, notdist/permissions.js.Either:
"rootDir": "./"explicitly and update exports to use./dist/src/...paths (reverting this change), OR"rootDir": "./src"to tsconfig and moveindex.tsintosrc/so all files compile todist/directlyPrompt for AI agents
✅ Addressed in
47f06d2