All PRs must branch from next/v3 and target base next/v3 (not main).
Context
next/v3 intentionally uses caniemail, but the current email check command has obvious placeholder/debug output and is missing main's --use-preview-props option.
Maps to the report:
- Section 2: “email check output/flag parity (caniemail stays)”
- Section 4: “CLI feature exists on both branches but diverges/conflicts”
Scope
- Fix/finish formatting in
packages/jsx-email/src/cli/commands/check.ts:
- Remove placeholder strings and stray debug logging in
formatNotes().
- Make Notes output deterministic (no runtime object logging).
- Add
--use-preview-props to email check on next/v3 (keep caniemail):
- Update
CheckOptionsStruct in packages/jsx-email/src/cli/commands/check.ts.
- Pass
usePreviewProps through to buildTemplates() (mirrors main behavior: 955bffb9).
- Update the
help output to document the flag.
- Add coverage:
- Add a focused unit test for the formatting helpers (or a CLI-level test under
test/cli) to ensure notes + issue grouping prints without placeholders and includes expected lines.
Acceptance criteria (done when)
email check output contains no placeholder/debug text.
email check --use-preview-props ./path/to/template.tsx renders using exported previewProps when present.
- Tests covering the above pass on
next/v3.
Verification
pnpm install
# Build deps used by tests
moon jsx-email:build
moon create-mail:build
moon run :build --query "project~plugin-*"
# Unit/snapshot tests
FORCE_COLOR=1 moon jsx-email:test
# CLI suite
moon test-cli:test.run
All PRs must branch from
next/v3and target basenext/v3(notmain).Context
next/v3intentionally usescaniemail, but the currentemail checkcommand has obvious placeholder/debug output and is missingmain's--use-preview-propsoption.Maps to the report:
Scope
packages/jsx-email/src/cli/commands/check.ts:formatNotes().--use-preview-propstoemail checkonnext/v3(keep caniemail):CheckOptionsStructinpackages/jsx-email/src/cli/commands/check.ts.usePreviewPropsthrough tobuildTemplates()(mirrorsmainbehavior:955bffb9).helpoutput to document the flag.test/cli) to ensure notes + issue grouping prints without placeholders and includes expected lines.Acceptance criteria (done when)
email checkoutput contains no placeholder/debug text.email check --use-preview-props ./path/to/template.tsxrenders using exportedpreviewPropswhen present.next/v3.Verification