Update dependency html-minifier-next to v5 #190
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.
This PR contains the following updates:
^4.17.0→^5.0.0Release Notes
j9t/html-minifier-next (html-minifier-next)
v5.0.3Compare Source
Fixed
idattributes being incorrectly removed whenremoveEmptyElementswas enabled (elements with IDs must be preserved as they serve as navigation targets, JavaScript selectors, and accessibility landmarks)v5.0.2Compare Source
Fixed
removeEmptyElementswas enabled (foreign content is now excluded from empty element removal; HTML content inside<foreignObject>and<annotation-xml>is correctly processed as HTML)parseRegExpnot extracting flags from regex strings (e.g.,/pattern/ginow correctly creates a case-insensitive global regex)Internal
parseRegExpbetween CLI, library, and web demo into shared modules (src/lib/option-definitions.js,src/lib/utils.js)v5.0.1Compare Source
Fixed
<tbody>(and other table section) start tags being incorrectly stripped whenremoveOptionalTagsandincludeAutoGeneratedTags: false(new default) were both activev5.0.0Compare Source
Added
-I(--input-dir),-O(--output-dir),-X(--ignore-dir),-f(--file-ext),-p(--preset)customAttrAssign,customAttrCollapse,ignoreCustomComments, andinlineCustomElementsoptions to the web demoChanged
[The following reads more complicated than it is. Consider going through the brief upgrade guide.]
--input-dir) now defaults to processing only.html,.htm,.xhtml, and.shtmlfiles instead of all files--file-ext='*'; to process specific extensions, use--file-ext=html,php,twig(replaces defaults)fileExtin your config or specify extensions for--file-extincludeAutoGeneratedTagsnow defaults tofalse, that is, the minifier no longer inserts closing tags that weren’t in the source (e.g., auto-generated</p>,</option>)includeAutoGeneratedTags: truein your config or pass--include-auto-generated-tagshtml5option; “HTML5” parsing is now always active, and the legacy HTML 4 inline/block nesting mode no longer availablehtml5: truefrom your config (it’s now the only behavior); if you relied onhtml5: false, review your output for changes in element nestingsortClassNamewas renamed tosortClassNamessortClassName, rename tosortClassNamesconservativeandcomprehensivepresetsconservative: AddedcaseSensitive,processConditionalComments; removedcontinueOnParseError,decodeEntities,minifyURLs,noNewlinesBeforeTagClosecomprehensive: AddedcollapseAttributeWhitespace; removedcaseSensitive,noNewlinesBeforeTagClose,sortAttributes,sortClassNames{ preset: 'conservative', decodeEntities: true })relateurldependency with a built-in URL minifier using Node’s WHATWGURLAPIminifyURLsoption still acceptstrue, a string (site URL),{ site: '…' }, or a custom functionremoveAuth,removeEmptyQueries,ignore_www,schemeRelative) are no longer supportedminifyURLs: { site: '…', removeAuth: true, … }, remove unsupported properties; onlysiteis acceptedchange-casedependency with inline case conversion for CLI option namesPerformance
yflag) regex matching in the HTML parser, reducing memory allocations on large inputsInternal
v4.19.1Compare Source
Changed
CI=trueenvironment variable detection for cache size defaults; usecacheCSS/cacheJSoptions orHMN_CACHE_CSS/HMN_CACHE_JSenvironment variables insteadFixed
{ preset: 'comprehensive' }instead ofgetPreset()v4.19.0Compare Source
Added
cacheCSSandcacheJSoptions in config file and programmatic API,--cache-cssand--cache-jsCLI flagsHMN_CACHE_CSSandHMN_CACHE_JSChanged
v4.18.0Compare Source
Added
mergeScriptsoption to merge consecutive inline<script>elements into one (saves</script><script>overhead)type, matchingasync/defer/nomodule/nonceattributes)srcattribute)Changed
0.5→.5,-0.25→-.25)crossoriginandcontenteditableattributes now collapse to just the attribute name (e.g.,crossorigin=""→crossorigin)v4.17.2Compare Source
Changed
collapseWhitespacenow trims single trailing newlines inside<pre>and<textarea>elements</code></pre>)v4.17.1Compare Source
Changed
collapseInlineTagWhitespacesetting fromcomprehensivepresetFixed
presetoption in programmatic APIgetPreset():minify(html, { ...getPreset('comprehensive') })minify(html, { preset: 'comprehensive' })Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.