Update dependency @node-minify/html-minifier to ^11.1.0 #332

Open
renovate-bot wants to merge 1 commit from renovate/node-minify-html-minifier-11.x into develop
Collaborator

This PR contains the following updates:

Package Type Update Change
@node-minify/html-minifier (source) devDependencies minor ^11.0.2 → ^11.1.0

Release Notes

srod/node-minify (@​node-minify/html-minifier)

v11.1.0

Compare Source

Features

  • action, benchmark, cli, utils (#​2966): Removed compressors (such as yui) now fail the same way everywhere, including resolveCompressor, with one message naming the replacement. The benchmark now reports the resolver's actual error for a compressor it cannot load instead of "Compressor not found or not installed". @node-minify/utils also exports a CompressorName type, and COMPRESSOR_REGISTRY is now the single list of compressors, including the removed ones and their replacements: resolveCompressor (used by the CLI, the Action and the benchmark), the CLI's compressor list and doctor all read it.

  • esbuild, imagemin, lightningcss, sharp, svgo, swc, terser, uglify-js, utils (#​2967): Every built-in compressor now reports a minification failure as <compressor> minification failed: <original message>, with the original error as its cause. Input checks that run before minifying keep their own messages, such as esbuild's You must specify a type: js or css and sharp's and imagemin's requires Buffer content. terser, esbuild, swc, lightningcss, uglify-js, svgo, sharp and imagemin used to throw the library's error as it was or with their own wording (SVGO optimization failed:, Sharp conversion to webp failed:, Imagemin returned no output), so code that matched on that text or on the error's class (for example instanceof SyntaxError for lightningcss) should read error.cause instead. @node-minify/utils also exports FileOperationError and ValidationError, and wrapMinificationError takes an optional context string.

  • cli, utils (#​2968): csso, imagemin and uglify-js move from the supported tier to the legacy tier, because they are removed in v12. node-minify doctor now warns that each is removed in v12 and names its replacement (lightningcss or cssnano, sharp or svgo for SVG, and terser), and the compressor list in node-minify --help says the same. jsonminify moves from the legacy tier back to the supported tier, so doctor no longer warns about it. All four keep working in v11, and nothing extra is printed when you run them. In @node-minify/utils, getCompressorsByStatus and COMPRESSOR_REGISTRY return the new tiers, and a legacy entry with a replacement is removed in the next major version.

  • sharp (#​2969): Add gif as an output format, as format: "gif" or inside formats. This gives @node-minify/imagemin users, which is removed in v12, a GIF path in v11. sharp re-encodes the image with libvips instead of optimizing the GIF losslessly like gifsicle, so output sizes differ from imagemin's. Animated GIFs keep all their frames. effort (1-10, default 7) is the only option that applies to GIF. Other output formats are unchanged.

  • types, utils (#​2970): Every export that v12 removes is now marked @deprecated, and editors show it struck through. All of them keep working exactly as in 11.0.x through v11, and none of them emits a new deprecation warning at runtime.

    Package Deprecated export Use instead
    @node-minify/utils readFile (every overload) readFileAsync
    @node-minify/utils writeFile writeFileAsync
    @node-minify/utils getContentFromFiles getContentFromFilesAsync
    @node-minify/utils isValidFile isValidFileAsync
    @node-minify/utils deleteFile fs.promises.unlink
    @node-minify/utils getSourceMapBoolean extractSourceMapOption
    @node-minify/utils tryResolveBuiltIn, tryResolveNpmPackage, tryResolveLocalFile resolveCompressor
    @node-minify/utils getKnownExportName getCompressorEntry(name)?.exportName, with the canonical name: getCompressorEntry does not resolve aliases, so "gcc" returns undefined and needs "google-closure-compiler"
    @node-minify/utils isLocalPath none (resolveCompressor accepts local paths)
    @node-minify/utils validateMinifyResult none (run already validates every compressor's result)
    @node-minify/utils buildArgs, toBuildArgsOptions, BuildArgsOptions none
    @node-minify/utils warnDeprecation, resetDeprecationWarnings none
    @node-minify/utils WildcardOptions (the type of the object form of the wildcards second argument) none (pass the public folder as a string)
    @node-minify/utils WildcardOptions.publicFolder pass the public folder as a string: wildcards(input, publicFolder)
    @node-minify/utils WildcardOptions.ignore none
    @node-minify/types ImageFormat none
    @node-minify/types Settings.option (the CLI's raw -O string) options (v12 moves the field to the CLI's own type)

    wildcards itself is not deprecated, only its object form. These exports are removed in v12.

Fixes and internal changes

  • benchmark, cli, utils (#​2965): Drop the gzip-size and chalk dependencies in favor of Node built-ins. Reported gzip and brotli sizes are unchanged (gzip still uses level 9, as gzip-size did), and so is terminal output, with two exceptions: the CLI now honors NO_COLOR, and on Node 22.0–22.7 redirected CLI output can contain color codes (benchmark files written with --output are still stripped).

  • cssnano, minify-html, no-compress, oxc, utils (#​2971): Internal cleanup with no change to output or reported sizes.

    • cssnano, oxc and minify-html no longer run validateMinifyResult on their own result, because run already validates it and the libraries always return a string.
    • no-compress uses ensureStringContent. Array content (several image files) now throws no-compress compressor does not support array content instead of no-compress failed: content must be a string or Buffer but received object.
    • @node-minify/utils builds only its index entry, because the package exports map only exposes .. The exported names are unchanged.
    • The gzip and brotli size helpers check the file with isValidFileAsync instead of the deprecated isValidFile.
  • benchmark, cli, core, sharp (#​2972): Internal cleanup, no change to output.

    • benchmark measures each gzip and brotli size once instead of twice. The reported sizes are unchanged.
    • cli prints the three compressor tiers in --help from one loop. The text is unchanged from before this cleanup.
    • core validates the entries of an array input once, in setup, instead of a second time before compressing.
    • sharp no longer caches the lazily imported sharp module itself, because Node already does.
  • action (#​2973): Internal cleanup, no change to behavior.

    • The explicit and auto modes share one per-file minify-and-measure step and one reporting sequence.
    • The Action uses DEFAULT_IGNORES from @node-minify/utils instead of its own copy.
    • benchmark-compressors is parsed with the same helper as the other comma-separated inputs.
  • benchmark, cli (#​2974): benchmark detects the file type from each input file's extension when type is not given, so node-minify benchmark src/app.js -c terser,esbuild no longer reports esbuild as failed with You must specify a type: js or css. .js .mjs .cjs .jsx give js, .css gives css, .html .htm give html. An explicit type still wins, and other extensions pass no type as before. The benchmark -t help text says so.


All @node-minify/* npm packages are published at 11.1.0, and the GitHub Action is released as v11.1.0. Each package's CHANGELOG.md has its own entries.


Configuration

📅 Schedule: (UTC)

  • 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 is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@node-minify/html-minifier](https://github.com/srod/node-minify/tree/main/packages/html-minifier#readme) ([source](https://github.com/srod/node-minify)) | devDependencies | minor | [`^11.0.2` → `^11.1.0`](https://renovatebot.com/diffs/npm/@node-minify%2fhtml-minifier/11.0.2/11.1.0) | --- ### Release Notes <details> <summary>srod/node-minify (@&#8203;node-minify/html-minifier)</summary> ### [`v11.1.0`](https://github.com/srod/node-minify/releases/tag/v11.1.0) [Compare Source](https://github.com/srod/node-minify/compare/v11.0.2...v11.1.0) #### Features - **`action`, `benchmark`, `cli`, `utils`** ([#&#8203;2966](https://github.com/srod/node-minify/issues/2966)): Removed compressors (such as `yui`) now fail the same way everywhere, including `resolveCompressor`, with one message naming the replacement. The benchmark now reports the resolver's actual error for a compressor it cannot load instead of "Compressor not found or not installed". `@node-minify/utils` also exports a `CompressorName` type, and `COMPRESSOR_REGISTRY` is now the single list of compressors, including the removed ones and their replacements: `resolveCompressor` (used by the CLI, the Action and the benchmark), the CLI's compressor list and `doctor` all read it. - **`esbuild`, `imagemin`, `lightningcss`, `sharp`, `svgo`, `swc`, `terser`, `uglify-js`, `utils`** ([#&#8203;2967](https://github.com/srod/node-minify/issues/2967)): Every built-in compressor now reports a minification failure as `<compressor> minification failed: <original message>`, with the original error as its `cause`. Input checks that run before minifying keep their own messages, such as esbuild's `You must specify a type: js or css` and sharp's and imagemin's `requires Buffer content`. `terser`, `esbuild`, `swc`, `lightningcss`, `uglify-js`, `svgo`, `sharp` and `imagemin` used to throw the library's error as it was or with their own wording (`SVGO optimization failed:`, `Sharp conversion to webp failed:`, `Imagemin returned no output`), so code that matched on that text or on the error's class (for example `instanceof SyntaxError` for lightningcss) should read `error.cause` instead. `@node-minify/utils` also exports `FileOperationError` and `ValidationError`, and `wrapMinificationError` takes an optional `context` string. - **`cli`, `utils`** ([#&#8203;2968](https://github.com/srod/node-minify/issues/2968)): `csso`, `imagemin` and `uglify-js` move from the supported tier to the legacy tier, because they are removed in v12. `node-minify doctor` now warns that each is removed in v12 and names its replacement (`lightningcss` or `cssnano`, `sharp` or `svgo` for SVG, and `terser`), and the compressor list in `node-minify --help` says the same. `jsonminify` moves from the legacy tier back to the supported tier, so `doctor` no longer warns about it. All four keep working in v11, and nothing extra is printed when you run them. In `@node-minify/utils`, `getCompressorsByStatus` and `COMPRESSOR_REGISTRY` return the new tiers, and a legacy entry with a `replacement` is removed in the next major version. - **`sharp`** ([#&#8203;2969](https://github.com/srod/node-minify/issues/2969)): Add `gif` as an output format, as `format: "gif"` or inside `formats`. This gives `@node-minify/imagemin` users, which is removed in v12, a GIF path in v11. sharp re-encodes the image with libvips instead of optimizing the GIF losslessly like gifsicle, so output sizes differ from imagemin's. Animated GIFs keep all their frames. `effort` (1-10, default 7) is the only option that applies to GIF. Other output formats are unchanged. - **`types`, `utils`** ([#&#8203;2970](https://github.com/srod/node-minify/issues/2970)): Every export that v12 removes is now marked `@deprecated`, and editors show it struck through. All of them keep working exactly as in 11.0.x through v11, and none of them emits a new deprecation warning at runtime. | Package | Deprecated export | Use instead | | -------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `@node-minify/utils` | `readFile` (every overload) | `readFileAsync` | | `@node-minify/utils` | `writeFile` | `writeFileAsync` | | `@node-minify/utils` | `getContentFromFiles` | `getContentFromFilesAsync` | | `@node-minify/utils` | `isValidFile` | `isValidFileAsync` | | `@node-minify/utils` | `deleteFile` | `fs.promises.unlink` | | `@node-minify/utils` | `getSourceMapBoolean` | `extractSourceMapOption` | | `@node-minify/utils` | `tryResolveBuiltIn`, `tryResolveNpmPackage`, `tryResolveLocalFile` | `resolveCompressor` | | `@node-minify/utils` | `getKnownExportName` | `getCompressorEntry(name)?.exportName`, with the canonical name: `getCompressorEntry` does not resolve aliases, so `"gcc"` returns `undefined` and needs `"google-closure-compiler"` | | `@node-minify/utils` | `isLocalPath` | none (`resolveCompressor` accepts local paths) | | `@node-minify/utils` | `validateMinifyResult` | none (`run` already validates every compressor's result) | | `@node-minify/utils` | `buildArgs`, `toBuildArgsOptions`, `BuildArgsOptions` | none | | `@node-minify/utils` | `warnDeprecation`, `resetDeprecationWarnings` | none | | `@node-minify/utils` | `WildcardOptions` (the type of the object form of the `wildcards` second argument) | none (pass the public folder as a string) | | `@node-minify/utils` | `WildcardOptions.publicFolder` | pass the public folder as a string: `wildcards(input, publicFolder)` | | `@node-minify/utils` | `WildcardOptions.ignore` | none | | `@node-minify/types` | `ImageFormat` | none | | `@node-minify/types` | `Settings.option` (the CLI's raw `-O` string) | `options` (v12 moves the field to the CLI's own type) | `wildcards` itself is not deprecated, only its object form. These exports are removed in v12. #### Fixes and internal changes - **`benchmark`, `cli`, `utils`** ([#&#8203;2965](https://github.com/srod/node-minify/issues/2965)): Drop the `gzip-size` and `chalk` dependencies in favor of Node built-ins. Reported gzip and brotli sizes are unchanged (gzip still uses level 9, as `gzip-size` did), and so is terminal output, with two exceptions: the CLI now honors `NO_COLOR`, and on Node 22.0–22.7 redirected CLI output can contain color codes (benchmark files written with `--output` are still stripped). - **`cssnano`, `minify-html`, `no-compress`, `oxc`, `utils`** ([#&#8203;2971](https://github.com/srod/node-minify/issues/2971)): Internal cleanup with no change to output or reported sizes. - `cssnano`, `oxc` and `minify-html` no longer run `validateMinifyResult` on their own result, because `run` already validates it and the libraries always return a string. - `no-compress` uses `ensureStringContent`. Array content (several image files) now throws `no-compress compressor does not support array content` instead of `no-compress failed: content must be a string or Buffer but received object`. - `@node-minify/utils` builds only its `index` entry, because the package exports map only exposes `.`. The exported names are unchanged. - The gzip and brotli size helpers check the file with `isValidFileAsync` instead of the deprecated `isValidFile`. - **`benchmark`, `cli`, `core`, `sharp`** ([#&#8203;2972](https://github.com/srod/node-minify/issues/2972)): Internal cleanup, no change to output. - `benchmark` measures each gzip and brotli size once instead of twice. The reported sizes are unchanged. - `cli` prints the three compressor tiers in `--help` from one loop. The text is unchanged from before this cleanup. - `core` validates the entries of an array `input` once, in `setup`, instead of a second time before compressing. - `sharp` no longer caches the lazily imported `sharp` module itself, because Node already does. - **`action`** ([#&#8203;2973](https://github.com/srod/node-minify/issues/2973)): Internal cleanup, no change to behavior. - The explicit and auto modes share one per-file minify-and-measure step and one reporting sequence. - The Action uses `DEFAULT_IGNORES` from `@node-minify/utils` instead of its own copy. - `benchmark-compressors` is parsed with the same helper as the other comma-separated inputs. - **`benchmark`, `cli`** ([#&#8203;2974](https://github.com/srod/node-minify/issues/2974)): `benchmark` detects the file type from each input file's extension when `type` is not given, so `node-minify benchmark src/app.js -c terser,esbuild` no longer reports esbuild as failed with `You must specify a type: js or css`. `.js .mjs .cjs .jsx` give `js`, `.css` gives `css`, `.html .htm` give `html`. An explicit `type` still wins, and other extensions pass no type as before. The `benchmark -t` help text says so. *** All `@node-minify/*` npm packages are published at `11.1.0`, and the GitHub Action is released as `v11.1.0`. Each package's `CHANGELOG.md` has its own entries. </details> --- ### Configuration 📅 **Schedule**: (UTC) - 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 is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNjMuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjI2My41IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119-->
Update dependency @node-minify/html-minifier to ^11.1.0
All checks were successful
Build and Deploy Website / Build Website (push) Has been skipped
Build and Deploy Website / Build Dev Website (push) Successful in 1m25s
Build and Deploy Website / Deploy Dev Website (push) Has been skipped
Build and Deploy Website / Deploy Website (push) Has been skipped
cf51a18195
All checks were successful
Build and Deploy Website / Build Website (push) Has been skipped
Build and Deploy Website / Build Dev Website (push) Successful in 1m25s
Build and Deploy Website / Deploy Dev Website (push) Has been skipped
Build and Deploy Website / Deploy Website (push) Has been skipped
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/node-minify-html-minifier-11.x:renovate/node-minify-html-minifier-11.x
git switch renovate/node-minify-html-minifier-11.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch develop
git merge --no-ff renovate/node-minify-html-minifier-11.x
git switch renovate/node-minify-html-minifier-11.x
git rebase develop
git switch develop
git merge --ff-only renovate/node-minify-html-minifier-11.x
git switch renovate/node-minify-html-minifier-11.x
git rebase develop
git switch develop
git merge --no-ff renovate/node-minify-html-minifier-11.x
git switch develop
git merge --squash renovate/node-minify-html-minifier-11.x
git switch develop
git merge --ff-only renovate/node-minify-html-minifier-11.x
git switch develop
git merge renovate/node-minify-html-minifier-11.x
git push origin develop
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
samuel-p/sp-codes.de!332
No description provided.