Update all Yarn dependencies (2022-07-29) (#3599)

* Update all Yarn dependencies (2022-07-29)

* Adds syncpack config

* Fixes mismatches

* Update yarn.lock

* RRule fixes

* Locking dayjs to fix build

* Type fixes

* Fixes mismatches

* Submodule sync

* Update yarn.lock

* Update event.ts

* Conflict fixes

* Fixes prisma warnings

* Liting

* Upgrade next, zod

* Prevents articfact overwriting

* Yarn fixes

* Jest fixes

* Submodule sync

* Formatting

* Submodule sync

* Adds provider for react-tooltip

* Removed dotenv-cli

* Readds dotenv-cli

* Skips getSchedule tests

Until prisma is mocked properly

* Fixes

* Revert prisma seed script

* E2E fixes

* test

* Removed deprecated req.page in middleware

* Make tests stable

* Unskip getSchedule tests

* fixed 404 logo on cal video (#3885)

* Removed PW aliases as aren't needed anymore

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: zomars <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-08-17 11:38:21 -06:00
1 parent d8fab68edd
commit b8acf1e180
58 files changed
+4297 -5163

No files matched your search

Submodule apps/api updated: 7560fdbfc5...1de91a5124.
+4 -4
View File
@@ -17,14 +17,14 @@
"license": "MIT",
"dependencies": {
"iframe-resizer-react": "^1.1.0",
"next": "^12.2.0",
"next": "^12.2.5",
"nextra": "^1.1.0",
"nextra-theme-docs": "^1.2.2",
"react": "^18.1.0",
"react-dom": "^18.1.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@calcom/config": "*",
"eslint": "^8.15.0"
"eslint": "^8.20.0"
}
}
+12 -12
View File
@@ -23,16 +23,16 @@
"@radix-ui/react-radio-group": "^0.1.1",
"@radix-ui/react-slider": "^0.1.1",
"@radix-ui/react-switch": "^0.1.1",
"@radix-ui/react-tooltip": "^0.1.0",
"next": "^12.2.0",
"@radix-ui/react-tooltip": "^1.0.0",
"next": "^12.2.5",
"next-transpile-modules": "^9.0.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-feather": "^2.0.9",
"react-hot-toast": "^2.2.0"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-feather": "^2.0.10",
"react-hot-toast": "^2.3.0"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/core": "^7.18.9",
"@calcom/config": "*",
"@storybook/addon-a11y": "^6.5.9",
"@storybook/addon-actions": "^6.5.9",
@@ -44,19 +44,19 @@
"@storybook/manager-webpack5": "^6.5.9",
"@storybook/react": "^6.5.9",
"@types/node": "16.9.1",
"@types/react": "18.0.9",
"@types/react": "^18.0.9",
"@types/react-dom": "18.0.4",
"autoprefixer": "^10.4.7",
"babel-loader": "^8.2.5",
"chromatic": "^6.6.4",
"eslint": "^8.15.0",
"chromatic": "^6.7.1",
"eslint": "^8.20.0",
"postcss": "^8.4.13",
"postcss-loader": "^7.0.0",
"storybook-addon-designs": "^6.3.1",
"storybook-addon-next": "^1.6.7",
"tailwindcss": "^3.1.3",
"tailwindcss": "^3.1.6",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"typescript": "^4.6.4"
"typescript": "^4.7.4"
},
"readme": "ERROR: No README data found!",
"_id": "@calcom/[email protected]"
+6 -6
View File
@@ -12,18 +12,18 @@
"start": "PORT=4200 next start"
},
"dependencies": {
"highlight.js": "^11.5.1",
"highlight.js": "^11.6.0",
"isarray": "2.0.5",
"next": "12.2.0",
"next": "^12.2.5",
"openapi-snippet": "^0.13.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"swagger-ui-react": "4.11.1"
},
"devDependencies": {
"@types/node": "16.9.1",
"@types/react": "18.0.9",
"@types/react": "^18.0.9",
"@types/react-dom": "18.0.4",
"typescript": "4.6.4"
"typescript": "^4.7.4"
}
}
+2
View File
@@ -3,6 +3,7 @@ import type { Config } from "@jest/types";
const config: Config.InitialOptions = {
verbose: true,
roots: ["<rootDir>"],
setupFiles: ["<rootDir>/test/jest-setup.js"],
testMatch: ["**/test/lib/**/*.(spec|test).(ts|tsx|js)"],
testPathIgnorePatterns: ["<rootDir>/.next", "<rootDir>/playwright/"],
transform: {
@@ -10,6 +11,7 @@ const config: Config.InitialOptions = {
},
transformIgnorePatterns: ["/node_modules/", "^.+\\.module\\.(css|sass|scss)$"],
testEnvironment: "jsdom",
resolver: `<rootDir>/test/jest-resolver.js`,
moduleNameMapper: {
"^@components(.*)$": "<rootDir>/components$1",
"^@lib(.*)$": "<rootDir>/lib$1",
+11 -8
View File
@@ -1,3 +1,4 @@
import { TooltipProvider } from "@radix-ui/react-tooltip";
import { SessionProvider } from "next-auth/react";
import { EventCollectionProvider } from "next-collect/client";
import { appWithTranslation } from "next-i18next";
@@ -72,14 +73,16 @@ const AppProviders = (props: AppPropsWithChildren) => {
<ContractsProvider>
<SessionProvider session={session || undefined}>
<CustomI18nextProvider {...props}>
{/* color-scheme makes background:transparent not work which is required by embed. We need to ensure next-theme adds color-scheme to `body` instead of `html`(https://github.com/pacocoursey/next-themes/blob/main/src/index.tsx#L74). Once that's done we can enable color-scheme support */}
<ThemeProvider
enableColorScheme={false}
storageKey={storageKey}
forcedTheme={forcedTheme}
attribute="class">
{props.children}
</ThemeProvider>
<TooltipProvider>
{/* color-scheme makes background:transparent not work which is required by embed. We need to ensure next-theme adds color-scheme to `body` instead of `html`(https://github.com/pacocoursey/next-themes/blob/main/src/index.tsx#L74). Once that's done we can enable color-scheme support */}
<ThemeProvider
enableColorScheme={false}
storageKey={storageKey}
forcedTheme={forcedTheme}
attribute="class">
{props.children}
</ThemeProvider>
</TooltipProvider>
</CustomI18nextProvider>
</SessionProvider>
</ContractsProvider>
-1
View File
@@ -1,5 +1,4 @@
import { collectEvents } from "next-collect/server";
// eslint-disable-next-line @next/next/no-server-import-in-page
import { NextMiddleware, NextResponse } from "next/server";
import { extendEventData, nextCollectBasicSettings } from "@calcom/lib/telemetry";
+44 -42
View File
@@ -47,9 +47,9 @@
"@hookform/error-message": "^2.0.0",
"@hookform/resolvers": "^2.9.7",
"@metamask/providers": "^8.1.1",
"@next-auth/prisma-adapter": "^1.0.3",
"@next-auth/prisma-adapter": "^1.0.4",
"@next/bundle-analyzer": "12.1.6",
"@radix-ui/react-avatar": "^0.1.0",
"@radix-ui/react-avatar": "^0.1.4",
"@radix-ui/react-collapsible": "^0.1.0",
"@radix-ui/react-dialog": "^0.1.0",
"@radix-ui/react-dropdown-menu": "^0.1.1",
@@ -58,106 +58,108 @@
"@radix-ui/react-slider": "^0.1.1",
"@radix-ui/react-switch": "^0.1.1",
"@radix-ui/react-toggle-group": "^0.1.5",
"@radix-ui/react-tooltip": "^0.1.0",
"@stripe/react-stripe-js": "^1.8.0",
"@stripe/stripe-js": "^1.29.0",
"@radix-ui/react-tooltip": "^1.0.0",
"@stripe/react-stripe-js": "^1.9.0",
"@stripe/stripe-js": "^1.34.0",
"@vercel/edge-functions-ui": "^0.2.1",
"@wojtekmaj/react-daterange-picker": "^3.3.1",
"accept-language-parser": "^1.5.0",
"async": "^3.2.1",
"async": "^3.2.4",
"bcryptjs": "^2.4.3",
"classnames": "^2.3.1",
"dotenv-cli": "^6.0.0",
"googleapis": "^84.0.0",
"gray-matter": "^4.0.3",
"handlebars": "^4.7.7",
"ical.js": "^1.4.0",
"ics": "^2.31.0",
"ics": "^2.37.0",
"jimp": "^0.16.1",
"kbar": "^0.1.0-beta.36",
"libphonenumber-js": "^1.9.53",
"libphonenumber-js": "^1.10.10",
"lodash": "^4.17.21",
"markdown-it": "^13.0.1",
"memory-cache": "^0.2.0",
"micro": "^9.3.4",
"micro": "^9.4.0",
"mime-types": "^2.1.35",
"next": "^12.2.0",
"next": "^12.2.5",
"next-auth": "^4.10.3",
"next-axiom": "^0.10.0",
"next-collect": "^0.2.0",
"next-i18next": "^11.0.0",
"next-mdx-remote": "^4.0.3",
"next-collect": "^0.2.1",
"next-i18next": "^11.3.0",
"next-mdx-remote": "^4.1.0",
"next-seo": "^4.26.0",
"next-themes": "^0.2.0",
"next-transpile-modules": "^9.0.0",
"nock": "^13.2.8",
"nodemailer": "^6.7.5",
"nodemailer": "^6.7.7",
"otplib": "^12.0.1",
"qrcode": "^1.5.0",
"react": "^18.1.0",
"qrcode": "^1.5.1",
"react": "^18.2.0",
"react-colorful": "^5.5.1",
"react-date-picker": "^8.3.6",
"react-digit-input": "^2.1.0",
"react-dom": "^18.1.0",
"react-dom": "^18.2.0",
"react-easy-crop": "^3.5.2",
"react-feather": "^2.0.10",
"react-hook-form": "^7.31.1",
"react-hot-toast": "^2.1.0",
"react-hook-form": "^7.33.1",
"react-hot-toast": "^2.3.0",
"react-intl": "^5.25.1",
"react-live-chat-loader": "^2.7.3",
"react-multi-email": "^0.5.3",
"react-phone-number-input": "^3.1.52",
"react-query": "^3.39.0",
"react-select": "^5.3.2",
"react-timezone-select": "^1.3.1",
"react-phone-number-input": "^3.2.6",
"react-query": "^3.39.2",
"react-select": "^5.4.0",
"react-timezone-select": "^1.3.2",
"react-use-intercom": "1.5.1",
"react-virtualized-auto-sizer": "^1.0.6",
"react-window": "^1.8.7",
"rrule": "^2.6.9",
"rrule": "^2.7.1",
"short-uuid": "^4.2.0",
"stripe": "^9.1.0",
"stripe": "^9.16.0",
"superjson": "1.9.1",
"uuid": "^8.3.2",
"web3": "^1.7.3",
"zod": "^3.16.0"
"web3": "^1.7.4",
"zod": "^3.18.0"
},
"devDependencies": {
"@babel/core": "^7.17.10",
"@babel/core": "^7.18.9",
"@calcom/config": "*",
"@calcom/types": "*",
"@microsoft/microsoft-graph-types-beta": "0.15.0-preview",
"@playwright/test": "^1.22.1",
"@playwright/test": "^1.25.0",
"@types/accept-language-parser": "1.5.2",
"@types/async": "^3.2.13",
"@types/async": "^3.2.15",
"@types/bcryptjs": "^2.4.2",
"@types/glidejs__glide": "^3.4.2",
"@types/jest": "^27.5.1",
"@types/jest": "^28.1.7",
"@types/lodash": "^4.14.182",
"@types/markdown-it": "^12.2.3",
"@types/memory-cache": "^0.2.2",
"@types/micro": "7.3.6",
"@types/micro": "7.3.7",
"@types/mime-types": "^2.1.1",
"@types/module-alias": "^2.0.1",
"@types/node": "16.9.1",
"@types/nodemailer": "^6.4.4",
"@types/qrcode": "^1.4.1",
"@types/react": "18.0.9",
"@types/react-phone-number-input": "^3.0.13",
"@types/react": "^18.0.9",
"@types/react-phone-number-input": "^3.0.14",
"@types/react-virtualized-auto-sizer": "^1.0.1",
"@types/react-window": "^1.8.5",
"@types/stripe": "^8.0.417",
"@types/uuid": "8.3.1",
"autoprefixer": "^10.4.7",
"babel-jest": "^27.3.1",
"env-cmd": "10.1.0",
"eslint": "^8.16.0",
"jest": "^26.0.0",
"babel-jest": "^28.1.0",
"env-cmd": "^10.1.0",
"eslint": "^8.20.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.3",
"jest-mock-extended": "^2.0.7",
"mockdate": "^3.0.5",
"module-alias": "^2.2.2",
"postcss": "^8.4.13",
"tailwindcss": "^3.1.3",
"ts-jest": "^26.0.0",
"ts-node": "^10.6.0",
"typescript": "^4.6.4"
"tailwindcss": "^3.1.6",
"ts-jest": "^28.0.8",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
import { BookingStatus, Credential, Prisma, SchedulingType, WebhookTriggerEvents } from "@prisma/client";
import async from "async";
import type { NextApiRequest } from "next";
import rrule from "rrule";
import { RRule } from "rrule";
import short from "short-uuid";
import { v5 as uuidv5 } from "uuid";
@@ -201,7 +201,7 @@ async function ensureAvailableUsers(
try {
if (eventType.recurringEvent) {
const recurringEvent = parseRecurringEvent(eventType.recurringEvent);
const allBookingDates = new rrule({ dtstart: new Date(input.dateFrom), ...recurringEvent }).all();
const allBookingDates = new RRule({ dtstart: new Date(input.dateFrom), ...recurringEvent }).all();
// Go through each date for the recurring event and check if each one's availability
// DONE: Decreased computational complexity from O(2^n) to O(n) by refactoring this loop to stop
// running at the first unavailable time.
+1 -1
View File
@@ -3,8 +3,8 @@ import { signIn } from "next-auth/react";
import { useRouter } from "next/router";
import { useEffect } from "react";
import stripe from "@calcom/app-store/stripepayment/lib/server";
import { getPremiumPlanPrice } from "@calcom/app-store/stripepayment/lib/utils";
import stripe from "@calcom/features/ee/payments/server/stripe";
import { checkUsername } from "@calcom/lib/server/checkUsername";
import prisma from "@calcom/prisma";
+1 -1
View File
@@ -6,7 +6,7 @@ import { useSession } from "next-auth/react";
import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect, useRef, useState } from "react";
import RRule from "rrule";
import { RRule } from "rrule";
import { z } from "zod";
import dayjs from "@calcom/dayjs";
+6 -4
View File
@@ -1,9 +1,9 @@
import { expect } from "@playwright/test";
import { UserPlan } from "@prisma/client";
import stripe from "@calcom/app-store/stripepayment/lib/server";
import { getFreePlanPrice, getProPlanPrice } from "@calcom/app-store/stripepayment/lib/utils";
import dayjs from "@calcom/dayjs";
import stripe from "@calcom/features/ee/payments/server/stripe";
import { WEBAPP_URL } from "@calcom/lib/constants";
import prisma from "@calcom/prisma";
@@ -40,9 +40,11 @@ test.describe("Change username on settings", () => {
// Click on save button
await page.click("[data-testid=update-username-btn-desktop]");
await page.click("[data-testid=save-username]");
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(400);
await Promise.all([
page.waitForResponse("**/viewer.updateProfile*"),
page.click("[data-testid=save-username]"),
]);
const newUpdatedUser = await prisma.user.findFirst({
where: {
id: user.id,
@@ -15,7 +15,8 @@ async function clickEmbedButton(page: Page) {
const embedButton = page.locator("[data-testid=embed]");
const embedUrl = await embedButton.getAttribute("data-test-embed-url");
embedButton.click();
return embedUrl;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return embedUrl!;
}
async function clickFirstEventTypeEmbedButton(page: Page) {
@@ -158,25 +159,29 @@ test.describe("Embed Code Generator Tests", () => {
});
test.describe("Event Type Edit Page", () => {
//TODO: Instead of hardcoding, browse through actual events, as this ID might change in future
const sixtyMinProEventId = "6";
test.beforeEach(async ({ page }) => {
await page.goto(`/event-types/${sixtyMinProEventId}`);
await page.goto(`/event-types`);
await Promise.all([
page.locator('[href*="/event-types/"]').first().click(),
page.waitForNavigation({
url: (url) => url.pathname.startsWith("/event-types/"),
}),
]);
});
test("open Embed Dialog for the Event Type", async ({ page }) => {
const basePage = new URL(page.url()).pathname;
const embedUrl = await clickEmbedButton(page);
await expectToBeNavigatingToEmbedTypesDialog(page, {
embedUrl,
basePage: `/event-types/${sixtyMinProEventId}`,
basePage,
});
chooseEmbedType(page, "inline");
await expectToBeNavigatingToEmbedCodeAndPreviewDialog(page, {
embedUrl,
basePage: `/event-types/${sixtyMinProEventId}`,
basePage,
embedType: "inline",
});
@@ -188,7 +193,7 @@ test.describe("Embed Code Generator Tests", () => {
await expectToContainValidPreviewIframe(page, {
embedType: "inline",
calLink: "pro/60min",
calLink: decodeURIComponent(embedUrl),
});
});
});
+15
View File
@@ -0,0 +1,15 @@
module.exports = (path, options) => {
// Call the defaultResolver, so we leverage its cache, error handling, etc.
return options.defaultResolver(path, {
...options,
// Use packageFilter to process parsed `package.json` before the resolution (see https://www.npmjs.com/package/resolve#resolveid-opts-cb)
packageFilter: (pkg) => {
// See https://github.com/microsoft/accessibility-insights-web/blob/40416a4ae6b91baf43102f58e069eff787de4de2/src/tests/common/resolver.js
if (pkg.name === "uuid" || pkg.name === "nanoid") {
delete pkg["exports"];
delete pkg["module"];
}
return pkg;
},
});
};
+6
View File
@@ -0,0 +1,6 @@
// This is a workaround for https://github.com/jsdom/jsdom/issues/2524#issuecomment-902027138
// See https://github.com/microsoft/accessibility-insights-web/blob/40416a4ae6b91baf43102f58e069eff787de4de2/src/tests/unit/jest-setup.ts
const { TextEncoder, TextDecoder } = require("util");
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;