Upgrade mjml v5.2.1 - #1
Open
Srekaravarshan wants to merge 58 commits into
Open
Conversation
Added or updated attributes across several packages that were missing or inconsistent - gave border-radius consistent input across all packages - updated inner-padding attributes of mj-hero and fixed an Outlook issue with width/padding - updated all docs to reflect changes
- Updated all instances of border-radius to accept string to be consistent across all packages and to allow valid input like '100px 50px 100px 50px / 50px 50px 50px 50px'
- “Loose” warnings: Resolved by aligning plugin options in webpack.config.js. Other warnings: Suppressed when running yarn build:quiet in mjml-browser.
- Fixes fs.Stats deprecation warning during mjml-browser build by updating Babel. - Moved skeleton loading from index.js into a node-only helper skeleton-loader.js to keep require() out of the browser bundle. - Added aliases in webpack.config.js to point core’s node-only/skeleton-loader at a browser stub skeleton-loader.js, eliminating critical dependency warning.
- Removed lodash from the plugins array in babel.config.js to prevent deprecated isModuleDeclaration and replaced with a method-level import in cleanNode.js - Updated testing to remove dependency cycles
chore(mjml build): various warnings addressed
chore(mjml-browser): address build warnings
…-dependency bugfix(cssnano): moved preset dependency to mjml-core
- This option allows you to specify include folders outside of your filePath whilst maintaining the sandbox security - Updated docs Fixes #3018
- Added traversal test - Removed uneeded test
- Added fullyDecode() loop to decode double/triple-encoded include paths - Early reject includes with null bytes, absolute paths, UNC paths, or Windows drive letters. - Move decoding into handleInclude() and handleCssHtmlInclude() . avoid event-time decode; support only mjml, html and css - Added testing - Updated docs
…g-for-consistency bugfix(attributes): adding/updating various for consistency
…-allowIncludes-option feature(ignoreIncludes): added option for includePath
Add Node.js version 24.x to workflow matrix
migrates mjml-core and mjml-parser-xml from Node to Mocha, aligning with the existing Mocha-based testing style in the repo.
- Switches the cssnano “lite” preset from a string to the actual preset module - Adds normalizeMinifyCssOption() to keep backward compatibility - Updates legacy minifyCSS → minifyCss mapping
- added browser mock for cssnano-preset-lite - ensured ascii_only output in minimizer - created a smoke-test for the browser and added to CI build
…css-prettier chore(dependencies): Prettier, htmlnano, cssnano, postCSS
chore/convert tests to use mocha
docs(mjml5): updated README and other documentation
docs(mjml5): updated sinch logo / removed translations
MJML5.0 Replace html-minifier and js-beautify
docs(mjml): updated README.md
- The call to beautify took 500ms for big MJML document since we were using Prettier instead of 15ms with js-beautify. We can't go back to js-beautify because of security issues so we are now using Biome (with its WASM Node.js port) to beautify the HTML file. Biome creates a file in memory, not on the disk. - Still uses prettier for the beautify option of mjml-browser. - Add beautify unit tests.
- Use the same code as the minification one to sanitize variables before the beautify process. - Async import prettier for mjml-browser.
- DO not check HTML for validity when beautifying the content because mj-raw can insert content before the DOCTYPE.
- Beautify path improvements including adding support for template-syntax sanitization and <!-- htmlmin:ignore --> markers - Updated options for Biome formatter and added support for <mj-raw position="file-start"> - htmlmin:ignore re-implemented for htmlnano - string→boolean normalisation for allowMixedSyntax in CLI - Updated mjml-browser bundle - Updates to docs and automated testing
- renamed htmlminIgnoreMap to htmlminIgnoreList
- removed the if (content.includes('htmlmin:ignore')) guard
…-support bugfix(core): additional beautify support
…tier-is-long Bugfix/beautification using prettier is long
- Replace Biome/Prettier runtime beautification paths with js-beautify in mjml-core (Node and browser paths aligned). - Simplify Node formatter implementation and keep file-start raw prefix handling before doctype. - Update mjml-browser bundling to support js-beautify transpilation and remove unused uglify-js/path browser mock artifacts. - Updated beautify testing - Updated documentation Co-authored-by: Copilot <copilot@github.com>
- Extracted js-beautify HTML formatting into a shared helper used by both Node and browser build. - removed obsolete node-only formatter module and browser mock/alias - add a Twig regression test Co-authored-by: Copilot <copilot@github.com>
…autify refactor(core,browser): switch beautification to js-beautify
- Replace the watcher’s synchronous compile pipeline with an explicit async flow so watch mode works with the v5 async mjml2html API. - Add CLI regression coverage for watch mode with and without --output, including recompilation after file changes. Fixes: #3083
…ation-in-v5 bugfix(mjml-cli): handle async watch compilation in v5
- Updated CSS to fix an issue whereby the accordion was closed in all versions of new Outlook Fixes: #3086
…ld-in-new-outlook bugfix(mjml-accordion): mj-accordion closed in new Outlook
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.
No description provided.