Skip to content

build(deps-dev): bump html-minifier from 4.0.0 to 5.1.0 - #1649

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/html-minifier-5.1.0
Closed

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/html-minifier-5.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Bumps html-minifier from 4.0.0 to 5.1.0.

Changelog

Sourced from html-minifier's changelog.

[5.1.0] - 2026-11-11

Fixed

  • Fixed removeUnusedCSS keeping style sheets of which nothing is used as written, unminified, where they held a word of ten or more lowercase letters (e.g., background; taken for a custom-fragment placeholder)
  • Fixed mergeScripts merging what only looks like scripts—text in textarea and title elements, comments, and markup kept with htmlmin:ignore—and losing code where a script holds <!--<script>, which browsers end only at a later </script> (e.g., <script><!--<script></script><script></script></script> lost <script></script>)
  • Fixed mergeScripts joining a script that ends in a custom fragment on one line with the next, which the fragment may comment out
  • Fixed mergeScripts merging scripts that start with a hashbang (#!), which only works at the very start of a script, so that none of the merged code ran
  • Fixed mergeScripts dropping the attributes of scripts merged into another, whose own attributes then covered their code, too—which tools that rewrite pages in the browser or at the edge read (e.g., data-cfasync="false" for Cloudflare Rocket Loader, or data-cookieconsent)—scripts now merge only where their attributes match (other than a JavaScript type), and not where they have an id
  • Fixed removeDefaultTypeAttributes removing JavaScript types with parameters (e.g., type="text/javascript; charset=utf-8"), which make the element a data block rather than a script, so that browsers then ran its content; minifyJS no longer minifies such blocks, either

Added

  • Added mergeStyles (part of the comprehensive preset) to merge consecutive style elements with compatible style sheets into one, which minifyCSS then minifies as one (e.g., <style>a{color:red}</style><style>a{color:blue}</style> becomes <style>a{color:#00f}</style>)

Changed

  • Made mergeScripts faster, as it merges what the minifier writes rather than scanning its output again
  • Made mergeScripts merge scripts of any JavaScript type (e.g., text/ecmascript), not just of text/javascript and application/javascript
  • Made minifyJS, removeDefaultTypeAttributes, and mergeScripts treat the remaining JavaScript types browsers run as such (text/javascript1.0 to text/javascript1.5, and text/livescript)

[5.0.4] - 2026-11-11

Fixed

  • Fixed collapseWhitespace taking quadratic time on deeply nested markup, as each end tag walked back over all those before it (e.g., 6,400 nested div elements took 1.5 s rather than 7 ms)
  • Fixed mergeScripts joining scripts on one line after a last line holding <!-- or -->, which browsers read as starting a comment, so that the next script didn’t run (e.g., a()\n<!--b--> before c())
  • Fixed mergeScripts merging a script holding <!-- with one holding <script, which browsers then didn’t end at </script>, so that the rest of the document became script text (e.g., a="<!--" before b="<script>")
  • Fixed mergeScripts joining a script that starts with --> on the line before it, where browsers no longer read it as a comment, which broke the merged script (e.g., a() before -->b)
  • Fixed removeOptionalTags omitting </li>, </dd>, and </dt> before end tags that don’t close these elements in browsers, which moved what follows into them (e.g., <span><li>a</li></span><li>b)
  • Fixed minifySVG removing whitespace from HTML in foreignObject elements, which joined words (e.g., <p>a <b>b</b> c</p> rendered as “abc”)
  • Fixed minifyJS turning NUL characters in scripts into \0, where browsers read U+FFFD
  • Fixed collapseAttributeWhitespace trimming the encoding of annotation-xml elements, which browsers match as written, so that the element came to hold HTML rather than MathML (e.g., encoding=" text/html ")
  • Fixed collapseWhitespace removing spaces around marquee elements, which browsers render as inline blocks (e.g., a <marquee>b</marquee> c)
  • Fixed removeEmptyElements with removeEmptyAttributes keeping empty elements whose only reason to stay was an empty id that then got removed (e.g., <div id=""></div> became <div></div>)
  • Fixed removeUnusedCSS keeping rules for elements whose names match only where non-ASCII letters are lowercased, which browsers don’t do (e.g., kbd rules for <\u212Abd>, written with a Kelvin sign)

Changed

  • Made sortAttributes and sortClassNames faster by not running CSS, JavaScript, JSON, SVG, and URL minification in their analysis pass, which only counts attributes and classes
  • Made removeUnusedCSS faster at collecting the classes and IDs a document uses
  • Made each minify call faster by reusing attribute and ignoreCustomFragments patterns across calls
  • Documented how SWC compares to Terser for JavaScript minification

[5.0.3] - 2026-11-10

Fixed

  • Fixed mergeScripts joining scripts with only a newline after a last line holding // (as in a URL), which made the next script a call where it starts with ( or [ (e.g., a="https://b" before (c)())
  • Fixed collapseWhitespace removing spaces that render:

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for html-minifier since your current version.

Install script changes

This version adds prepare script that runs during installation. Review the package contents before updating.


@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dist/html-dom-parser.min.js 2.18 KB (0%) 44 ms (0%) 127 ms (-19.05% 🔽) 170 ms

@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/html-minifier-5.1.0 branch 3 times, most recently from e97f945 to f72be9c Compare November 17, 2026 10:16
Bumps [html-minifier](https://github.com/j9t/html-minifier) from 4.0.0 to 5.1.0.
- [Changelog](https://github.com/j9t/html-minifier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/j9t/html-minifier/commits)

---
updated-dependencies:
- dependency-name: html-minifier
  dependency-version: 5.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/html-minifier-5.1.0 branch from f72be9c to cb80673 Compare November 17, 2026 10:22
@dependabot @github

dependabot Bot commented on behalf of github Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1652.

@dependabot dependabot Bot closed this Nov 18, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/html-minifier-5.1.0 branch November 18, 2026 10:13
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.

0 participants