Skip to content

dev: Revert mjml from 5.4.0 to 4.18.0#7978

Closed
nicholaspcr wants to merge 1 commit into
v3.36from
fix/revert-mjml-5
Closed

dev: Revert mjml from 5.4.0 to 4.18.0#7978
nicholaspcr wants to merge 1 commit into
v3.36from
fix/revert-mjml-5

Conversation

@nicholaspcr

Copy link
Copy Markdown
Contributor

Summary

Reverts the dependabot bump of mjml 4.18.05.4.0 (#7956), which broke the generated email template CI check (mage go:generate diff check).

Root cause: MJML v5 disabled mj-include by default for security. Our pkg/email/templates/generate.sh invokes yarn run mjml … without --config.allowIncludes true, so under v5 the _attributes.mjml, _header.mjml and _footer.mjml includes were silently dropped. Without _attributes.mjml, MJML fell back to its default Ubuntu 13px config and regenerated base.html.tmpl without the Lato font, header, footer, box-shadow and code styles — so the committed (MJML 4) template no longer matched a fresh regeneration on CI.

Pinning back to 4.18.0 restores the exact dependency tree that produced the committed templates. go generate now reproduces base.html.tmpl byte-for-byte and the golden-file tests pass.

Changes

  • package.json: mjml ^5.4.0^4.18.0
  • yarn.lock: regenerated (removes the MJML v5 subtree)

Test plan

  • go test ./pkg/email/templates/ passes (golden-file comparison)
  • Regenerating base.html.tmpl with the pinned mjml produces no diff
  • CI generated-file check passes

Follow-up

Adopting MJML v5 later requires adding --config.allowIncludes true to generate.sh, then regenerating base.html.tmpl and all testdata/*.golden.html files. Dependabot will re-propose the v5 bump; consider an ignore entry for the mjml major until the migration is done.

MJML v5 disabled mj-include by default, so `go generate` dropped the
_attributes/_header/_footer includes and regenerated base.html.tmpl
with MJML's default Ubuntu config, breaking the generated-file CI check.
Pin back to 4.18.0 until the templates are migrated to v5.
@nicholaspcr
nicholaspcr requested a review from a team as a code owner July 22, 2026 16:09
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Jul 22, 2026
@nicholaspcr

Copy link
Copy Markdown
Contributor Author

Closed in favor of #7979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant