Skip to content

Commit 3e86001

Browse files
committed
feat: Upgrade to Node.js 24 and modernize welcome email
- Update Node.js from v20 to v24 (.nvmrc and volta config) - Migrate nodemailer to v7 with AWS SESv2 API - Update dependencies for React 19 compatibility (@t3-oss/env-nextjs, next-themes, react-highlight-words) - Configure GitHub Actions to use .nvmrc for Node version - Separate newsletter subscription and welcome email error handling - Redesign welcome email template with modern styling (no images for better deliverability)
1 parent 26cc67a commit 3e86001

File tree

8 files changed

+6230
-4795
lines changed

8 files changed

+6230
-4795
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Node.js
2828
uses: actions/setup-node@v4
2929
with:
30-
node-version: "lts/*"
30+
node-version-file: '.nvmrc'
3131
cache: "npm"
3232

3333
- name: Install dependencies
@@ -55,7 +55,7 @@ jobs:
5555
- name: Setup Node.js
5656
uses: actions/setup-node@v4
5757
with:
58-
node-version: "lts/*"
58+
node-version-file: '.nvmrc'
5959
cache: "npm"
6060

6161
- name: Cache Playwright browsers

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Use Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version: 'lts/*'
22+
node-version-file: '.nvmrc'
2323
cache: 'npm'
2424

2525
- name: Install dependencies

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.17.0
1+
v24

auth.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,25 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
8484
return;
8585
}
8686
const htmlMessage = createWelcomeEmailTemplate(user?.name || undefined);
87+
88+
// Subscribe to newsletter (separate try/catch so it doesn't block welcome email)
8789
try {
8890
await manageNewsletterSubscription(email, "subscribe");
91+
} catch (error) {
92+
console.error("Failed to subscribe user to newsletter:", error);
93+
Sentry.captureException(error);
94+
}
95+
96+
// Send welcome email
97+
try {
8998
await sendEmail({
9099
recipient: email,
91100
htmlMessage,
92101
subject:
93102
"Thanks for Joining Codú 🎉 + Your Excluisve Community Invite.",
94103
});
95104
} catch (error) {
96-
console.log("Error in createUser event:", error);
105+
console.error("Failed to send welcome email:", error);
97106
Sentry.captureException(error);
98107
}
99108
},

package-lock.json

Lines changed: 5869 additions & 4097 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"@auth/drizzle-adapter": "^1.11.1",
3232
"@aws-sdk/client-s3": "^3.740.0",
3333
"@aws-sdk/client-ses": "^3.740.0",
34+
"@aws-sdk/client-sesv2": "^3.740.0",
3435
"@aws-sdk/s3-request-presigner": "^3.740.0",
3536
"@headlessui/react": "^2.2.9",
3637
"@heroicons/react": "^2.1.5",
@@ -44,7 +45,7 @@
4445
"@radix-ui/react-popover": "^1.1.1",
4546
"@radix-ui/react-switch": "^1.1.0",
4647
"@sentry/nextjs": "^10.29.0",
47-
"@t3-oss/env-nextjs": "^0.11.1",
48+
"@t3-oss/env-nextjs": "^0.13.8",
4849
"@tailwindcss/forms": "^0.5.8",
4950
"@tanstack/react-query": "^5.90.12",
5051
"@tiptap/extension-code-block-lowlight": "^2.6.6",
@@ -88,15 +89,15 @@
8889
"next": "^16.0.7",
8990
"next-auth": "^5.0.0-beta.30",
9091
"next-safe-action": "^7.9.4",
91-
"next-themes": "^0.3.0",
92-
"nodemailer": "^6.9.14",
92+
"next-themes": "^0.4.6",
93+
"nodemailer": "^7.0.11",
9394
"pg": "^8.12.0",
9495
"postgres": "^3.4.4",
9596
"posthog-js": "^1.180.0",
9697
"prismjs": "^1.30.0",
9798
"react": "^19.2.1",
9899
"react-dom": "^19.2.1",
99-
"react-highlight-words": "^0.20.0",
100+
"react-highlight-words": "^0.21.0",
100101
"react-hook-form": "^7.53.0",
101102
"react-hotkeys-hook": "^4.5.1",
102103
"react-intersection-observer": "^9.13.0",
@@ -121,7 +122,7 @@
121122
"@types/chance": "^1.1.6",
122123
"@types/dompurify": "^3.0.5",
123124
"@types/node": "^22.7.5",
124-
"@types/nodemailer": "^6.4.15",
125+
"@types/nodemailer": "^7.0.4",
125126
"@types/pg": "^8.11.5",
126127
"@types/prismjs": "^1.26.3",
127128
"@types/react": "^19.2.0",
@@ -148,8 +149,8 @@
148149
"typescript": "^5.9.3"
149150
},
150151
"volta": {
151-
"node": "20.17.0",
152-
"npm": "9.6.7"
152+
"node": "24.0.0",
153+
"npm": "11.0.0"
153154
},
154155
"overrides": {
155156
"json5@<1.0.2": "1.0.2",

0 commit comments

Comments
 (0)