Imports performance explicitly for Node v14 (#3823)

* Imports performance explicitly for Node v14

* Update packages/trpc/server/routers/viewer/slots.tsx

* Adds missing performance imports

* Update turbo.json

Co-authored-by: Omar López <zomars@me.com>
pull/3687/head
Alex van Andel 2022-08-12 19:18:13 +01:00 committed by GitHub
parent cc48b87fa3
commit 870f70fc38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import { sendBrokenIntegrationEmail } from "@calcom/emails";
import { getUid } from "@calcom/lib/CalEventParser";
import { getErrorFromUnknown } from "@calcom/lib/errors";
import logger from "@calcom/lib/logger";
import { performance } from "@calcom/lib/server/perfObserver";
import type { CalendarEvent, EventBusyDate, NewCalendarEventType } from "@calcom/types/Calendar";
import type { EventResult } from "@calcom/types/EventManager";

View File

@ -2,8 +2,7 @@ import { BookingStatus, Credential, SelectedCalendar } from "@prisma/client";
import { getBusyCalendarTimes } from "@calcom/core/CalendarManager";
import logger from "@calcom/lib/logger";
// import { getBusyVideoTimes } from "@calcom/core/videoClient";
// import notEmpty from "@calcom/lib/notEmpty";
import { performance } from "@calcom/lib/server/perfObserver";
import prisma from "@calcom/prisma";
import type { EventBusyDetails } from "@calcom/types/Calendar";
@ -42,7 +41,9 @@ export async function getBusyTimes(params: {
title: true,
},
})
.then((bookings) => bookings.map(({ startTime, endTime, title }) => ({ end: endTime, start: startTime, title })));
.then((bookings) =>
bookings.map(({ startTime, endTime, title }) => ({ end: endTime, start: startTime, title }))
);
logger.silly(`Busy Time from Cal Bookings ${JSON.stringify(busyTimes)}`);
const endPrismaBookingGet = performance.now();
logger.debug(`prisma booking get took ${endPrismaBookingGet - startPrismaBookingGet}ms`);

View File

@ -5,6 +5,7 @@ import dayjs, { Dayjs } from "@calcom/dayjs";
import { getWorkingHours } from "@calcom/lib/availability";
import { HttpError } from "@calcom/lib/http-error";
import logger from "@calcom/lib/logger";
import { performance } from "@calcom/lib/server/perfObserver";
import prisma, { availabilityUserSelect } from "@calcom/prisma";
import { stringToDayjs } from "@calcom/prisma/zod-utils";

View File

@ -6,6 +6,7 @@ import { getUserAvailability } from "@calcom/core/getUserAvailability";
import dayjs, { Dayjs } from "@calcom/dayjs";
import isOutOfBounds from "@calcom/lib/isOutOfBounds";
import logger from "@calcom/lib/logger";
import { performance } from "@calcom/lib/server/perfObserver";
import getSlots from "@calcom/lib/slots";
import prisma, { availabilityUserSelect } from "@calcom/prisma";
import { TimeRange } from "@calcom/types/schedule";

View File

@ -205,6 +205,7 @@
"$HEROKU_APP_NAME",
"$HOSTED_CAL_FEATURES",
"$HUBSPOT_CLIENT_ID",
"$INTEGRATION_TEST_MODE",
"$NEXT_PUBLIC_CONSOLE_URL",
"$NEXT_PUBLIC_DEBUG",
"$NEXT_PUBLIC_EMBED_LIB_URL",