Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ jobs:
outputs:
has-files-requiring-all-checks: ${{ steps.filter.outputs.has-files-requiring-all-checks }}
has_companion: ${{ steps.filter.outputs.has_companion }}
has-api-v2-changes: ${{ steps.filter.outputs.has-api-v2-changes }}
commit-sha: ${{ steps.get_sha.outputs.commit-sha }}
run-e2e: ${{ steps.check-if-pr-has-label.outputs.run-e2e == 'true' }}
db-cache-hit: ${{ steps.cache-db-check.outputs.cache-hit }}
Expand Down Expand Up @@ -192,6 +193,16 @@ jobs:
- '!i18n.lock'
has_companion:
- "companion/**"
has-api-v2-changes:
- "apps/api/v2/**"
- "packages/platform-constants/**"
- "packages/platform-enums/**"
- "packages/platform-utils/**"
- "packages/platform-types/**"
- "packages/platform-libraries/**"
- "packages/trpc/**"
- "packages/prisma/schema.prisma"
- "docs/api-reference/v2/**"
- name: Get Latest Commit SHA
id: get_sha
run: |
Expand Down Expand Up @@ -361,7 +372,7 @@ jobs:
check-api-v2-breaking-changes:
name: Check API v2 breaking changes
needs: [prepare]
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-files-requiring-all-checks == 'true' }}
if: ${{ needs.prepare.outputs.run-e2e == 'true' && needs.prepare.outputs.has-api-v2-changes == 'true' }}
uses: ./.github/workflows/check-api-v2-breaking-changes.yml
secrets: inherit

Expand Down Expand Up @@ -447,7 +458,7 @@ jobs:
needs.type-check.result != 'success' ||
needs.unit-test.result != 'success' ||
needs.api-v2-unit-test.result != 'success' ||
needs.check-api-v2-breaking-changes.result != 'success' ||
(needs.prepare.outputs.has-api-v2-changes == 'true' && needs.check-api-v2-breaking-changes.result != 'success') ||
needs.build.result != 'success' ||
needs.build-api-v1.result != 'success' ||
needs.build-api-v2.result != 'success' ||
Expand Down
4 changes: 2 additions & 2 deletions .yarn/patches/next-i18next-npm-13.3.0-bf25b0943c.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ diff --git a/dist/commonjs/serverSideTranslations.js b/dist/commonjs/serverSideT
index bcad3d02fbdfab8dacb1d85efd79e98623a0c257..fff668f598154a13c4030d1b4a90d5d9c18214ad 100644
--- a/dist/commonjs/serverSideTranslations.js
+++ b/dist/commonjs/serverSideTranslations.js
@@ -36,7 +36,6 @@ var _fs = _interopRequireDefault(require("fs"));
var _path = _interopRequireDefault(require("path"));
@@ -36,7 +36,6 @@ var _fs = _interopRequireDefault(require("node:fs"));
var _path = _interopRequireDefault(require("node:path"));
var _createConfig = require("./config/createConfig");
var _node = _interopRequireDefault(require("./createClient/node"));
-var _appWithTranslation = require("./appWithTranslation");
Expand Down
2 changes: 1 addition & 1 deletion apps/api/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const http = require("http");
const http = require("node:http");
const connect = require("connect");
const { createProxyMiddleware } = require("http-proxy-middleware");

Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/next-i18next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const path = require("path");
const path = require("node:path");
const i18nConfig = require("@calcom/config/next-i18next.config");

/** @type {import("next-i18next").UserConfig} */
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v1/test/jest-setup.js
Original file line number Diff line number Diff line change
@@ -1,6 +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");
const { TextEncoder, TextDecoder } = require("node:util");
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
2 changes: 1 addition & 1 deletion apps/api/v2/next-i18next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
const path = require("node:path");
const i18nConfig = require("@calcom/config/next-i18next.config");

/** @type {import("next-i18next").UserConfig} */
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v2/scripts/docker-start.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { execSync } from "child_process";
import { execSync } from "node:child_process";

function checkCommandExists(command: string): boolean {
try {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/v2/src/lib/api-key/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createHash } from "crypto";
import { createHash } from "node:crypto";

export const sha256Hash = (token: string): string => createHash("sha256").update(token).digest("hex");

Expand Down
2 changes: 1 addition & 1 deletion apps/api/v2/src/lib/filterReqHeaders.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IncomingHttpHeaders } from "http";
import { IncomingHttpHeaders } from "node:http";

export function filterReqHeaders(headers: IncomingHttpHeaders): Partial<IncomingHttpHeaders> {
return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable, Logger, OnModuleDestroy } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import * as path from "path";
import { Worker } from "worker_threads";
import * as path from "node:path";
import { Worker } from "node:worker_threads";

// Import WorkerOptions type
import type { GetScheduleOptions } from "@calcom/trpc/server/routers/viewer/slots/types";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AvailableSlotsService } from "@/lib/services/available-slots.service";
import { Logger } from "@nestjs/common";
import { NestFactory } from "@nestjs/core";
import { IncomingMessage } from "http";
import { parentPort, isMainThread } from "worker_threads";
import { IncomingMessage } from "node:http";
import { parentPort, isMainThread } from "node:worker_threads";

import { SlotsWorkerModule } from "./slots.worker.module";

Expand Down
2 changes: 1 addition & 1 deletion apps/api/v2/src/swagger/copy-swagger-module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fs from "fs-extra";
import * as path from "path";
import * as path from "node:path";

// First, copyNestSwagger is required to enable "@nestjs/swagger" in the "nest-cli.json",
// because nest-cli.json is resolving "@nestjs/swagger" plugin from
Expand Down
4 changes: 2 additions & 2 deletions apps/api/v2/src/swagger/generate-swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import type {
OperationObject,
} from "@nestjs/swagger/dist/interfaces/open-api-spec.interface";
import "dotenv/config";
import * as fs from "fs";
import type { Server } from "http";
import * as fs from "node:fs";
import type { Server } from "node:http";
import { spawnSync } from "node:child_process";
import { createRequire } from "node:module";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
import { PrismaWriteService } from "@/modules/prisma/prisma-write.service";
import { TestingModule } from "@nestjs/testing";
import { randomBytes, createHash } from "crypto";
import { randomBytes, createHash } from "node:crypto";

export class ApiKeysRepositoryFixture {
private prismaReadClient: PrismaReadService["prisma"];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
import { PrismaWriteService } from "@/modules/prisma/prisma-write.service";
import { TestingModule } from "@nestjs/testing";
import * as crypto from "crypto";
import * as crypto from "node:crypto";
import { DateTime } from "luxon";

export class TokensRepositoryFixture {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export default function UpgradeTipWrapper({ children }: { children: React.ReactN
const session = useSession();
const features = [
{
icon: <Icon name="users" className="h-5 w-5" />,
icon: <Icon name="users" className="h-5 w-5 text-red-500" />,
title: t("view_bookings_across"),
description: t("view_bookings_across_description"),
},
{
icon: <Icon name="refresh-ccw" className="h-5 w-5" />,
icon: <Icon name="refresh-ccw" className="h-5 w-5 text-blue-500" />,
title: t("identify_booking_trends"),
description: t("identify_booking_trends_description"),
},
{
icon: <Icon name="user-plus" className="h-5 w-5" />,
icon: <Icon name="user-plus" className="h-5 w-5 text-green-500" />,
title: t("spot_popular_event_types"),
description: t("spot_popular_event_types_description"),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/auth/two-factor/totp/setup/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defaultResponderForAppDir } from "app/api/defaultResponderForAppDir";
import { parseRequestData } from "app/api/parseRequestData";
import crypto from "crypto";
import crypto from "node:crypto";
import { cookies, headers } from "next/headers";
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/csrf/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { randomBytes } from "crypto";
import { randomBytes } from "node:crypto";
import { NextResponse } from "next/server";

import { WEBAPP_URL } from "@calcom/lib/constants";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/recorded-daily-video/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defaultResponderForAppDir } from "app/api/defaultResponderForAppDir";
import { createHmac } from "crypto";
import { createHmac } from "node:crypto";
import { headers } from "next/headers";
import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/api/sync/helpscout/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defaultResponderForAppDir } from "app/api/defaultResponderForAppDir";
import { createHmac } from "crypto";
import { createHmac } from "node:crypto";
import { headers } from "next/headers";
import { cookies } from "next/headers";
import type { NextRequest } from "next/server";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/app-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type { SSRConfig } from "next-i18next/dist/types/types";
import { ThemeProvider } from "next-themes";
import type { AppProps as NextAppProps, AppProps as NextJsAppProps } from "next/app";
import { NuqsAdapter } from "nuqs/adapters/next/pages";
import type { ParsedUrlQuery } from "querystring";
import type { ParsedUrlQuery } from "node:querystring";
import type { PropsWithChildren, ReactNode } from "react";
import { useEffect } from "react";

Expand Down
4 changes: 2 additions & 2 deletions apps/web/lib/apps/[slug]/getStaticProps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs";
import fs from "node:fs"
import matter from "gray-matter";
import path from "path";
import path from "node:path"
import { z } from "zod";

import { getAppWithMetadata } from "@calcom/app-store/_appRegistry";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/handleOrgRedirect.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GetServerSidePropsContext } from "next";
import type { ParsedUrlQuery } from "querystring";
import type { ParsedUrlQuery } from "node:querystring";
import { vi, describe, it, expect, beforeEach, afterEach } from "vitest";

import * as constants from "@calcom/lib/constants";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/lib/handleOrgRedirect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ParsedUrlQuery } from "querystring";
import { stringify } from "querystring";
import type { ParsedUrlQuery } from "node:querystring";
import { stringify } from "node:querystring";

import { SINGLE_ORG_SLUG } from "@calcom/lib/constants";
import logger from "@calcom/lib/logger";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/reschedule/[uid]/getServerSideProps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// page can be a server component
import type { GetServerSidePropsContext } from "next";
import { URLSearchParams } from "url";
import { URLSearchParams } from "node:url";
import { z } from "zod";

import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/modules/auth/logout-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { signOut, useSession } from "next-auth/react";
import { useRouter } from "next/navigation";
import type { ParsedUrlQuery } from "querystring";
import type { ParsedUrlQuery } from "node:querystring";
import { useEffect, useState } from "react";

import { WEBSITE_URL } from "@calcom/lib/constants";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/next-i18next.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from "path";
import path from "node:path"

import i18nConfig from "@calcom/config/next-i18next.config";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calcom/web",
"version": "6.0.6",
"version": "6.0.7",
"private": true,
"scripts": {
"analyze": "ANALYZE=true next build",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IncomingMessage } from "http";
import type { IncomingMessage } from "node:http";
import type { NextPageContext } from "next";
import { SessionProvider } from "next-auth/react";
import React from "react";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { platform } from "@todesktop/client-core";
import type { IncomingMessage } from "http";
import type { IncomingMessage } from "node:http";
import { dir } from "i18next";
import type { DocumentContext, DocumentProps } from "next/document";
import Document, { Head, Html, Main, NextScript } from "next/document";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/playwright/fixtures/servers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Server } from "http";
import type { Server } from "node:http";

import { nextServer } from "../lib/next-server";

Expand Down
4 changes: 2 additions & 2 deletions apps/web/playwright/lib/loadJSON.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from "fs";
import path from "path";
import fs from "node:fs"
import path from "node:path"

/**
* Simple utility to load JSON files from the file system. Needed to avoid certain errors with:
Expand Down
6 changes: 3 additions & 3 deletions apps/web/playwright/lib/next-server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import detect from "detect-port";
import type { Server } from "http";
import { createServer } from "http";
import type { Server } from "node:http";
import { createServer } from "node:http";
import next from "next";
import { parse } from "url";
import { parse } from "node:url";

// eslint-disable-next-line @typescript-eslint/no-namespace
declare let process: {
Expand Down
8 changes: 4 additions & 4 deletions apps/web/playwright/lib/testUtils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Frame, Page, Request as PlaywrightRequest } from "@playwright/test";
import { expect } from "@playwright/test";
import { createHash } from "crypto";
import EventEmitter from "events";
import type { IncomingMessage, ServerResponse } from "http";
import { createServer } from "http";
import { createHash } from "node:crypto";
import EventEmitter from "node:events";
import type { IncomingMessage, ServerResponse } from "node:http";
import { createServer } from "node:http";
import type { Messages } from "mailhog";
import { totp } from "otplib";
import { v4 as uuid } from "uuid";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/playwright/oauth-provider.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from "@playwright/test";
import { createHash, randomBytes } from "crypto";
import { createHash, randomBytes } from "node:crypto";

import { WEBAPP_URL } from "@calcom/lib/constants";
import { prisma } from "@calcom/prisma";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/playwright/settings/upload-avatar.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from "@playwright/test";
import path from "path";
import path from "node:path"

import { CAL_URL } from "@calcom/lib/constants";
import { prisma } from "@calcom/prisma";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/playwright/signup.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Page } from "@playwright/test";
import { expect } from "@playwright/test";
import { randomBytes } from "crypto";
import { randomBytes } from "node:crypto";

import { APP_NAME, IS_PREMIUM_USERNAME_ENABLED, IS_MAILHOG_ENABLED } from "@calcom/lib/constants";
import prisma from "@calcom/prisma";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/scripts/check-missing-translations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readFileSync, readdirSync, writeFileSync } from "fs";
import { join } from "path";
import { readFileSync, readdirSync, writeFileSync } from "node:fs";
import { join } from "node:path";

const TEMPLATE_LANGUAGE = "en";
const SPECIFIC_LOCALES = process.argv.slice(2) || [];
Expand Down
6 changes: 3 additions & 3 deletions apps/web/scripts/copy-app-store-static.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require("fs");
const path = require("path");
const fs = require("node:fs");
const path = require("node:path");
const glob = require("glob");
const crypto = require("crypto");
const crypto = require("node:crypto");

const copyAppStoreStatic = () => {
// Get all static files from app-store packages
Expand Down
2 changes: 1 addition & 1 deletion apps/web/scripts/create-sentry-release.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { execSync } = require("child_process");
const { execSync } = require("node:child_process");

const CLIENT_FILES_PATH = ".next/static/chunks";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/scripts/ts-check-changed-files.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { execSync } from "child_process";
import { execSync } from "node:child_process";

type Err = {
stdout: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/server/lib/[user]/getServerSideProps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { EmbedProps } from "app/WithEmbedSSR";
import type { GetServerSideProps } from "next";
import { encode } from "querystring";
import { encode } from "node:querystring";
import type { z } from "zod";

import { orgDomainConfig } from "@calcom/features/ee/organizations/lib/orgDomains";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/test/jest-setup.js
Original file line number Diff line number Diff line change
@@ -1,6 +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");
const { TextEncoder, TextDecoder } = require("node:util");
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
2 changes: 1 addition & 1 deletion apps/web/test/lib/getSchedule/selectedSlots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type ScenarioData,
} from "../../utils/bookingScenario/bookingScenario";

import type { IncomingMessage } from "http";
import type { IncomingMessage } from "node:http";
import { describe, test, beforeEach, vi } from "vitest";
import type { z } from "zod";

Expand Down
Loading
Loading