fix(trigger): use @react-email/render v2 to fix renderToPipeableStream error#4084
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Updates Reviewed by Cursor Bugbot for commit b80532b. Configure here. |
Greptile SummaryThis PR fixes a Confidence Score: 5/5Safe to merge — targeted import fix with no logic changes and no new issues introduced. All three files contain only the corrected import source and/or the trimmed build config entry. All render() call sites already used await, making them fully compatible with the v2 async API. No custom rule violations found. No files require special attention.
|
| Filename | Overview |
|---|---|
| apps/sim/components/emails/render.ts | Import source for render changed from @react-email/components to @react-email/render; all call sites already use await render(...) matching the v2 async API. |
| apps/sim/lib/billing/webhooks/invoices.ts | Same import source fix applied; usage of await render(...) is consistent with the v2 async API. No other logic changes. |
| apps/sim/trigger.config.ts | Removed @react-email/components from additionalPackages; @react-email/render (already present) remains, which is all that's needed. |
Sequence Diagram
sequenceDiagram
participant T as Trigger.dev Task
participant R as render.ts / invoices.ts
participant RE as @react-email/render v2
participant E as Email Component
T->>R: call renderXxxEmail(params)
R->>E: construct JSX element
R->>RE: await render(element)
RE-->>R: Promise<string> (HTML)
R-->>T: HTML string
T->>T: sendEmail({ html })
Reviews (1): Last reviewed commit: "fix(trigger): use @react-email/render v2..." | Re-trigger Greptile
Summary
renderfrom@react-email/render(v2.0.0) instead of@react-email/components(which uses a nested v1.0.5 with broken CJS/ESM interop)@react-email/componentsfrom Trigger.devadditionalPackagesreactDOMServer.renderToPipeableStream is not a functionerror in lifecycle email taskType of Change
Testing
Tested manually
Checklist