Skip to content

chore(react-email): Add console.error on uncaught exceptions #2179

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

Open
wants to merge 99 commits into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
a8cf2a9
feat(react-email): added a theme switcher to the dev preview (#1749)
KayleeWilliams Feb 17, 2025
fbc79ab
feat(tailwind): extract pseudo classes to stylesheet (#1864)
Sjoertjuh Feb 26, 2025
f2d526f
fix(tailwind): Infinite loop during sanitization
gabrielmfern Feb 27, 2025
e8af858
chore(tailwind): Improve code for running Tailwind integration test (…
gabrielmfern Feb 27, 2025
4aa336a
chore(deps): update dependency @types/node to v20.17.22 (#1940)
renovate[bot] Mar 3, 2025
258d7e0
chore(deps): update dependency @changesets/cli to v2.28.1 (#1939)
renovate[bot] Mar 3, 2025
d4f33fe
chore(root): Lint
gabrielmfern Mar 31, 2025
d9397ee
fix(react-email): Rebase artifact with default active view
gabrielmfern Mar 31, 2025
ba2b831
fix locks
gabrielmfern Apr 1, 2025
1baab85
fix(root): Duplicated turbo package config
gabrielmfern Apr 8, 2025
1f26ff9
chore: Enter pre-release
gabrielmfern Apr 8, 2025
2fdbbae
chore(root): Version packages (canary) (#2064)
github-actions[bot] Apr 8, 2025
410681d
chore(deps-dev): bump vite from 5.4.14 to 5.4.17 (#2062)
dependabot[bot] Apr 9, 2025
5369062
chore(deps): update dependency vite to v5.4.17 [security] (#2033)
renovate[bot] Apr 9, 2025
91bbad7
chore: lint workflow (#2024)
bukinoshita Apr 9, 2025
2f9e674
chore(create-email): Incresae timeout for type checking test
gabrielmfern Apr 9, 2025
170cee4
fix(create-email): linter (#2023)
bukinoshita Apr 9, 2025
ed4f9ed
fix(tailwind): linter (#2021)
bukinoshita Apr 9, 2025
6c787fc
fix(benchmarks): linter (#2022)
bukinoshita Apr 9, 2025
b63183a
fix(demo): linter (#2018)
bukinoshita Apr 9, 2025
a651762
fix(web): linter (#2019)
bukinoshita Apr 9, 2025
9c8cd18
feat(ci): Separate actions for versioning canary/main (#2075)
gabrielmfern Apr 14, 2025
8367b54
feat(ci): Automated canary releases (#2076)
gabrielmfern Apr 14, 2025
7abd4dc
fix(react-email): Dependents of dependents of email templates not cau…
gabrielmfern Apr 14, 2025
754b0fe
fix(react-email): No error with missing default function export (#2084)
gabrielmfern Apr 14, 2025
ea8f561
feat(create-email): Use latest from specified tag for `react-email` a…
gabrielmfern Apr 14, 2025
9d70c5f
fix(root): changeset (#2086)
gabrielmfern Apr 14, 2025
a82845d
chore(root): Version packages (canary) (#2087)
github-actions[bot] Apr 14, 2025
304851a
feat(render): Separate pretty from render (#1906)
thena-seer Apr 15, 2025
d037db8
build(deps): use caret range for package dependencies (#2028)
CHC383 Apr 15, 2025
908a016
chore(root): Version packages (canary) (#2088)
github-actions[bot] Apr 15, 2025
1a0c79e
fix(root): Invalid changeset with now removed starter template package
gabrielmfern Apr 15, 2025
3a45b2c
chore(root): Version packages (canary) (#2090)
github-actions[bot] Apr 15, 2025
bb2e94a
chore(root): Try removing publishConfig for automated release to work
gabrielmfern Apr 15, 2025
8cf6b5a
Revert "chore(root): Try removing publishConfig for automated release…
gabrielmfern Apr 15, 2025
8c64b85
chore(react-email): Use deprecated `pretty` to allow for backwards-co…
gabrielmfern Apr 15, 2025
f013be7
fix(tailwind): Declarations with multiple variables not being resolve…
gabrielmfern Apr 16, 2025
8bcb717
chore(root): Version packages (canary) (#2092)
github-actions[bot] Apr 16, 2025
01b76c2
fix(react-email): JSON import support on dependency graph (#2094)
gabrielmfern Apr 16, 2025
786caf9
fix(react-email): Non-emails files being rendered when hot reloading …
gabrielmfern Apr 16, 2025
15ff1c1
fix(react-email): Dependencies outside dependency graph directory not…
gabrielmfern Apr 16, 2025
291fffc
chore(root): Version packages (canary) (#2096)
github-actions[bot] Apr 16, 2025
995d9d1
fix(create-email): Name & version (#2097)
gabrielmfern Apr 16, 2025
5ba4088
chore(root): Version packages (canary) (#2098)
github-actions[bot] Apr 16, 2025
0487875
chore(deps): update dependency @types/babel__traverse to v7.20.7 (#2035)
renovate[bot] Apr 16, 2025
30f8448
chore(deps): update dependency vite to v5.4.18 [security] (#2080)
renovate[bot] Apr 16, 2025
48092f1
chore(deps): update dependency @types/babel__traverse to v7.20.7 (#2034)
renovate[bot] Apr 16, 2025
d1e4cbf
chore(react-email,web): Update babel dependencies
gabrielmfern Apr 16, 2025
d5c64b5
chore(tailwind): Remove lock from integration tests (#2099)
gabrielmfern Apr 16, 2025
6de6751
feat(ci): Improved version of dependency check (#2102)
gabrielmfern Apr 17, 2025
c93d87e
chore(root): Use biome beta (#2101)
gabrielmfern Apr 17, 2025
3a3d2bb
chore(root, react-email): Remove remaining prettier dependencies (#2100)
gabrielmfern Apr 17, 2025
9f32ea4
chore(root): Update pnpm and turborepo (#2103)
gabrielmfern Apr 17, 2025
9818a1e
fix(deps): update dependency zod to v3.24.3 (#2105)
renovate[bot] Apr 18, 2025
8550d33
chore(deps): update dependency autoprefixer to v10.4.21 (#2108)
renovate[bot] Apr 18, 2025
57a6195
chore(deps): update dependency sonner to v1.7.4 (#2110)
renovate[bot] Apr 18, 2025
3107a61
chore(deps): update dependency stacktrace-parser to v0.1.11 (#2111)
renovate[bot] Apr 18, 2025
40faca9
chore(deps): update dependency @changesets/cli to v2.29.2 (#2118)
renovate[bot] Apr 18, 2025
104e5b4
chore(deps): update dependency @edge-runtime/vm to v3.2.0 (#2119)
renovate[bot] Apr 18, 2025
0a8c0d1
chore(deps): update dependency @swc/core to v1.11.21 (#2121)
renovate[bot] Apr 18, 2025
14bbb88
fix(deps): update dependency tailwind-0.0.12 to v0.1.0 (#2143)
renovate[bot] Apr 18, 2025
19e6d23
fix(deps): update nextjs monorepo to v15.3.1 (#2145)
renovate[bot] Apr 18, 2025
ded6a5e
chore(config): migrate renovate config (#2106)
renovate[bot] Apr 18, 2025
21a1472
chore(deps): update dependency typescript to v5.8.3 (#2133)
renovate[bot] Apr 18, 2025
ef4331e
fix(deps): update dependency @babel/preset-typescript to v7.27.0 (#2136)
renovate[bot] Apr 18, 2025
c36f43a
fix(deps): update dependency @supabase/supabase-js to v2.49.4 (#2137)
renovate[bot] Apr 18, 2025
89be286
fix(deps): update dependency lucide-react to ^0.492.0 (#2140)
renovate[bot] Apr 18, 2025
e6c1b8a
fix(deps): update dependency resend to v4.3.0 (#2142)
renovate[bot] Apr 18, 2025
38ba1ae
fix(deps): update dependency prism-react-renderer to v2.4.1 (#2141)
renovate[bot] Apr 18, 2025
f6f1e8f
fix(deps): update dependency tailwind-0.0.17 to v0.1.0 (#2144)
renovate[bot] Apr 18, 2025
025b1b3
Revert "fix(deps): update dependency tailwind-0.0.17 to v0.1.0 (#2144)"
gabrielmfern Apr 18, 2025
bc11f83
Revert "fix(deps): update dependency tailwind-0.0.12 to v0.1.0 (#2143)"
gabrielmfern Apr 18, 2025
caf6297
chore(deps): update dependency sharp to v0.34.1 (#2128)
renovate[bot] Apr 18, 2025
ef5679a
fix(deps): update dependency vaul to v1.1.2 (#2117)
renovate[bot] Apr 18, 2025
08e3416
chore(deps): update dependency @lottiefiles/dotlottie-react to v0.13.…
renovate[bot] Apr 18, 2025
95161f0
chore(deps): update dependency @vercel/style-guide to v5.2.0 (#2122)
renovate[bot] Apr 18, 2025
373ac1a
chore(deps): update dependency @vitejs/plugin-react to v4.4.0 (#2123)
renovate[bot] Apr 18, 2025
d223bbe
chore(deps): update dependency happy-dom to v15.11.7 (#2124)
renovate[bot] Apr 18, 2025
2195a22
chore(deps): update dependency shelljs to v0.9.2 (#2129)
renovate[bot] Apr 18, 2025
c1bdc95
chore(deps): update dependency tsx to v4.19.3 (#2132)
renovate[bot] Apr 18, 2025
4ceaaea
chore(deps): update dependency jsdom to v23.2.0 (#2125)
renovate[bot] Apr 18, 2025
f9c6e70
chore(deps): update dependency tailwind-merge to v2.6.0 (#2131)
renovate[bot] Apr 18, 2025
e1f5c1b
fix(deps): update dependency react-email-2.1.7-canary.2 to v4 (#2169)
renovate[bot] Apr 19, 2025
3f053c9
chore(deps): update dependency postcss-selector-parser to v6.1.2 (#2127)
renovate[bot] Apr 19, 2025
81ba0e6
chore(deps): update dependency source-map-js to v1.2.1 (#2130)
renovate[bot] Apr 19, 2025
ff2ba66
chore(deps): update dependency vite-plugin-dts to v4.5.3 (#2134)
renovate[bot] Apr 19, 2025
6d7cef1
fix(deps): update dependency framer-motion to v12.7.4 (#2139)
renovate[bot] Apr 19, 2025
1163b61
chore(deps): update dependency webpack to v5.99.6 (#2135)
renovate[bot] Apr 19, 2025
661d2d9
fix(deps): update dependency @vercel/analytics to v1.5.0 (#2138)
renovate[bot] Apr 19, 2025
53f18cc
fix(deps): update dependency mintlify to v4.0.494 (#2115)
renovate[bot] Apr 19, 2025
fbd207c
fix(deps): update dependency @react-email/components to v0.0.36 (#2114)
renovate[bot] Apr 19, 2025
9590a83
chore(deps): update radix-ui-primitives monorepo (#2113)
renovate[bot] Apr 19, 2025
403fd78
chore(deps): update dependency socket.io-client to v4.8.1 (#2109)
renovate[bot] Apr 19, 2025
adeaf08
chore(deps): update dependency @vitejs/plugin-react to v4.4.1 (#2174)
renovate[bot] Apr 19, 2025
bd58fa9
fix(text): Priority of margin properties given by `style` not kept (…
gabrielmfern Apr 21, 2025
cbe8113
chore(root): Version packages (canary) (#2175)
github-actions[bot] Apr 21, 2025
1e0a99a
chore(deps): update dependency postcss to v8.5.3 (#2126)
renovate[bot] Apr 22, 2025
a5fc35a
chore(react-email): Add console.error on uncaught exceptions
gabrielmfern Apr 22, 2025
6168b65
add missing function call
gabrielmfern Apr 22, 2025
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/big-dots-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Add .json import support for hot reloading
5 changes: 5 additions & 0 deletions .changeset/bright-berries-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-email": minor
---

Fetch react-email package versions at runtime from `--tag` option
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [["react-email-starter", "create-email"]],
"linked": [],
"access": "public",
"baseBranch": "main",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/dirty-needles-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": minor
---

Theme switcher for email template
5 changes: 5 additions & 0 deletions .changeset/eleven-plums-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Ensure dependencies outside emails directory are completely resolved
5 changes: 5 additions & 0 deletions .changeset/eleven-wombats-make.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Fix dependent of dependents not causing hot reloads
5 changes: 5 additions & 0 deletions .changeset/famous-years-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

fix backwards compatibility with `render` versions
5 changes: 5 additions & 0 deletions .changeset/great-parrots-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/tailwind": minor
---

Extract tailwind pseudo classes to stylesheet
5 changes: 5 additions & 0 deletions .changeset/plenty-camels-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/text": patch
---

Fix priority of margin styles not being kept
52 changes: 52 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"mode": "pre",
"tag": "canary",
"initialVersions": {
"demo": "0.0.0",
"docs": "0.0.0",
"web": "0.0.0",
"@benchmarks/preview-server": "0.0.0",
"@benchmarks/tailwind-component": "0.0.0",
"@react-email/body": "0.0.11",
"@react-email/button": "0.0.19",
"@react-email/code-block": "0.0.12",
"@react-email/code-inline": "0.0.5",
"@react-email/column": "0.0.13",
"@react-email/components": "0.0.36",
"@react-email/container": "0.0.15",
"create-email": "1.0.7",
"react-email-starter": "1.0.7",
"@react-email/font": "0.0.9",
"@react-email/head": "0.0.12",
"@react-email/heading": "0.0.15",
"@react-email/hr": "0.0.11",
"@react-email/html": "0.0.11",
"@react-email/img": "0.0.11",
"@react-email/link": "0.0.12",
"@react-email/markdown": "0.0.14",
"@react-email/preview": "0.0.12",
"react-email": "4.0.6",
"@react-email/render": "1.0.6",
"@react-email/row": "0.0.12",
"@react-email/section": "0.0.16",
"@react-email/tailwind": "1.0.4",
"@react-email/text": "0.1.1",
"tsconfig": "0.0.0"
},
"changesets": [
"big-dots-refuse",
"bright-berries-end",
"dirty-needles-chew",
"eleven-plums-type",
"eleven-wombats-make",
"famous-years-knock",
"great-parrots-yell",
"plenty-camels-switch",
"salty-hoops-join",
"six-parts-jam",
"strong-peas-kneel",
"stupid-lights-run",
"wet-guests-share",
"wet-planes-camp"
]
}
8 changes: 8 additions & 0 deletions .changeset/salty-hoops-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"react-email": patch
"@react-email/code-block": patch
"@react-email/markdown": patch
"@react-email/render": patch
---

Use range of versions for dependencies
5 changes: 5 additions & 0 deletions .changeset/six-parts-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Fix non-email files being rendered during hot reloading
5 changes: 5 additions & 0 deletions .changeset/strong-peas-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/render": minor
---

Deprecate the `pretty` option for `render` in favor of standalone `pretty` function
5 changes: 5 additions & 0 deletions .changeset/stupid-lights-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-email": patch
---

Show package.json's version on --version for create-email
5 changes: 5 additions & 0 deletions .changeset/wet-guests-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/tailwind": patch
---

Fix multiple variables in the same declaration not being replaced properly
5 changes: 5 additions & 0 deletions .changeset/wet-planes-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-email": patch
---

Add error message for when an email template does not have a default export
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: buildjet-4vcpu-ubuntu-2204
container:
image: node:22
steps:
- name: Checkout
uses: actions/checkout@v4
- name: pnpm setup
uses: pnpm/action-setup@v4
- name: pnpm Cache
uses: buildjet/cache@v4
with:
path: |
~/.pnpm-store
node_modules
*/*/node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install packages
if: steps.pnpm-cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Run Lint
run: pnpm lint
env:
SKIP_ENV_VALIDATION: true
63 changes: 63 additions & 0 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: rsnd

on:
push:
branches:
- canary

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: release canary
runs-on: buildjet-4vcpu-ubuntu-2204
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Enable Corepack
id: pnpm-setup
run: |
corepack enable
corepack prepare [email protected] --activate
pnpm config set script-shell "/usr/bin/bash"

- name: pnpm Cache
uses: buildjet/cache@v4
with:
path: |
~/.pnpm-store
node_modules
*/*/node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: Install packages
if: steps.pnpm-cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile

- name: Enter prerelease mode
# This step errors if it is already in prerelease mode
continue-on-error: true
run: pnpm canary:enter

- name: Create Release Pull Request
uses: changesets/action@v1
with:
version: pnpm run version
publish: pnpm run release
title: "chore(root): Version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
75 changes: 1 addition & 74 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,6 @@ jobs:

- name: Run Build
run: pnpm build

lint:
runs-on: buildjet-4vcpu-ubuntu-2204
needs: [build]
container:
image: node:22
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
run: |
corepack enable
corepack prepare [email protected] --activate

- name: Restore dependencies
uses: buildjet/cache@v4
with:
path: |
~/.pnpm-store
node_modules
*/*/node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: turborepo Cache
uses: buildjet/cache@v4
with:
path: |
.turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Run Build
run: pnpm build

- name: Run Lint
run: pnpm lint

test:
runs-on: buildjet-4vcpu-ubuntu-2204
needs: [build]
Expand Down Expand Up @@ -134,38 +95,4 @@ jobs:
uses: actions/checkout@v4

- name: Check for pinned dependencies
run: |
node -e '
const fs = require("fs");
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
const errors = [];

function isPinned(version) {
if (version.startsWith("workspace:")) {
return true;
}
if (version.startsWith("npm:")) {
return true;
}
return /^\d+\.\d+\.\d+$|^[a-z]+:[a-z]+@\d+$/.test(version);
}

for (const [dep, version] of Object.entries(pkg.dependencies || {})) {
if (!isPinned(version)) {
errors.push(`Dependency "${dep}" is not pinned: "${version}"`);
}
}

for (const [dep, version] of Object.entries(pkg.devDependencies || {})) {
if (!isPinned(version)) {
errors.push(`Dev dependency "${dep}" is not pinned: "${version}"`);
}
}

if (errors.length > 0) {
console.error(`\n${errors.join("\n")}\n`);
process.exit(1);
} else {
console.log("All dependencies are pinned.");
}
'
run: npx tsx ./scripts/check-dependency-versions.ts
6 changes: 5 additions & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- canary

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand Down Expand Up @@ -48,6 +47,11 @@ jobs:
if: steps.pnpm-cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile

- name: Exit prerelease mode
# This step errors if it is not in prerelease mode
continue-on-error: true
run: pnpm canary:exit

- name: Create Release Pull Request
uses: changesets/action@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ node_modules

# testing
coverage
package-lock.json
**/*/package-lock.json
**/*/yalc.lock

# next.js
.next/
Expand Down
Loading