dev: Revert mjml from 5.4.0 to 4.18.0#7978
Closed
nicholaspcr wants to merge 1 commit into
Closed
Conversation
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.
3 tasks
Contributor
Author
|
Closed in favor of #7979 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverts the dependabot bump of
mjml4.18.0→5.4.0(#7956), which broke the generated email template CI check (mage go:generatediff check).Root cause: MJML v5 disabled
mj-includeby default for security. Ourpkg/email/templates/generate.shinvokesyarn run mjml …without--config.allowIncludes true, so under v5 the_attributes.mjml,_header.mjmland_footer.mjmlincludes were silently dropped. Without_attributes.mjml, MJML fell back to its default Ubuntu 13px config and regeneratedbase.html.tmplwithout 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.0restores the exact dependency tree that produced the committed templates.go generatenow reproducesbase.html.tmplbyte-for-byte and the golden-file tests pass.Changes
package.json:mjml^5.4.0→^4.18.0yarn.lock: regenerated (removes the MJML v5 subtree)Test plan
go test ./pkg/email/templates/passes (golden-file comparison)base.html.tmplwith the pinned mjml produces no diffFollow-up
Adopting MJML v5 later requires adding
--config.allowIncludes truetogenerate.sh, then regeneratingbase.html.tmpland alltestdata/*.golden.htmlfiles. Dependabot will re-propose the v5 bump; consider anignoreentry for the mjml major until the migration is done.