Skip to content

Commit bca4622

Browse files
devin-ai-integration[bot]joe@cal.comjoeauyeung
authored
feat: upgrade typescript to 5.8.3 (calcom#21449)
* feat: upgrade typescript to 5.8.3 Co-Authored-By: joe@cal.com <joe@cal.com> * chore: fix TypeScript 5.8.3 compatibility issues Co-Authored-By: joe@cal.com <joe@cal.com> * Uncomment `optmizeImage` * Type fix * Type fix --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: joe@cal.com <joe@cal.com> Co-authored-by: Joe <j.auyeung419@gmail.com>
1 parent d15b24b commit bca4622

23 files changed

Lines changed: 52 additions & 43 deletions

File tree

apps/api/v1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"next-axiom": "^0.17.0",
3939
"next-swagger-doc": "^0.3.6",
4040
"next-validations": "^0.2.0",
41-
"typescript": "^4.9.4",
41+
"typescript": "^5.8.3",
4242
"tzdata": "^1.0.30",
4343
"uuid": "^8.3.2",
4444
"zod": "^3.22.4"

apps/api/v1/test/lib/bookings/_get.integration-test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ describe("GET /api/bookings", async () => {
3838

3939
expect(responseData.bookings.find((b) => b.userId === memberUser.id)).toBeDefined();
4040
expect(groupedUsers.size).toBe(1);
41-
expect(groupedUsers.entries().next().value[0]).toBe(memberUser.id);
41+
const firstEntry = groupedUsers.entries().next().value;
42+
expect(firstEntry?.[0]).toBe(memberUser.id);
4243
});
4344

4445
it("Returns bookings for regular user", async () => {

apps/api/v2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"ts-loader": "^9.4.3",
109109
"ts-node": "^10.9.1",
110110
"tsconfig-paths": "^4.1.0",
111-
"typescript": "^5.8.2"
111+
"typescript": "^5.8.3"
112112
},
113113
"prisma": {
114114
"schema": "../../../packages/prisma/schema.prisma"

apps/web/app/api/logo/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,12 @@ async function getHandler(request: NextRequest) {
192192
try {
193193
const response = await fetch(filteredLogo);
194194
const arrayBuffer = await response.arrayBuffer();
195-
let buffer = Buffer.from(arrayBuffer);
195+
let buffer: Buffer = Buffer.from(arrayBuffer);
196196

197197
// If we need to resize the team logos (via Next.js' built-in image processing)
198198
if (teamLogos[logoDefinition.source] && logoDefinition.w) {
199199
const { detectContentType, optimizeImage } = await import("next/dist/server/image-optimizer");
200+
200201
buffer = await optimizeImage({
201202
buffer,
202203
contentType: detectContentType(buffer) ?? "image/jpeg",

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"tailwindcss": "^3.3.3",
195195
"tailwindcss-animate": "^1.0.6",
196196
"ts-node": "^10.9.1",
197-
"typescript": "^4.9.4"
197+
"typescript": "^5.8.3"
198198
},
199199
"nextBundleAnalysis": {
200200
"budget": 358400,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"prismock": "^1.33.4",
109109
"resize-observer-polyfill": "^1.5.1",
110110
"tsc-absolute": "^1.0.0",
111-
"typescript": "^4.9.4",
111+
"typescript": "^5.8.3",
112112
"vitest": "^2.1.1",
113113
"vitest-fetch-mock": "^0.3.0",
114114
"vitest-mock-extended": "^2.0.2"

packages/app-store-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
"eslint-plugin-react": "^7.30.1",
3232
"eslint-plugin-react-hooks": "^4.6.0",
3333
"ts-node": "^10.9.1",
34-
"typescript": "^4.9.4"
34+
"typescript": "^5.8.3"
3535
}
3636
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
declare module "@calcom/config/next-i18next.config" {
2+
export const i18n: {
3+
locales: string[];
4+
defaultLocale: string;
5+
};
6+
}

packages/config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
"prettier-plugin-tailwindcss": "^0.2.5",
3434
"tailwind-scrollbar": "^2.0.1",
3535
"tailwindcss": "^3.3.3",
36-
"typescript": "^4.9.4"
36+
"typescript": "^5.8.3"
3737
}
3838
}

packages/embeds/embed-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"npm-run-all": "^4.1.5",
5555
"postcss": "^8.4.18",
5656
"tailwindcss": "^3.3.3",
57-
"typescript": "^4.9.4",
57+
"typescript": "^5.8.3",
5858
"vite": "^4.1.2",
5959
"vite-plugin-environment": "^1.1.3"
6060
}

0 commit comments

Comments
 (0)