Skip to content

Commit 2752aac

Browse files
authored
Merge branch 'main' into logical-seq
2 parents 29230cb + cb8d3bf commit 2752aac

File tree

646 files changed

+112910
-10590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

646 files changed

+112910
-10590
lines changed

.changeset/config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
5-
"fixed": [
6-
["react-email-starter", "create-email"]
7-
],
5+
"fixed": [["react-email-starter", "create-email"]],
86
"linked": [],
97
"access": "public",
108
"baseBranch": "main",

.github/workflows/bump-canary.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
- name: Checkout Repo
1616
uses: actions/checkout@v4
1717

18-
- name: Setup Node.js 20
18+
- name: Setup Node.js 22
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: 20
21+
node-version: 22
2222

2323
- name: Enable Corepack
2424
id: pnpm-setup
2525
run: |
2626
corepack enable
27-
corepack prepare pnpm@latest --activate
27+
corepack prepare pnpm@9.15.0 --activate
2828
pnpm config set script-shell "/usr/bin/bash"
2929
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
3030

.github/workflows/bump-stable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
- name: Checkout Repo
1616
uses: actions/checkout@v4
1717

18-
- name: Setup Node.js 20
18+
- name: Setup Node.js 22
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: 20
21+
node-version: 22
2222

2323
- name: Enable Corepack
2424
id: pnpm-setup
2525
run: |
2626
corepack enable
27-
corepack prepare pnpm@latest --activate
27+
corepack prepare pnpm@9.15.0 --activate
2828
pnpm config set script-shell "/usr/bin/bash"
2929
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
3030

.github/workflows/tests.yml

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,10 @@ on:
55
- main
66
pull_request:
77
jobs:
8-
format:
9-
runs-on: buildjet-4vcpu-ubuntu-2204
10-
container:
11-
image: node:18
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v4
15-
16-
- name: Enable Corepack
17-
id: pnpm-setup
18-
run: |
19-
corepack enable
20-
corepack prepare pnpm@latest --activate
21-
pnpm config set script-shell "/usr/bin/bash"
22-
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
23-
24-
- name: pnpm Cache
25-
uses: buildjet/cache@v4
26-
with:
27-
path: ${{ steps.pnpm-setup.outputs.pnpm_cache_dir }}
28-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
29-
restore-keys: |
30-
${{ runner.os }}-pnpm-store-
31-
32-
- name: Install packages
33-
run: pnpm install --frozen-lockfile
34-
35-
- name: Run Format Check
36-
run: pnpm format:check
37-
38-
test:
8+
lint:
399
runs-on: buildjet-4vcpu-ubuntu-2204
4010
container:
41-
image: node:18
11+
image: node:22
4212
steps:
4313
- name: Checkout
4414
uses: actions/checkout@v4
@@ -47,7 +17,7 @@ jobs:
4717
id: pnpm-setup
4818
run: |
4919
corepack enable
50-
corepack prepare pnpm@latest --activate
20+
corepack prepare pnpm@9.15.0 --activate
5121
pnpm config set script-shell "/usr/bin/bash"
5222
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
5323
@@ -65,13 +35,13 @@ jobs:
6535
- name: Run Build
6636
run: pnpm build
6737

68-
- name: Run Tests
69-
run: pnpm test
38+
- name: Run Lint
39+
run: pnpm lint
7040

71-
lint:
41+
test:
7242
runs-on: buildjet-4vcpu-ubuntu-2204
7343
container:
74-
image: node:18
44+
image: node:22
7545
steps:
7646
- name: Checkout
7747
uses: actions/checkout@v4
@@ -80,7 +50,7 @@ jobs:
8050
id: pnpm-setup
8151
run: |
8252
corepack enable
83-
corepack prepare pnpm@latest --activate
53+
corepack prepare pnpm@9.15.0 --activate
8454
pnpm config set script-shell "/usr/bin/bash"
8555
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
8656
@@ -98,13 +68,16 @@ jobs:
9868
- name: Run Build
9969
run: pnpm build
10070

101-
- name: Run Lint
102-
run: pnpm lint
71+
- name: Run Tests
72+
run: pnpm test
73+
env:
74+
SPAM_ASSASSIN_HOST: ${{ secrets.SPAM_ASSASSIN_HOST }}
75+
SPAM_ASSASSIN_PORT: ${{ secrets.SPAM_ASSASSIN_PORT }}
10376

10477
build:
10578
runs-on: buildjet-4vcpu-ubuntu-2204
10679
container:
107-
image: node:18
80+
image: node:22
10881
steps:
10982
- name: Checkout
11083
uses: actions/checkout@v4
@@ -113,7 +86,7 @@ jobs:
11386
id: pnpm-setup
11487
run: |
11588
corepack enable
116-
corepack prepare pnpm@latest --activate
89+
corepack prepare pnpm@9.15.0 --activate
11790
pnpm config set script-shell "/usr/bin/bash"
11891
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
11992

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
1-
## Contributing
1+
Thank you for considering contributing to React Email.
22

3-
Wanna help? Awesome! There are many ways you can contribute.
3+
We've created this guide to help you better understand how to contribute to the project, even if you've never contributed to an open source project before.
44

5-
## Improving the docs
5+
## How to report bugs
66

7-
Documentation is extremely important and takes a fair deal of time and effort to write and keep updated. Everything is written in Markdown to facilitate the process of contributing.
7+
To report a bug, please first read our guide on [opening issues](https://react.email/docs/contributing/opening-issues).
88

9-
## Building new components
9+
## How to contribute code
1010

11-
We’re open to expanding the catalog of components to cover as many use cases as possible. We suggest to open an issue for discussion first to make sure your idea is aligned with the project goals.
11+
To open a pull request, please first read our guide on [opening pull requests](https://react.email/docs/contributing/opening-pull-requests), which outlines our process for RFCs and pull requests.
1212

13-
## Opening issues
13+
### Codebase overview
14+
If you need help getting familiar with our codebase, we recommend reading our [Codebase overview guide](https://react.email/docs/contributing/codebase-overview).
1415

15-
Open an issue to report bugs or to propose new features.
16+
### Development workflow guide
17+
We have also created a Development workflow guide to help you get familiar with the development workflow for React Email. It includes instructions for:
18+
1. [Setting up your development environment](https://react.email/docs/contributing/development-workflow/1-setup)
19+
2. [Running tests](https://react.email/docs/contributing/development-workflow/2-running-tests)
20+
3. [Linting](https://react.email/docs/contributing/development-workflow/3-linting)
21+
4. [Building](https://react.email/docs/contributing/development-workflow/4-building)
22+
5. [Writing documentation](https://react.email/docs/contributing/development-workflow/5-writing-docs)
1623

17-
**- Reporting bugs:**
18-
describe the bug as clearly as you can, including steps to reproduce, what happened and what you were expecting to happen. Also include browser version, OS and other related software’s (npm, Node.js, etc) versions when applicable.
19-
20-
**- Suggesting features:** explain the proposed feature, what it should do, why it is useful, how users should use it. Give us as much info as possible so it will be easier to discuss, access and implement the proposed feature. When you’re unsure about a certain aspect of the feature, feel free to leave it open for others to discuss and find an appropriate solution.
21-
22-
## Proposing pull requests
23-
24-
Pull requests are very welcome. Note that if you are going to propose drastic changes, be sure to open an issue for discussion first, to make sure that your PR will be accepted before you spend effort coding it.
25-
26-
**- Forking the repository:** clone it locally and create a branch for your proposed bug fix or new feature. Avoid working directly on the main branch.
27-
28-
**- Making changes:** implement your bug fix or feature, write tests to cover it and make sure all tests are passing. Then commit your changes, push your bug fix/feature branch to the origin (your forked repo) and open a pull request to the upstream (the repository you originally forked)‘s main branch.

apps/demo/emails/magic-links/aws-verify-email.tsx

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,24 @@ import {
1010
Preview,
1111
Section,
1212
Text,
13-
} from "@react-email/components";
14-
import * as React from "react";
13+
} from '@react-email/components';
1514

1615
interface AWSVerifyEmailProps {
1716
verificationCode?: string;
1817
}
1918

2019
const baseUrl = process.env.VERCEL_URL
2120
? `https://${process.env.VERCEL_URL}`
22-
: "";
21+
: '';
2322

2423
export default function AWSVerifyEmail({
25-
verificationCode = "596853",
24+
verificationCode,
2625
}: AWSVerifyEmailProps) {
2726
return (
2827
<Html>
2928
<Head />
30-
<Preview>AWS Email Verification</Preview>
3129
<Body style={main}>
30+
<Preview>AWS Email Verification</Preview>
3231
<Container style={container}>
3332
<Section style={coverSection}>
3433
<Section style={imageSection}>
@@ -68,11 +67,11 @@ export default function AWSVerifyEmail({
6867
This message was produced and distributed by Amazon Web Services,
6968
Inc., 410 Terry Ave. North, Seattle, WA 98109. © 2022, Amazon Web
7069
Services, Inc.. All rights reserved. AWS is a registered trademark
71-
of{" "}
70+
of{' '}
7271
<Link href="https://amazon.com" target="_blank" style={link}>
7372
Amazon.com
7473
</Link>
75-
, Inc. View our{" "}
74+
, Inc. View our{' '}
7675
<Link href="https://amazon.com" target="_blank" style={link}>
7776
privacy policy
7877
</Link>
@@ -84,89 +83,93 @@ export default function AWSVerifyEmail({
8483
);
8584
}
8685

86+
AWSVerifyEmail.PreviewProps = {
87+
verificationCode: '596853',
88+
} satisfies AWSVerifyEmailProps;
89+
8790
const main = {
88-
backgroundColor: "#fff",
89-
color: "#212121",
91+
backgroundColor: '#fff',
92+
color: '#212121',
9093
};
9194

9295
const container = {
93-
padding: "20px",
94-
margin: "0 auto",
95-
backgroundColor: "#eee",
96+
padding: '20px',
97+
margin: '0 auto',
98+
backgroundColor: '#eee',
9699
};
97100

98101
const h1 = {
99-
color: "#333",
102+
color: '#333',
100103
fontFamily:
101104
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
102-
fontSize: "20px",
103-
fontWeight: "bold",
104-
marginBottom: "15px",
105+
fontSize: '20px',
106+
fontWeight: 'bold',
107+
marginBottom: '15px',
105108
};
106109

107110
const link = {
108-
color: "#2754C5",
111+
color: '#2754C5',
109112
fontFamily:
110113
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
111-
fontSize: "14px",
112-
textDecoration: "underline",
114+
fontSize: '14px',
115+
textDecoration: 'underline',
113116
};
114117

115118
const text = {
116-
color: "#333",
119+
color: '#333',
117120
fontFamily:
118121
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
119-
fontSize: "14px",
120-
margin: "24px 0",
122+
fontSize: '14px',
123+
margin: '24px 0',
121124
};
122125

123126
const imageSection = {
124-
backgroundColor: "#252f3d",
125-
display: "flex",
126-
padding: "20px 0",
127-
alignItems: "center",
128-
justifyContent: "center",
127+
backgroundColor: '#252f3d',
128+
display: 'flex',
129+
padding: '20px 0',
130+
alignItems: 'center',
131+
justifyContent: 'center',
129132
};
130133

131-
const coverSection = { backgroundColor: "#fff" };
134+
const coverSection = { backgroundColor: '#fff' };
132135

133-
const upperSection = { padding: "25px 35px" };
136+
const upperSection = { padding: '25px 35px' };
134137

135-
const lowerSection = { padding: "25px 35px" };
138+
const lowerSection = { padding: '25px 35px' };
136139

137140
const footerText = {
138141
...text,
139-
fontSize: "12px",
140-
padding: "0 20px",
142+
fontSize: '12px',
143+
padding: '0 20px',
141144
};
142145

143146
const verifyText = {
144147
...text,
145148
margin: 0,
146-
fontWeight: "bold",
147-
textAlign: "center" as const,
149+
fontWeight: 'bold',
150+
textAlign: 'center' as const,
148151
};
149152

150153
const codeText = {
151154
...text,
152-
fontWeight: "bold",
153-
fontSize: "36px",
154-
margin: "10px 0",
155-
textAlign: "center" as const,
155+
fontWeight: 'bold',
156+
fontSize: '36px',
157+
margin: '10px 0',
158+
textAlign: 'center' as const,
156159
};
157160

158161
const validityText = {
159162
...text,
160-
margin: "0px",
161-
textAlign: "center" as const,
163+
margin: '0px',
164+
textAlign: 'center' as const,
162165
};
163166

164167
const verificationSection = {
165-
display: "flex",
166-
alignItems: "center",
167-
justifyContent: "center",
168+
display: 'flex',
169+
alignItems: 'center',
170+
justifyContent: 'center',
168171
};
169172

170-
const mainText = { ...text, marginBottom: "14px" };
173+
const mainText = { ...text, marginBottom: '14px' };
171174

172-
const cautionText = { ...text, margin: "0px" };
175+
const cautionText = { ...text, margin: '0px' };

0 commit comments

Comments
 (0)