Skip to content

Commit 83adf45

Browse files
authored
Merge pull request #33 from codeskills-dev/chore/support-react-19
feat: React 19 support
2 parents afc0dd1 + 7e344b3 commit 83adf45

File tree

4 files changed

+65
-187
lines changed

4 files changed

+65
-187
lines changed

.changeset/cyan-mangos-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"md-to-react-email": patch
3+
---
4+
5+
Add support for React 19

__tests__/emailMarkdown.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { render } from "@react-email/render";
33
import { EmailMarkdown } from "../src";
44

55
describe("ReactEmailMarkdown component renders correctly", () => {
6-
it("renders the markdown in the correct format for browsers", () => {
7-
const actualOutput = render(
6+
it("renders the markdown in the correct format for browsers", async () => {
7+
const actualOutput = await render(
88
<EmailMarkdown
99
markdown={`# Hello, World!
1010
## Hi, World`}
@@ -16,7 +16,7 @@ describe("ReactEmailMarkdown component renders correctly", () => {
1616
);
1717

1818
expect(actualOutput).toMatchInlineSnapshot(
19-
`"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><div><h1 style="font:700 23px / 32px &#x27;Roobert PRO&#x27;, system-ui, sans-serif">Hello, World!</h1><h2 style="background:url(&#x27;path/to/image&#x27;)">Hi, World</h2></div>"`
19+
`"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><div><h1 style="font:700 23px / 32px &#x27;Roobert PRO&#x27;, system-ui, sans-serif">Hello, World!</h1><h2 style="background:url(&#x27;path/to/image&#x27;)">Hi, World</h2></div><!--/$-->"`
2020
);
2121
});
2222
});

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"license": "MIT",
3636
"devDependencies": {
3737
"@changesets/cli": "^2.26.2",
38-
"@react-email/render": "0.0.7",
39-
"@types/react": "18.2.8",
38+
"@react-email/render": "1.0.3",
39+
"@types/react": "19.0.0",
4040
"@vitest/coverage-v8": "2.1.8",
4141
"happy-dom": "^15.11.7",
4242
"react": "18.2.0",
@@ -46,7 +46,7 @@
4646
"vitest": "2.1.8"
4747
},
4848
"peerDependencies": {
49-
"react": "18.x"
49+
"react": "^18.0 || ^19.0"
5050
},
5151
"dependencies": {
5252
"marked": "7.0.4"

0 commit comments

Comments
 (0)