chore: remove @calcom/lib barrel file (#21267)

* refactor: replace imports from @calcom/lib barrel file with direct imports

Co-Authored-By: [email protected] <[email protected]>

* fix: add deprecated barrel file with warning to support tests

Co-Authored-By: [email protected] <[email protected]>

* remove barrel file

* fix: restore barrel file with deprecation notice and add CreditType enum export

Co-Authored-By: [email protected] <[email protected]>

* fix: add CreditType enum definition to barrel file

Co-Authored-By: [email protected] <[email protected]>

* fix: add mock for CreditType enum in credit-service test

Co-Authored-By: [email protected] <[email protected]>

* fix: use importOriginal in CreditType enum mock

Co-Authored-By: [email protected] <[email protected]>

* fix: remove barrel file completely

Co-Authored-By: [email protected] <[email protected]>

* fix: restore barrel file with deprecation notice to support tests

Co-Authored-By: [email protected] <[email protected]>

* fix: update test-setup to use direct import from @calcom/ui/classNames

Co-Authored-By: [email protected] <[email protected]>

* fix: completely remove barrel file

Co-Authored-By: [email protected] <[email protected]>

* fix: update package.json to remove references to index.ts

Co-Authored-By: [email protected] <[email protected]>

* fix: remove main and types fields from package.json

Co-Authored-By: [email protected] <[email protected]>

* fix: restore barrel file with deprecation notice to support tests

Co-Authored-By: [email protected] <[email protected]>

* remove barrel file

* fix

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: hbjORbj <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-05-13 21:55:58 -04:00
1 parent 7e699ab810
commit 3bc9fa11d0
27 files changed
+44 -32

No files matched your search

@@ -22,6 +22,17 @@ vi.mock("@calcom/lib/constants", async () => {
};
});
vi.mock("@calcom/prisma/enums", async (importOriginal) => {
const actual = await importOriginal();
return {
...actual,
CreditType: {
MONTHLY: "MONTHLY",
ADDITIONAL: "ADDITIONAL",
},
};
});
vi.mock("@calcom/lib/server/repository/credits");
vi.mock("@calcom/lib/server/repository/membership");
vi.mock("@calcom/lib/server/repository/team");
@@ -19,12 +19,12 @@ import {
deleteScheduledEmailReminder,
} from "@calcom/features/ee/workflows/lib/reminders/emailReminderManager";
import { scheduleWorkflowReminders } from "@calcom/features/ee/workflows/lib/reminders/reminderScheduler";
import { isPrismaObjOrUndefined } from "@calcom/lib";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
import { SENDER_NAME } from "@calcom/lib/constants";
import { enrichUserWithDelegationCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
import { getEventName } from "@calcom/lib/event";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import { isPrismaObjOrUndefined } from "@calcom/lib/isPrismaObj";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
@@ -21,7 +21,6 @@ import {
deleteScheduledEmailReminder,
} from "@calcom/features/ee/workflows/lib/reminders/emailReminderManager";
import { scheduleWorkflowReminders } from "@calcom/features/ee/workflows/lib/reminders/reminderScheduler";
import { isPrismaObjOrUndefined } from "@calcom/lib";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
import { SENDER_NAME } from "@calcom/lib/constants";
import {
@@ -30,6 +29,7 @@ import {
} from "@calcom/lib/delegationCredential/server";
import { getEventName } from "@calcom/lib/event";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import { isPrismaObjOrUndefined } from "@calcom/lib/isPrismaObj";
import logger from "@calcom/lib/logger";
import { getLuckyUser } from "@calcom/lib/server/getLuckyUser";
import { getTranslation } from "@calcom/lib/server/i18n";
@@ -4,7 +4,7 @@ import { RRule } from "rrule";
import { v4 as uuidv4 } from "uuid";
import dayjs from "@calcom/dayjs";
import { parseRecurringEvent } from "@calcom/lib";
import { parseRecurringEvent } from "@calcom/lib/isRecurringEvent";
import type { Prisma, User } from "@calcom/prisma/client";
type Booking = Prisma.BookingGetPayload<{