Skip to content

build(deps-dev): bump html-minifier from 4.0.0 to 5.2.0 - #1652

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

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

Conversation

@dependabot

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

Copy link
Copy Markdown
Contributor

Bumps html-minifier from 4.0.0 to 5.2.0.

Changelog

Sourced from html-minifier's changelog.

[5.2.0] - 2026-11-14

Fixed

  • Fixed collapseAttributeWhitespace adding spaces around custom fragments in attribute values (e.g., href="/invoices/<?= $inv->id ?>?tab=lines" became href="/invoices/ <?= $inv->id ?> ?tab=lines")

Added

  • Added a preview of zero-config mode with --zero --dry, or --dry without input (which used to wait silently for input)

Changed

  • Made the CLI say how to end input, and how to minify files instead, when it reads from STDIN in a terminal
  • Made --dry and --verbose suggest --preset=comprehensive when no minification options are set

[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>)

... (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 18, 2026
@github-actions

github-actions Bot commented Nov 18, 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%) 76 ms (+180.55% 🔺) 119 ms

@remarkablemark remarkablemark self-assigned this Nov 19, 2026
Bumps [html-minifier](https://github.com/j9t/html-minifier) from 4.0.0 to 5.2.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.2.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.2.0 branch from 50b1eb9 to 72299b0 Compare November 19, 2026 10:18
@remarkablemark remarkablemark mentioned this pull request Nov 20, 2026
1 of 4 tasks

@remarkablemark remarkablemark left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsc failing:

Error: __tests__/cases/index.ts(16,3): error TS2322: Type '{ name: string; data: string; readonly skip?: undefined; } | { name: string; data: string; readonly skip: boolean; } | { name: string; data: Promise<string>; }' is not assignable to type 'TestCase'.
  Type '{ name: string; data: Promise<string>; }' is not assignable to type 'TestCase'.
    Types of property 'data' are incompatible.
      Type 'Promise<string>' is not assignable to type 'string'.
Error: __tests__/cases/index.ts(19,5): error TS2322: Type 'Promise<string>' is not assignable to type 'string'.

@dependabot @github

dependabot Bot commented on behalf of github Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/html-minifier-5.2.0 branch November 20, 2026 00:51
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