Skip to content

Commit 1ff196a

Browse files
niels-bosmandependabot[bot]gabrielmfern
authored
chore(deps): bump prettier to v3.4.2 (#1834)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: gabriel miranda <[email protected]>
1 parent 0187b0a commit 1ff196a

File tree

12 files changed

+2492
-2693
lines changed

12 files changed

+2492
-2693
lines changed

.changeset/perfect-fireants-flash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-email/render": patch
3+
---
4+
5+
Update prettier dependency.

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"eslint-config-prettier": "9.0.0",
5151
"html-to-ast": "0.0.6",
5252
"postcss": "8.4.40",
53-
"prettier": "3.3.3",
53+
"prettier": "3.4.2",
5454
"prettier-plugin-tailwindcss": "0.6.6",
5555
"tailwindcss": "3.4.3",
5656
"tsconfig": "workspace:*",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
},
1818
"devDependencies": {
1919
"@changesets/cli": "2.27.10",
20-
"@types/node": "18.18.0",
20+
"@types/node": "22.10.2",
2121
"@types/react": "19.0.1",
2222
"@types/react-dom": "19.0.1",
2323
"eslint": "8.50.0",
2424
"happy-dom": "15.10.2",
25-
"prettier": "3.0.3",
25+
"prettier": "3.4.2",
2626
"prettier-plugin-tailwindcss": "0.6.6",
2727
"tsconfig": "workspace:*",
2828
"tsup": "8.2.4",

packages/code-block/src/prism.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7876,8 +7876,8 @@ export { Prism };
78767876
return "string" == typeof e
78777877
? e
78787878
: Array.isArray(e)
7879-
? e.map(d).join("")
7880-
: d(e.content);
7879+
? e.map(d).join("")
7880+
: d(e.content);
78817881
}
78827882
g.hooks.add("after-tokenize", function (e) {
78837883
e.language in a &&
@@ -10194,8 +10194,8 @@ export { Prism };
1019410194
return "string" == typeof e
1019510195
? e
1019610196
: Array.isArray(e)
10197-
? e.map(a).join("")
10198-
: a(e.content);
10197+
? e.map(a).join("")
10198+
: a(e.content);
1019910199
}
1020010200
(e.languages.naniscript = {
1020110201
comment: { pattern: /^([\t ]*);.*/m, lookbehind: !0 },
@@ -12582,13 +12582,13 @@ export { Prism };
1258212582
: "/>" !== a.content[a.content.length - 1].content &&
1258312583
t.push({ tagName: s(a.content[0].content[1]), openedBraces: 0 })
1258412584
: 0 < t.length && "punctuation" === a.type && "{" === a.content
12585-
? t[t.length - 1].openedBraces++
12586-
: 0 < t.length &&
12587-
0 < t[t.length - 1].openedBraces &&
12588-
"punctuation" === a.type &&
12589-
"}" === a.content
12590-
? t[t.length - 1].openedBraces--
12591-
: (r = !0)),
12585+
? t[t.length - 1].openedBraces++
12586+
: 0 < t.length &&
12587+
0 < t[t.length - 1].openedBraces &&
12588+
"punctuation" === a.type &&
12589+
"}" === a.content
12590+
? t[t.length - 1].openedBraces--
12591+
: (r = !0)),
1259212592
(r || "string" == typeof a) &&
1259312593
0 < t.length &&
1259412594
0 === t[t.length - 1].openedBraces &&
@@ -12608,8 +12608,8 @@ export { Prism };
1260812608
? "string" == typeof e
1260912609
? e
1261012610
: "string" == typeof e.content
12611-
? e.content
12612-
: e.content.map(s).join("")
12611+
? e.content
12612+
: e.content.map(s).join("")
1261312613
: "";
1261412614
};
1261512615
i.hooks.add("after-tokenize", function (e) {
@@ -15477,23 +15477,23 @@ export { Prism };
1547715477
: "/>" !== a.content[a.content.length - 1].content &&
1547815478
t.push({ tagName: s(a.content[0].content[1]), openedBraces: 0 })
1547915479
: !(
15480-
0 < t.length &&
15480+
0 < t.length &&
15481+
"punctuation" === a.type &&
15482+
"{" === a.content
15483+
) ||
15484+
(e[n + 1] &&
15485+
"punctuation" === e[n + 1].type &&
15486+
"{" === e[n + 1].content) ||
15487+
(e[n - 1] &&
15488+
"plain-text" === e[n - 1].type &&
15489+
"{" === e[n - 1].content)
15490+
? 0 < t.length &&
15491+
0 < t[t.length - 1].openedBraces &&
1548115492
"punctuation" === a.type &&
15482-
"{" === a.content
15483-
) ||
15484-
(e[n + 1] &&
15485-
"punctuation" === e[n + 1].type &&
15486-
"{" === e[n + 1].content) ||
15487-
(e[n - 1] &&
15488-
"plain-text" === e[n - 1].type &&
15489-
"{" === e[n - 1].content)
15490-
? 0 < t.length &&
15491-
0 < t[t.length - 1].openedBraces &&
15492-
"punctuation" === a.type &&
15493-
"}" === a.content
15494-
? t[t.length - 1].openedBraces--
15495-
: "comment" !== a.type && (r = !0)
15496-
: t[t.length - 1].openedBraces++),
15493+
"}" === a.content
15494+
? t[t.length - 1].openedBraces--
15495+
: "comment" !== a.type && (r = !0)
15496+
: t[t.length - 1].openedBraces++),
1549715497
(r || "string" == typeof a) &&
1549815498
0 < t.length &&
1549915499
0 === t[t.length - 1].openedBraces &&
@@ -15514,8 +15514,8 @@ export { Prism };
1551415514
return "string" == typeof e
1551515515
? e
1551615516
: "string" == typeof e.content
15517-
? e.content
15518-
: e.content.map(s).join("");
15517+
? e.content
15518+
: e.content.map(s).join("");
1551915519
};
1552015520
i.hooks.add("after-tokenize", function (e) {
1552115521
"xquery" === e.language && o(e.tokens);

packages/react-email/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@babel/core": "7.24.5",
3131
"@babel/parser": "7.24.5",
3232
"chalk": "4.1.2",
33-
"chokidar": "^4.0.1",
33+
"chokidar": "4.0.3",
3434
"commander": "11.1.0",
3535
"debounce": "2.0.0",
3636
"esbuild": "0.19.11",
@@ -54,7 +54,7 @@
5454
"@types/babel__core": "7.20.5",
5555
"@types/fs-extra": "11.0.1",
5656
"@types/mime-types": "2.1.4",
57-
"@types/node": "18.0.0",
57+
"@types/node": "22.10.2",
5858
"@types/normalize-path": "3.0.2",
5959
"@types/react": "^19",
6060
"@types/react-dom": "^19",

packages/react-email/src/app/preview/[...slug]/page.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ export interface PreviewParams {
1616
slug: string[];
1717
}
1818

19-
const Page = async ({ params }: { params: PreviewParams }) => {
19+
const Page = async ({
20+
params: paramsPromise,
21+
}: {
22+
params: Promise<PreviewParams>;
23+
}) => {
24+
const params = await paramsPromise;
2025
// will come in here as segments of a relative path to the email
2126
// ex: ['authentication', 'verify-password.tsx']
2227
const slug = decodeURIComponent(params.slug.join('/'));
@@ -69,8 +74,13 @@ This is most likely not an issue with the preview server. Maybe there was a typo
6974
);
7075
};
7176

72-
export function generateMetadata({ params }: { params: PreviewParams }) {
73-
return { title: `${path.basename(params.slug.join('/'))} — React Email` };
77+
export async function generateMetadata({
78+
params,
79+
}: {
80+
params: Promise<PreviewParams>;
81+
}) {
82+
const { slug } = await params;
83+
return { title: `${path.basename(slug.join('/'))} — React Email` };
7484
}
7585

7686
export default Page;

packages/react-email/src/cli/utils/preview/hot-reloading/create-dependency-graph.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test('createDependencyGraph()', async () => {
4646
'create-dependency-graph.spec.ts',
4747
'setup-hot-reloading.ts',
4848
],
49-
moduleDependencies: ['node:path', 'node:fs'],
49+
moduleDependencies: ['node:path', 'node:fs', 'chokidar/handler'],
5050
},
5151
'create-dependency-graph.spec.ts': {
5252
path: 'create-dependency-graph.spec.ts',

packages/react-email/src/cli/utils/preview/hot-reloading/create-dependency-graph.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import path from 'node:path';
22
import { existsSync, promises as fs, statSync } from 'node:fs';
33
import { getImportedModules } from './get-imported-modules';
44
import { isDev } from '../start-dev-server';
5+
import { EventName } from 'chokidar/handler';
56

67
interface Module {
78
path: string;
@@ -255,10 +256,7 @@ export const createDependencyGraph = async (directory: string) => {
255256

256257
return [
257258
graph,
258-
async (
259-
event: 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir',
260-
pathToModified: string,
261-
) => {
259+
async (event: EventName, pathToModified: string) => {
262260
switch (event) {
263261
case 'change':
264262
if (isJavascriptModule(pathToModified)) {

packages/react-email/src/cli/utils/preview/start-dev-server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export const startDevServer = async (
6363
) {
6464
void serveStaticFile(res, parsedUrl, staticBaseDirRelativePath);
6565
} else if (!isNextReady) {
66-
void nextReadyPromise.then(
67-
() => nextHandleRequest?.(req, res, parsedUrl),
66+
void nextReadyPromise.then(() =>
67+
nextHandleRequest?.(req, res, parsedUrl),
6868
);
6969
} else {
7070
void nextHandleRequest?.(req, res, parsedUrl);
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
export type HotReloadEvent =
2-
| 'add'
3-
| 'addDir'
4-
| 'change'
5-
| 'unlink'
6-
| 'unlinkDir';
1+
import type { EventName } from 'chokidar/handler';
2+
3+
export type HotReloadEvent = EventName;

0 commit comments

Comments
 (0)