Skip to content

Commit 432e63c

Browse files
authored
Update dependencies (#3403)
1 parent fe1bc8c commit 432e63c

File tree

6 files changed

+267
-520
lines changed

6 files changed

+267
-520
lines changed

.husky/pre-commit

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
yarn tsc && yarn lint && yarn prettier && yarn test:coverage
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn tsc && yarn lint && yarn prettier && yarn test:coverage

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default [
6868
},
6969
settings: {
7070
react: {
71-
version: 'detect'
71+
version: '19'
7272
}
7373
},
7474
rules: {

insights/gitlab.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export const getCalendar = async (): Promise<Record<string, number>> => {
3737
const value1 = calendar1[key];
3838
const value2 = calendar2[key];
3939

40+
// eslint-disable-next-line no-useless-assignment
4041
let result = undefined;
4142

4243
if (typeof value1 === 'undefined') {

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
"pre": "yarn time && yarn fetch-projects && yarn svg",
5050
"post": "yarn tsc && yarn houdini && yarn next:build && next-sitemap",
5151
"build": "yarn pre && yarn post",
52-
"prepare": "husky"
52+
"prepare": "husky && husky install"
5353
},
5454
"dependencies": {
55-
"@apollo/client": "4.1.4",
55+
"@apollo/client": "4.1.5",
5656
"@babylonjs/core": "8.52.0",
5757
"@babylonjs/gui": "8.52.0",
5858
"@babylonjs/loaders": "8.52.0",
@@ -66,15 +66,15 @@
6666
"@codersrank/work-experience": "0.9.8",
6767
"@contentful/rich-text-html-renderer": "17.1.6",
6868
"@date-fns/utc": "2.1.1",
69-
"@getbrevo/brevo": "3.0.1",
69+
"@getbrevo/brevo": "4.0.1",
7070
"@serwist/next": "9.5.6",
7171
"@vercel/analytics": "1.6.1",
7272
"@vercel/speed-insights": "1.3.1",
7373
"animateme": "2.4.2",
7474
"async-array-prototype": "1.1.1",
7575
"attr-i18n": "1.0.0",
7676
"babylonjs-gltf2interface": "8.52.0",
77-
"contentful": "11.10.3",
77+
"contentful": "11.10.4",
7878
"d3": "7.9.0",
7979
"date-fns": "4.1.0",
8080
"dator": "2.0.0",
@@ -157,7 +157,7 @@
157157
"cloudinary": "2.9.0",
158158
"commander": "14.0.3",
159159
"dotenv": "17.3.1",
160-
"eslint": "10.0.0",
160+
"eslint": "10.0.1",
161161
"eslint-config-prettier": "10.1.8",
162162
"eslint-plugin-import": "2.32.0",
163163
"eslint-plugin-jest": "29.15.0",
@@ -200,7 +200,7 @@
200200
"postcss-utilities": "0.8.4",
201201
"postcss-watch-folder": "2.0.0",
202202
"prettier": "3.8.1",
203-
"puppeteer": "24.37.3",
203+
"puppeteer": "24.37.5",
204204
"sass": "1.97.3",
205205
"serwist": "9.5.6",
206206
"stylelint": "17.3.0",

src/pages/api/mail.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ import { join } from 'node:path';
33

44
import type { NextApiRequest, NextApiResponse } from 'next';
55

6-
import { SendSmtpEmail, TransactionalEmailsApi } from '@getbrevo/brevo';
6+
import { BrevoClient } from '@getbrevo/brevo';
77
import mjml2html from 'mjml';
88

99
import type { FormData } from '@scripts/types';
1010

11-
const sendSMTPEmail = new SendSmtpEmail();
12-
const transactionalEmailsAPI = new TransactionalEmailsApi();
13-
14-
transactionalEmailsAPI['authentications']['apiKey'].apiKey = process.env.SENDINBLUE_API_KEY ?? '';
11+
const brevo = new BrevoClient({
12+
apiKey: process.env.SENDINBLUE_API_KEY ?? ''
13+
});
1514

1615
const emailTemplate = readFileSync(join(process.cwd(), 'email', 'contact.mjml'), 'utf8');
1716

@@ -34,22 +33,25 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
3433
});
3534
}
3635

36+
// eslint-disable-next-line no-useless-assignment
3737
let result = {};
3838

3939
const htmlContent = interpolateTemplate(emailTemplate, data);
4040

41-
sendSMTPEmail.to = [{ email: 'hi@atanas.info' }];
42-
sendSMTPEmail.sender = { email: data.email };
43-
sendSMTPEmail.subject = 'New contact form submission from https://atanas.info';
44-
sendSMTPEmail.htmlContent = htmlContent;
45-
4641
try {
47-
result = await transactionalEmailsAPI.sendTransacEmail(sendSMTPEmail);
42+
result = await brevo.transactionalEmails.sendTransacEmail({
43+
htmlContent: htmlContent,
44+
sender: { email: data.email },
45+
subject: 'New contact form submission from https://atanas.info',
46+
to: [{ email: 'hi@atanas.info' }]
47+
});
4848

4949
return res.status(200).json(result);
5050
} catch (error) {
5151
result = { error };
5252

53+
console.error(result);
54+
5355
return res.status(400).json(result);
5456
}
5557
}

0 commit comments

Comments
 (0)