feat: upgrade typescript to 5.8.3 (#21449)

* feat: upgrade typescript to 5.8.3

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

* chore: fix TypeScript 5.8.3 compatibility issues

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

* Uncomment `optmizeImage`

* Type fix

* Type 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: Joe <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-05-23 13:57:37 +01:00
1 parent d15b24b8ea
commit bca46228e7
23 files changed
+52 -43

No files matched your search

+1 -1
View File
@@ -31,6 +31,6 @@
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
"typescript": "^5.8.3"
}
}
+6
View File
@@ -0,0 +1,6 @@
declare module "@calcom/config/next-i18next.config" {
export const i18n: {
locales: string[];
defaultLocale: string;
};
}
+1 -1
View File
@@ -33,6 +33,6 @@
"prettier-plugin-tailwindcss": "^0.2.5",
"tailwind-scrollbar": "^2.0.1",
"tailwindcss": "^3.3.3",
"typescript": "^4.9.4"
"typescript": "^5.8.3"
}
}
+1 -1
View File
@@ -54,7 +54,7 @@
"npm-run-all": "^4.1.5",
"postcss": "^8.4.18",
"tailwindcss": "^3.3.3",
"typescript": "^4.9.4",
"typescript": "^5.8.3",
"vite": "^4.1.2",
"vite-plugin-environment": "^1.1.3"
}
+1 -1
View File
@@ -50,7 +50,7 @@
"@vitejs/plugin-react": "^2.2.0",
"eslint": "^8.34.0",
"npm-run-all": "^4.1.5",
"typescript": "^4.9.4",
"typescript": "^5.8.3",
"vite": "^4.5.2"
},
"dependencies": {
+1 -1
View File
@@ -25,7 +25,7 @@
],
"types": "./dist/index.d.ts",
"devDependencies": {
"typescript": "^4.9.4",
"typescript": "^5.8.3",
"vite": "^4.1.2"
},
"dependencies": {
+1 -1
View File
@@ -8,7 +8,7 @@
"@typescript-eslint/parser": "^5.52.0",
"@typescript-eslint/utils": "^5.52.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
"typescript": "^5.8.3"
},
"devDependencies": {
"@types/eslint": "^8.4.5"
-1
View File
@@ -5,7 +5,6 @@ import { getToken } from "next-auth/jwt";
import { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers";
import { type ReadonlyRequestCookies } from "next/dist/server/web/spec-extension/adapters/request-cookies";
// @ts-expect-error no type definitions
import { i18n } from "@calcom/config/next-i18next.config";
/**
@@ -28,8 +28,8 @@ import { useOnboarding } from "../lib/onboardingStore";
function extractDomainFromEmail(email: string) {
let out = "";
try {
const match = email.match(/^(?:.*?:\/\/)?.*?(?<root>[\w\-]*(?:\.\w{2,}|\.\w{2,}\.\w{2}))(?:[\/?#:]|$)/);
out = (match && match.groups?.root) ?? "";
const match = email.match(/^(?:.*?:\/\/)?.*?([\w\-]*(?:\.\w{2,}|\.\w{2,}\.\w{2}))(?:[\/?#:]|$)/);
out = (match && match[1]) ?? "";
} catch (ignore) {}
return out.split(".")[0];
}
@@ -2,8 +2,8 @@ import { useState } from "react";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { showToast } from "@calcom/ui/components/toast";
import { SettingsToggle } from "@calcom/ui/components/form";
import { showToast } from "@calcom/ui/components/toast";
const DisableTeamImpersonation = ({
teamId,
@@ -26,7 +26,9 @@ const DisableTeamImpersonation = ({
await utils.viewer.teams.getMembershipbyUser.invalidate();
},
});
const [allowImpersonation, setAllowImpersonation] = useState(!query.data?.disableImpersonation ?? true);
const [allowImpersonation, setAllowImpersonation] = useState(
query.data ? !query.data.disableImpersonation : true
);
if (query.isPending) return <></>;
return (
+1 -1
View File
@@ -34,6 +34,6 @@
"@calcom/tsconfig": "*",
"@calcom/types": "*",
"@faker-js/faker": "^7.3.0",
"typescript": "^4.9.4"
"typescript": "^5.8.3"
}
}
+1 -1
View File
@@ -28,7 +28,7 @@
"postcss-prefixwrap": "1.46.0",
"rollup-plugin-node-builtins": "^2.1.2",
"ts-jest": "^29.1.2",
"typescript": "^4.9.4",
"typescript": "^5.8.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.3",
"vite-plugin-inspect": "^0.8.4",
+1 -1
View File
@@ -26,6 +26,6 @@
"eslint-config-next": "14.0.4",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^4.9.4"
"typescript": "^5.8.3"
}
}
+1 -1
View File
@@ -23,7 +23,7 @@
"devDependencies": {
"@types/node": "^20.3.1",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.8.2",
"typescript": "^5.8.3",
"vite": "^5.0.12",
"vite-plugin-dts": "^3.7.2",
"vite-plugin-environment": "^1.1.3"
+1 -1
View File
@@ -22,6 +22,6 @@
"zod": "^3.22.4"
},
"devDependencies": {
"typescript": "^5.8.2"
"typescript": "^5.8.3"
}
}
+1 -1
View File
@@ -112,6 +112,6 @@
"fs-extra": "^11.2.0",
"lucide-static": "^0.424.0",
"node-html-parser": "^6.1.13",
"typescript": "^5.8.2"
"typescript": "^5.8.3"
}
}