Skip to content

build(deps): Bump mjml from 4.18.0 to 5.0.0 in /scripts - #653

Merged
jdrouet merged 3 commits into
mainfrom
dependabot/npm_and_yarn/scripts/mjml-5.0.0
Jul 30, 2026
Merged

build(deps): Bump mjml from 4.18.0 to 5.0.0 in /scripts#653
jdrouet merged 3 commits into
mainfrom
dependabot/npm_and_yarn/scripts/mjml-5.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 29, 2026

Copy link
Copy Markdown
Contributor

Bumps mjml from 4.18.0 to 5.0.0 in /scripts, and aligns mrml's own output with it.

scripts/ generates the expected HTML in packages/mrml-core/resources/compare/, so an mjml major bump is a change to the reference output mrml is tested against. Two follow-up commits adapt to it:

fix(scripts): await async mjml2html for mjml v5 — mjml 5 made mjml2html async (PostCSS/cssnano), so update-resources.js now awaits the result instead of reading .html off a promise.

feat(render): align mj-body and mj-hero output with mjml v5 — this changes rendered output for all mrml users:

  • mj-body: word-spacing:normal now applies to both the <body> tag and the content <div> (previously <body> only), and css-class moves from the content <div> to the <body> tag.
  • mj-hero: the Outlook-only inner table and its width attribute now use the container width minus horizontal padding, rather than the full container width.

All 156 changed comparison fixtures were regenerated; resources check confirms they match mjml 5's output and the mrml-core suite confirms mrml matches the fixtures.


Bumps mjml from 4.18.0 to 5.0.0.

Release notes

Sourced from mjml's releases.

v5.0.0

Upgrade Guide

These are the changes users need to actively consider when upgrading to MJML 5.x.x from MJML 4.x (and early MJML 5 alphas):

Highlights

  • Replaced legacy html-minifier and js-beautify with htmlnano + cssnano. [breaking change]
  • Added templating syntax sanitization (runs before PostCSS and is restored afterwards)
  • Safer, stricter handling of mj-include and ignoreIncludes [breaking change]
  • Restructured outer HTML: the <body> tag is now driven by mj-body, not the global skeleton. [breaking change]
  • mjml-browser build/minification pipeline updated
  • Better attribute consistency across components (including more flexible border-radius). [breaking change]
  • Migration helper removed [breaking change]
  • Updated toolchain: Node 20/22/24 in CI. Removed Node 16/18 [breaking change]

HTML/CSS minification & formatting

What changed

  • HTML minification now uses htmlnano instead of html-minifier.
  • CSS minification now uses cssnano presets wired via mjml-core.
  • Minification options can be added via .mjmlconfig.js

Impact [potential breaking changes]

  • Generated HTML is more aggressively minified. If you rely on exact formatting (e.g. diffing raw HTML, parsing by regex, or checking snapshots), you may see changes.
  • Some obscure html-minifier specific options used in custom tooling will no longer apply; options are now expressed as htmlnano/cssnano configs.
  • Template tags may error in PostCSS (see Template syntax handling and sanitization below)
  • Fixes this issue: mjmlio/mjml#2589

What to do

  • Review any automation that assumes pretty‑printed HTML (tests, diffs, CI snapshot comparisons).
  • If you previously passed minify/beautify flags or custom minifier options, re‑map them to the new htmlnano/cssnano config.

Notes

  • cssnano uses lite preset by default. Due to this issue: mjmlio/mjml#2919. default preset can be used if your fonts don’t contain numerals

More detail: (mjmlio/mjml#2858)


Template syntax handling and sanitization (PostCSS)

What changed

  • Template syntax (e.g. {{ }}) is now sanitized before PostCSS and with syntax restored post-processing.

Impact

  • A CssSyntaxError error will occur when applying CSS minification to files with some template syntax
  • Fixes this issue: mjmlio/mjml#2858

... (truncated)

Commits
  • ddb2335 v5.0.0
  • 9aac8c6 v5.0.0-beta.2
  • 1dfbc95 v5.0.0-beta.1
  • 65e81da v5.0.0-alpha.11
  • 74f3577 Merge pull request #3045 from mjmlio/bugfix/3018-mjml5-ignoreIncludes-allowIn...
  • b8e6a60 Merge pull request #3044 from mjmlio/bugfix/attributes-adding-updating-for-co...
  • 2eb56d7 feature(includes): implemented tighter controls
  • 591fd1e bugfix(ignoreIncludes): updated test files
  • 6b22a67 feature(ignoreIncludes): added option for includePath
  • 9b7991f bugfix(border-radius): accept string input
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jun 29, 2026
@jdrouet-datadog-monitor

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

🚦 1 Pipeline job failed

resources check | resources-check   View in Datadog   GitHub Actions

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ea15f5b | Docs | Give us feedback!

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📈 This is how your metrics evolved 📉


dependabot Bot and others added 3 commits July 30, 2026 09:57
Bumps [mjml](https://github.com/mjmlio/mjml/tree/HEAD/packages/mjml) from 4.18.0 to 5.0.0.
- [Release notes](https://github.com/mjmlio/mjml/releases)
- [Commits](https://github.com/mjmlio/mjml/commits/v5.0.0/packages/mjml)

---
updated-dependencies:
- dependency-name: mjml
  dependency-version: 5.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jeremie Drouet <jeremie.drouet@gmail.com>
Signed-off-by: Jeremie Drouet <jeremie.drouet@gmail.com>
@jdrouet
jdrouet force-pushed the dependabot/npm_and_yarn/scripts/mjml-5.0.0 branch from 575b43a to 991cf96 Compare July 30, 2026 07:58
@jdrouet
jdrouet merged commit be3b055 into main Jul 30, 2026
19 checks passed
@jdrouet
jdrouet deleted the dependabot/npm_and_yarn/scripts/mjml-5.0.0 branch July 30, 2026 08:15
@github-actions github-actions Bot mentioned this pull request Jul 30, 2026
jdrouet added a commit that referenced this pull request Jul 30, 2026
Runs `npm audit fix` in scripts/, bumping four transitive packages:

  brace-expansion  2.1.0  -> 2.1.3
  nanoid           3.3.15 -> 3.3.16
  postcss          8.5.16 -> 8.5.25
  svgo             4.0.1  -> 4.0.2

This clears three high severity advisories:

  GHSA-r28c-9q8g-f849  postcss          path traversal in previous
                                        source map auto-loading
  GHSA-2p49-hgcm-8545  svgo             removeScripts leaves some
                                        executable scripts intact
  GHSA-3jxr-9vmj-r5cp  brace-expansion  DoS via exponential-time
                                        expansion of consecutive
                                        non-expanding {} groups

postcss and svgo arrived with the mjml 5 bump in #653, which pulled in
the PostCSS/cssnano chain.

GHSA-mh99-v99m-4gvg (brace-expansion, patched in 5.0.8) is deliberately
left alone: the chain is mjml -> mjml-cli -> glob/minimatch ->
brace-expansion, and mjml-cli has no release that unpins the vulnerable
range, so this one needs an upstream fix first.

Lockfile-only, and only affects the tooling that regenerates the
comparison fixtures; nothing here ships to users. Regenerating all of
packages/mrml-core/resources/compare/ against the new lockfile produces
byte-identical output, so `resources check` stays green.

Signed-off-by: Jeremie Drouet <jeremie.drouet@gmail.com>
jdrouet added a commit that referenced this pull request Jul 30, 2026
…le (#664)

Runs `npm audit fix` in `scripts/`, bumping four transitive packages:

| package | from | to |
|---|---|---|
| `brace-expansion` | 2.1.0 | 2.1.3 |
| `nanoid` | 3.3.15 | 3.3.16 |
| `postcss` | 8.5.16 | 8.5.25 |
| `svgo` | 4.0.1 | 4.0.2 |

## Advisories cleared

| advisory | package | summary |
|---|---|---|
|
[GHSA-r28c-9q8g-f849](GHSA-r28c-9q8g-f849)
| `postcss` | Path traversal in previous source map auto-loading
(`sourceMappingURL`) leads to arbitrary `.map` file disclosure |
|
[GHSA-2p49-hgcm-8545](GHSA-2p49-hgcm-8545)
| `svgo` | `removeScripts` plugin leaves some executable scripts intact
|
|
[GHSA-3jxr-9vmj-r5cp](GHSA-3jxr-9vmj-r5cp)
| `brace-expansion` | DoS via exponential-time expansion of consecutive
non-expanding `{}` groups |

`postcss` and `svgo` arrived with the mjml 5 bump in #653, which pulled
in the PostCSS/cssnano chain.

## Knowingly left open


[GHSA-mh99-v99m-4gvg](GHSA-mh99-v99m-4gvg)
(`brace-expansion`, patched in 5.0.8) is **not** fixed here. The chain
is `mjml` → `mjml-cli` → `glob`/`minimatch` → `brace-expansion`, and
`mjml-cli` has no release that unpins the vulnerable range — `npm audit`
reports it as `mjml-cli <=5.2.2`. It needs an upstream fix first; `npm
audit fix --force` would only "resolve" it by downgrading mjml.

## Scope and verification

Lockfile-only, and it only affects the tooling that regenerates the
comparison fixtures — nothing here ships to users.

Regenerating the whole of `packages/mrml-core/resources/compare/`
against the new lockfile produces **byte-identical output** (0 files
changed), so `resources check` stays green.

Signed-off-by: Jeremie Drouet <jeremie.drouet@gmail.com>
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 javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant