Skip to content

Commit d2587ae

Browse files
authored
upgrade to next 15 (#151)
1 parent 6dc6b4d commit d2587ae

File tree

28 files changed

+6585
-8660
lines changed

28 files changed

+6585
-8660
lines changed

apps/marketing/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@heroicons/react": "^2.1.3",
12+
"@heroicons/react": "^2.2.0",
1313
"@unsend/email-editor": "workspace:*",
1414
"@unsend/ui": "workspace:*",
15-
"date-fns": "^3.6.0",
16-
"framer-motion": "^11.0.24",
17-
"lucide-react": "^0.359.0",
18-
"next": "14.2.25",
19-
"react": "^18",
20-
"react-dom": "^18"
15+
"date-fns": "^4.1.0",
16+
"framer-motion": "^12.9.2",
17+
"lucide-react": "^0.503.0",
18+
"next": "15.3.1",
19+
"react": "^19.1.0",
20+
"react-dom": "^19.1.0"
2121
},
2222
"devDependencies": {
23-
"@types/node": "^20",
24-
"@types/react": "^18",
25-
"@types/react-dom": "^18",
23+
"@types/node": "^22.15.2",
24+
"@types/react": "^19.1.2",
25+
"@types/react-dom": "^19.1.2",
2626
"@unsend/eslint-config": "workspace:*",
2727
"@unsend/tailwind-config": "workspace:*",
28-
"autoprefixer": "^10.0.1",
29-
"eslint": "^8",
30-
"eslint-config-next": "14.1.4",
31-
"postcss": "^8",
32-
"tailwindcss": "^3.3.0",
33-
"typescript": "^5"
28+
"autoprefixer": "^10.4.21",
29+
"eslint": "^9.25.1",
30+
"eslint-config-next": "15.3.1",
31+
"postcss": "^8.5.3",
32+
"tailwindcss": "^3.4.1",
33+
"typescript": "^5.8.3"
3434
}
3535
}

apps/smtp-server/package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@
1212
"author": "",
1313
"license": "ISC",
1414
"dependencies": {
15-
"@types/dotenv": "^8.2.0",
16-
"@types/mailparser": "^3.4.4",
15+
"@types/mailparser": "^3.4.5",
1716
"@types/smtp-server": "^3.5.10",
18-
"dotenv": "^16.4.5",
19-
"mailparser": "^3.7.1",
20-
"nodemailer": "^6.9.14",
21-
"smtp-server": "^3.13.4"
17+
"dotenv": "^16.5.0",
18+
"mailparser": "^3.7.2",
19+
"nodemailer": "^6.10.1",
20+
"smtp-server": "^3.13.6"
2221
},
2322
"devDependencies": {
24-
"@types/node": "^22.1.0",
25-
"@types/nodemailer": "^6.4.15",
26-
"tsup": "^8.0.2",
27-
"typescript": "^5.5.4"
23+
"@types/node": "^22.15.2",
24+
"@types/nodemailer": "^6.4.17",
25+
"tsup": "^8.4.0",
26+
"typescript": "^5.8.3"
2827
}
2928
}

apps/web/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/web/next.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const config = {
99
output: process.env.DOCKER_OUTPUT ? "standalone" : undefined,
1010
experimental: {
1111
instrumentationHook: true,
12-
esmExternals: "loose",
1312
serverComponentsExternalPackages: ["bullmq"],
1413
},
1514
images: {

apps/web/package.json

Lines changed: 57 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"dev": "next dev -p 3000",
7+
"dev": "next dev -p 3000 --turbopack",
88
"build": "next build",
99
"start": "next start",
1010
"lint": "eslint . --max-warnings 0",
@@ -17,74 +17,77 @@
1717
"db:migrate-reset": "prisma migrate reset"
1818
},
1919
"dependencies": {
20-
"@auth/prisma-adapter": "^1.4.0",
21-
"@aws-sdk/client-s3": "^3.637.0",
22-
"@aws-sdk/client-sesv2": "^3.535.0",
23-
"@aws-sdk/client-sns": "^3.540.0",
24-
"@aws-sdk/s3-request-presigner": "^3.637.0",
25-
"@hono/swagger-ui": "^0.2.1",
26-
"@hono/zod-openapi": "^0.10.0",
27-
"@hookform/resolvers": "^3.3.4",
20+
"@auth/prisma-adapter": "^2.9.0",
21+
"@aws-sdk/client-s3": "^3.797.0",
22+
"@aws-sdk/client-sesv2": "^3.797.0",
23+
"@aws-sdk/client-sns": "^3.797.0",
24+
"@aws-sdk/s3-request-presigner": "^3.797.0",
25+
"@hono/swagger-ui": "^0.5.1",
26+
"@hono/zod-openapi": "^0.19.5",
27+
"@hookform/resolvers": "^5.0.1",
2828
"@isaacs/ttlcache": "^1.4.1",
29-
"@prisma/client": "^6.3.1",
30-
"@t3-oss/env-nextjs": "^0.9.2",
31-
"@tanstack/react-query": "^5.25.0",
32-
"@trpc/client": "next",
33-
"@trpc/next": "next",
34-
"@trpc/react-query": "next",
35-
"@trpc/server": "next",
29+
"@prisma/client": "^6.6.0",
30+
"@t3-oss/env-nextjs": "^0.13.0",
31+
"@tanstack/react-query": "^5.74.4",
32+
"@trpc/client": "^11.1.1",
33+
"@trpc/next": "^11.1.1",
34+
"@trpc/react-query": "^11.1.1",
35+
"@trpc/server": "^11.1.1",
3636
"@unsend/email-editor": "workspace:*",
3737
"@unsend/ui": "workspace:*",
38-
"bullmq": "^5.41.0",
39-
"chrono-node": "^2.7.6",
40-
"date-fns": "^3.6.0",
41-
"emoji-picker-react": "^4.12.0",
42-
"framer-motion": "^11.0.24",
43-
"hono": "^4.2.2",
38+
"bullmq": "^5.51.1",
39+
"chrono-node": "^2.8.0",
40+
"date-fns": "^4.1.0",
41+
"emoji-picker-react": "^4.12.2",
42+
"framer-motion": "^12.9.2",
43+
"hono": "^4.7.7",
4444
"html-to-text": "^9.0.5",
45-
"ioredis": "^5.4.1",
46-
"lucide-react": "^0.359.0",
47-
"mime-types": "^2.1.35",
48-
"nanoid": "^5.0.7",
49-
"next": "^14.2.25",
50-
"next-auth": "^4.24.6",
51-
"pnpm": "^8.15.5",
52-
"prisma": "^6.3.1",
53-
"query-string": "^9.0.0",
54-
"react": "18.2.0",
55-
"react-dom": "18.2.0",
56-
"react-hook-form": "^7.51.3",
57-
"recharts": "^2.12.5",
45+
"ioredis": "^5.6.1",
46+
"lucide-react": "^0.503.0",
47+
"mime-types": "^3.0.1",
48+
"nanoid": "^5.1.5",
49+
"next": "^15.3.1",
50+
"next-auth": "^4.24.11",
51+
"pnpm": "^10.9.0",
52+
"prisma": "^6.6.0",
53+
"query-string": "^9.1.1",
54+
"react": "19.1.0",
55+
"react-dom": "19.1.0",
56+
"react-hook-form": "^7.56.1",
57+
"recharts": "^2.15.3",
5858
"server-only": "^0.0.1",
59-
"stripe": "^17.6.0",
60-
"superjson": "^2.2.1",
61-
"tldts": "^6.1.16",
62-
"ua-parser-js": "^1.0.38",
59+
"stripe": "^18.0.0",
60+
"superjson": "^2.2.2",
61+
"tldts": "^7.0.4",
62+
"ua-parser-js": "^2.0.3",
6363
"unsend": "workspace:*",
64-
"use-debounce": "^10.0.2",
65-
"zod": "^3.22.4"
64+
"use-debounce": "^10.0.4",
65+
"zod": "^3.24.3"
6666
},
6767
"devDependencies": {
68-
"@next/eslint-plugin-next": "^14.2.2",
69-
"@types/eslint": "^8.56.2",
68+
"@next/eslint-plugin-next": "^15.3.1",
69+
"@types/eslint": "^9.6.1",
7070
"@types/html-to-text": "^9.0.4",
7171
"@types/mime-types": "^2.1.4",
72-
"@types/node": "^20.11.20",
73-
"@types/react": "^18.2.57",
74-
"@types/react-dom": "^18.2.19",
72+
"@types/node": "^22.15.2",
73+
"@types/react": "^19.1.2",
74+
"@types/react-dom": "^19.1.2",
7575
"@types/ua-parser-js": "^0.7.39",
76-
"@typescript-eslint/eslint-plugin": "^7.1.1",
77-
"@typescript-eslint/parser": "^7.1.1",
76+
"@typescript-eslint/eslint-plugin": "^8.31.0",
77+
"@typescript-eslint/parser": "^8.31.0",
7878
"@unsend/eslint-config": "workspace:*",
7979
"@unsend/tailwind-config": "workspace:*",
8080
"@unsend/typescript-config": "workspace:*",
81-
"eslint": "^8.57.0",
82-
"eslint-config-next": "^14.1.3",
83-
"postcss": "^8.4.34",
84-
"prettier": "^3.2.5",
85-
"prettier-plugin-tailwindcss": "^0.5.11",
81+
"eslint": "^9.25.1",
82+
"eslint-config-next": "^15.3.1",
83+
"postcss": "^8.5.3",
84+
"prettier": "^3.5.3",
85+
"prettier-plugin-tailwindcss": "^0.6.11",
8686
"tailwindcss": "^3.4.1",
87-
"typescript": "^5.4.2"
87+
"typescript": "^5.8.3"
88+
},
89+
"overrides": {
90+
"react-is": "^19.0.0-rc-69d4b800-20241021"
8891
},
8992
"ct3aMetadata": {
9093
"initVersion": "7.30.0"

apps/web/src/app/(dashboard)/campaigns/[campaignId]/edit/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Spinner } from "@unsend/ui/src/spinner";
55
import { Button } from "@unsend/ui/src/button";
66
import { Input } from "@unsend/ui/src/input";
77
import { Editor } from "@unsend/email-editor";
8-
import { useState } from "react";
8+
import { use, useState } from "react";
99
import { Campaign } from "@prisma/client";
1010
import {
1111
Select,
@@ -51,16 +51,18 @@ const IMAGE_SIZE_LIMIT = 10 * 1024 * 1024;
5151
export default function EditCampaignPage({
5252
params,
5353
}: {
54-
params: { campaignId: string };
54+
params: Promise<{ campaignId: string }>;
5555
}) {
56+
const { campaignId } = use(params);
57+
5658
const {
5759
data: campaign,
5860
isLoading,
5961
error,
6062
} = api.campaign.getCampaign.useQuery(
61-
{ campaignId: params.campaignId },
63+
{ campaignId },
6264
{
63-
enabled: !!params.campaignId,
65+
enabled: !!campaignId,
6466
}
6567
);
6668

apps/web/src/app/(dashboard)/campaigns/[campaignId]/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ import Link from "next/link";
1212

1313
import Spinner from "@unsend/ui/src/spinner";
1414
import { api } from "~/trpc/react";
15-
import { Separator } from "@unsend/ui/src/separator";
16-
import { ExternalLinkIcon } from "lucide-react";
15+
import { use } from "react";
1716

1817
export default function CampaignDetailsPage({
1918
params,
2019
}: {
21-
params: { campaignId: string };
20+
params: Promise<{ campaignId: string }>;
2221
}) {
22+
const { campaignId } = use(params);
23+
2324
const { data: campaign, isLoading } = api.campaign.getCampaign.useQuery({
24-
campaignId: params.campaignId,
25+
campaignId: campaignId,
2526
});
2627

2728
if (isLoading) {

apps/web/src/app/(dashboard)/contacts/[contactBookId]/page.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ import {
2222
} from "@unsend/ui/src/popover";
2323
import { Button } from "@unsend/ui/src/button";
2424
import { useTheme } from "@unsend/ui";
25+
import { use } from "react";
2526

2627
export default function ContactsPage({
2728
params,
2829
}: {
29-
params: { contactBookId: string };
30+
params: Promise<{ contactBookId: string }>;
3031
}) {
32+
const { contactBookId } = use(params);
3133
const { theme } = useTheme();
3234

3335
const contactBookDetailQuery = api.contacts.getContactBookDetails.useQuery({
34-
contactBookId: params.contactBookId,
36+
contactBookId: contactBookId,
3537
});
3638

3739
const utils = api.useUtils();
@@ -41,7 +43,7 @@ export default function ContactsPage({
4143
await utils.contacts.getContactBookDetails.cancel();
4244
utils.contacts.getContactBookDetails.setData(
4345
{
44-
contactBookId: params.contactBookId,
46+
contactBookId: contactBookId,
4547
},
4648
(old) => {
4749
if (!old) return old;
@@ -54,7 +56,7 @@ export default function ContactsPage({
5456
},
5557
onSettled: () => {
5658
utils.contacts.getContactBookDetails.invalidate({
57-
contactBookId: params.contactBookId,
59+
contactBookId: contactBookId,
5860
});
5961
},
6062
});
@@ -93,7 +95,7 @@ export default function ContactsPage({
9395
// Handle emoji selection here
9496
// You might want to update the contactBook's emoji
9597
updateContactBookMutation.mutate({
96-
contactBookId: params.contactBookId,
98+
contactBookId: contactBookId,
9799
emoji: emojiObject.emoji,
98100
});
99101
}}
@@ -118,7 +120,7 @@ export default function ContactsPage({
118120
</Breadcrumb>
119121
</div>
120122
<div className="flex gap-4">
121-
<AddContact contactBookId={params.contactBookId} />
123+
<AddContact contactBookId={contactBookId} />
122124
</div>
123125
</div>
124126
<div className="mt-16">
@@ -153,7 +155,7 @@ export default function ContactsPage({
153155
Contact book ID
154156
</div>
155157
<TextWithCopyButton
156-
value={params.contactBookId}
158+
value={contactBookId}
157159
alwaysShowCopy
158160
className="text-sm w-[130px] overflow-hidden text-ellipsis font-mono"
159161
/>
@@ -194,7 +196,7 @@ export default function ContactsPage({
194196
</div>
195197
</div>
196198
<div className="mt-16">
197-
<ContactList contactBookId={params.contactBookId} />
199+
<ContactList contactBookId={contactBookId} />
198200
</div>
199201
</div>
200202
</div>

apps/web/src/app/(dashboard)/contacts/contact-books-list.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default function ContactBooksList() {
3434
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 ">
3535
{contactBooksQuery.data?.map((contactBook) => (
3636
<motion.div
37+
key={contactBook.id}
3738
whileHover={{ scale: 1.02 }}
3839
transition={{ type: "spring", stiffness: 200, damping: 10 }}
3940
whileTap={{ scale: 0.99 }}

apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
TableRow,
2121
} from "@unsend/ui/src/table";
2222
import { TextWithCopyButton } from "@unsend/ui/src/text-with-copy";
23-
import React from "react";
23+
import React, { use } from "react";
2424
import { Switch } from "@unsend/ui/src/switch";
2525
import DeleteDomain from "./delete-domain";
2626
import SendTestMail from "./send-test-mail";
@@ -31,11 +31,13 @@ import { toast } from "@unsend/ui/src/toaster";
3131
export default function DomainItemPage({
3232
params,
3333
}: {
34-
params: { domainId: string };
34+
params: Promise<{ domainId: string }>;
3535
}) {
36+
const { domainId } = use(params);
37+
3638
const domainQuery = api.domain.getDomain.useQuery(
3739
{
38-
id: Number(params.domainId),
40+
id: Number(domainId),
3941
},
4042
{
4143
refetchInterval: (q) => (q?.state.data?.isVerifying ? 10000 : false),
@@ -47,7 +49,7 @@ export default function DomainItemPage({
4749

4850
const handleVerify = () => {
4951
verifyQuery.mutate(
50-
{ id: Number(params.domainId) },
52+
{ id: Number(domainId) },
5153
{
5254
onSettled: () => {
5355
domainQuery.refetch();

0 commit comments

Comments
 (0)