Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-email): Proper CJS support #1786

Open
wants to merge 21 commits into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2c084f1
chore(deps-dev): bump happy-dom from 12.2.2 to 15.10.2 (#1766)
dependabot[bot] Nov 8, 2024
43507cf
chore(all): Move React dependencies to just plain dependencies (#1768)
gabrielmfern Nov 8, 2024
53c7923
chore: Bump for release (canary) (#1771)
github-actions[bot] Nov 8, 2024
038fe3f
fix(render): remove destructuring of react-dom/server import (#1772)
gabrielmfern Nov 13, 2024
210ea90
fix(react-email): Null byte characters being rendered in the preview …
gabrielmfern Nov 13, 2024
f55ec1c
chore: Bump for release (canary) (#1774)
github-actions[bot] Nov 14, 2024
c200831
chore(markdown): Update md-to-react-email (#1778)
gabrielmfern Nov 15, 2024
3451cf5
chore: Bump for release (canary) (#1779)
github-actions[bot] Nov 15, 2024
2ebf17f
feat(render): Use prettier's standalone API instead of js-beautify (#…
gabrielmfern Nov 19, 2024
d17c7d5
chore(tailwind): Update contributing notes
gabrielmfern Nov 19, 2024
92594b8
fix(code-block): Typo "PrismLanguage" (#1783)
action-simon Nov 20, 2024
172a804
chore: Bump for release (canary) (#1781)
github-actions[bot] Nov 20, 2024
1b37e27
use a file descriptor
gabrielmfern Nov 20, 2024
7134c29
modify email regex to notice cjs email templates
gabrielmfern Nov 20, 2024
b3af930
close file descriptors open end of use
gabrielmfern Nov 20, 2024
6e067fc
fix regex
gabrielmfern Nov 21, 2024
94d7fc2
fix path being used for email location
gabrielmfern Nov 21, 2024
81381f7
update utils exporter plugin and get-email-component to work with pur…
gabrielmfern Nov 21, 2024
d329196
format
gabrielmfern Nov 21, 2024
08b58f6
add changeset
gabrielmfern Nov 21, 2024
f617518
fix email export breaking with the changes to the plugin
gabrielmfern Nov 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clever-meals-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

fix null byte characters being rendered in the preview server
26 changes: 26 additions & 0 deletions .changeset/cuddly-meals-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
"@react-email/code-inline": patch
"react-email": patch
"@react-email/code-block": patch
"@react-email/components": patch
"@react-email/container": patch
"@react-email/markdown": patch
"@react-email/tailwind": patch
"@react-email/heading": patch
"@react-email/preview": patch
"@react-email/section": patch
"@react-email/button": patch
"@react-email/column": patch
"@react-email/render": patch
"@react-email/body": patch
"@react-email/font": patch
"@react-email/head": patch
"@react-email/html": patch
"@react-email/link": patch
"@react-email/text": patch
"@react-email/img": patch
"@react-email/row": patch
"@react-email/hr": patch
---

Move react and react-dom to just dependencies for better DX
5 changes: 5 additions & 0 deletions .changeset/hungry-ligers-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Add proper CJS support for the preview server
5 changes: 5 additions & 0 deletions .changeset/large-taxis-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/render": patch
---

Use prettier's stadalone API instead of js-beautify
5 changes: 5 additions & 0 deletions .changeset/pink-berries-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/markdown": patch
---

Fixes `fontWeight` styles erroring when using numbers
53 changes: 53 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"mode": "pre",
"tag": "canary",
"initialVersions": {
"demo": "0.0.0",
"web": "0.0.0",
"@benchmarks/preview-server": "0.0.0",
"@benchmarks/tailwind-component": "0.0.0",
"react-email-with-aws-ses": "1.0.3",
"react-email-with-mailersend": "1.0.3",
"react-email-with-nodemailer": "1.0.3",
"react-email-with-plunk": "1.0.3",
"react-email-with-postmark": "1.0.3",
"react-email-with-resend": "1.0.3",
"react-email-with-next-scaleway": "1.0.3",
"react-email-with-node-scaleway": "1.0.3",
"react-email-with-sendgrid": "1.0.3",
"@react-email/body": "0.0.10",
"@react-email/button": "0.0.18",
"@react-email/code-block": "0.0.10",
"@react-email/code-inline": "0.0.4",
"@react-email/column": "0.0.12",
"@react-email/components": "0.0.28",
"@react-email/container": "0.0.14",
"create-email": "0.1.2",
"react-email-starter": "0.1.2",
"eslint-config-custom": "0.0.0",
"@react-email/font": "0.0.8",
"@react-email/head": "0.0.11",
"@react-email/heading": "0.0.14",
"@react-email/hr": "0.0.10",
"@react-email/html": "0.0.10",
"@react-email/img": "0.0.10",
"@react-email/link": "0.0.11",
"@react-email/markdown": "0.0.12",
"@react-email/preview": "0.0.11",
"react-email": "3.0.2",
"@react-email/render": "1.0.2",
"@react-email/row": "0.0.11",
"@react-email/section": "0.0.15",
"@react-email/tailwind": "1.0.2",
"@react-email/text": "0.0.10",
"tsconfig": "0.0.0"
},
"changesets": [
"clever-meals-vanish",
"cuddly-meals-sniff",
"large-taxis-smoke",
"pink-berries-relate",
"shaggy-beers-leave",
"wet-beans-run"
]
}
5 changes: 5 additions & 0 deletions .changeset/shaggy-beers-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/code-block": patch
---

Fix typo in the PrismLanguage type
5 changes: 5 additions & 0 deletions .changeset/wet-beans-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/render": patch
---

Remove uncessary destructuring of react-dom/server
13 changes: 13 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ const components = packages

function readPackage(pkg) {
if (components.includes(pkg.name)) {
if (
"react" in pkg.dependencies &&
pkg.dependencies["react"] === "^18.0 || ^19.0 || ^19.0.0-rc"
) {
pkg.dependencies.react = "19.0.0-rc-02c0e824-20241028";
}
if (
"react-dom" in pkg.dependencies &&
pkg.dependencies["react-dom"] === "^18.0 || ^19.0 || ^19.0.0-rc"
) {
pkg.dependencies["react-dom"] = "19.0.0-rc-02c0e824-20241028";
}

if ("react" in pkg.peerDependencies) {
pkg.peerDependencies.react = "19.0.0-rc-02c0e824-20241028";
}
Expand Down
25 changes: 25 additions & 0 deletions examples/aws-ses/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# react-email-with-aws-ses

## 1.0.4-canary.3

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.2

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.1

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.0

### Patch Changes

- Updated dependencies [f7833da]
- @react-email/[email protected]

## 1.0.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/aws-ses/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-email-with-aws-ses",
"version": "1.0.3",
"version": "1.0.4-canary.3",
"license": "MIT",
"private": true,
"sideEffects": false,
Expand All @@ -16,7 +16,7 @@
},
"dependencies": {
"@aws-sdk/client-ses": "3.341.0",
"@react-email/components": "workspace:0.0.28",
"@react-email/components": "workspace:0.0.29-canary.3",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028"
},
Expand Down
25 changes: 25 additions & 0 deletions examples/mailersend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# react-email-with-mailersend

## 1.0.4-canary.3

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.2

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.1

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.0

### Patch Changes

- Updated dependencies [f7833da]
- @react-email/[email protected]

## 1.0.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/mailersend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-email-with-mailersend",
"version": "1.0.3",
"version": "1.0.4-canary.3",
"license": "MIT",
"private": true,
"sideEffects": false,
Expand All @@ -15,7 +15,7 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@react-email/components": "workspace:0.0.28",
"@react-email/components": "workspace:0.0.29-canary.3",
"mailersend": "^2.0.0",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028"
Expand Down
25 changes: 25 additions & 0 deletions examples/nodemailer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# react-email-with-nodemailer

## 1.0.4-canary.3

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.2

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.1

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.0

### Patch Changes

- Updated dependencies [f7833da]
- @react-email/[email protected]

## 1.0.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/nodemailer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-email-with-nodemailer",
"version": "1.0.3",
"version": "1.0.4-canary.3",
"license": "MIT",
"private": true,
"sideEffects": false,
Expand All @@ -15,7 +15,7 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@react-email/components": "workspace:0.0.28",
"@react-email/components": "workspace:0.0.29-canary.3",
"nodemailer": "6.9.9",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028"
Expand Down
25 changes: 25 additions & 0 deletions examples/plunk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# react-email-with-plunk

## 1.0.4-canary.3

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.2

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.1

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.0

### Patch Changes

- Updated dependencies [f7833da]
- @react-email/[email protected]

## 1.0.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/plunk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-email-with-plunk",
"version": "1.0.3",
"version": "1.0.4-canary.3",
"license": "MIT",
"private": true,
"sideEffects": false,
Expand All @@ -16,7 +16,7 @@
},
"dependencies": {
"@plunk/node": "3.0.2",
"@react-email/components": "workspace:0.0.28",
"@react-email/components": "workspace:0.0.29-canary.3",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028"
},
Expand Down
25 changes: 25 additions & 0 deletions examples/postmark/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# react-email-with-postmark

## 1.0.4-canary.3

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.2

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.1

### Patch Changes

- @react-email/[email protected]

## 1.0.4-canary.0

### Patch Changes

- Updated dependencies [f7833da]
- @react-email/[email protected]

## 1.0.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/postmark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-email-with-postmark",
"version": "1.0.3",
"version": "1.0.4-canary.3",
"license": "MIT",
"private": true,
"type": "module",
Expand All @@ -16,7 +16,7 @@
},
"dependencies": {
"postmark": "3.0.14",
"@react-email/components": "workspace:0.0.28",
"@react-email/components": "workspace:0.0.29-canary.3",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028"
},
Expand Down
Loading
Loading