Update dependency @node-minify/core to v11 #285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/node-minify-core-11.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
^9.0.2→^11.1.0Release Notes
srod/node-minify (@node-minify/core)
v11.1.0Compare Source
Features
action,benchmark,cli,utils(#2966): Removed compressors (such asyui) now fail the same way everywhere, includingresolveCompressor, 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/utilsalso exports aCompressorNametype, andCOMPRESSOR_REGISTRYis 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 anddoctorall 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 itscause. Input checks that run before minifying keep their own messages, such as esbuild'sYou must specify a type: js or cssand sharp's and imagemin'srequires Buffer content.terser,esbuild,swc,lightningcss,uglify-js,svgo,sharpandimageminused 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 exampleinstanceof SyntaxErrorfor lightningcss) should readerror.causeinstead.@node-minify/utilsalso exportsFileOperationErrorandValidationError, andwrapMinificationErrortakes an optionalcontextstring.cli,utils(#2968):csso,imageminanduglify-jsmove from the supported tier to the legacy tier, because they are removed in v12.node-minify doctornow warns that each is removed in v12 and names its replacement (lightningcssorcssnano,sharporsvgofor SVG, andterser), and the compressor list innode-minify --helpsays the same.jsonminifymoves from the legacy tier back to the supported tier, sodoctorno longer warns about it. All four keep working in v11, and nothing extra is printed when you run them. In@node-minify/utils,getCompressorsByStatusandCOMPRESSOR_REGISTRYreturn the new tiers, and a legacy entry with areplacementis removed in the next major version.sharp(#2969): Addgifas an output format, asformat: "gif"or insideformats. This gives@node-minify/imageminusers, 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.@node-minify/utilsreadFile(every overload)readFileAsync@node-minify/utilswriteFilewriteFileAsync@node-minify/utilsgetContentFromFilesgetContentFromFilesAsync@node-minify/utilsisValidFileisValidFileAsync@node-minify/utilsdeleteFilefs.promises.unlink@node-minify/utilsgetSourceMapBooleanextractSourceMapOption@node-minify/utilstryResolveBuiltIn,tryResolveNpmPackage,tryResolveLocalFileresolveCompressor@node-minify/utilsgetKnownExportNamegetCompressorEntry(name)?.exportName, with the canonical name:getCompressorEntrydoes not resolve aliases, so"gcc"returnsundefinedand needs"google-closure-compiler"@node-minify/utilsisLocalPathresolveCompressoraccepts local paths)@node-minify/utilsvalidateMinifyResultrunalready validates every compressor's result)@node-minify/utilsbuildArgs,toBuildArgsOptions,BuildArgsOptions@node-minify/utilswarnDeprecation,resetDeprecationWarnings@node-minify/utilsWildcardOptions(the type of the object form of thewildcardssecond argument)@node-minify/utilsWildcardOptions.publicFolderwildcards(input, publicFolder)@node-minify/utilsWildcardOptions.ignore@node-minify/typesImageFormat@node-minify/typesSettings.option(the CLI's raw-Ostring)options(v12 moves the field to the CLI's own type)wildcardsitself is not deprecated, only its object form. These exports are removed in v12.Fixes and internal changes
benchmark,cli,utils(#2965): Drop thegzip-sizeandchalkdependencies in favor of Node built-ins. Reported gzip and brotli sizes are unchanged (gzip still uses level 9, asgzip-sizedid), and so is terminal output, with two exceptions: the CLI now honorsNO_COLOR, and on Node 22.0–22.7 redirected CLI output can contain color codes (benchmark files written with--outputare still stripped).cssnano,minify-html,no-compress,oxc,utils(#2971): Internal cleanup with no change to output or reported sizes.cssnano,oxcandminify-htmlno longer runvalidateMinifyResulton their own result, becauserunalready validates it and the libraries always return a string.no-compressusesensureStringContent. Array content (several image files) now throwsno-compress compressor does not support array contentinstead ofno-compress failed: content must be a string or Buffer but received object.@node-minify/utilsbuilds only itsindexentry, because the package exports map only exposes.. The exported names are unchanged.isValidFileAsyncinstead of the deprecatedisValidFile.benchmark,cli,core,sharp(#2972): Internal cleanup, no change to output.benchmarkmeasures each gzip and brotli size once instead of twice. The reported sizes are unchanged.cliprints the three compressor tiers in--helpfrom one loop. The text is unchanged from before this cleanup.corevalidates the entries of an arrayinputonce, insetup, instead of a second time before compressing.sharpno longer caches the lazily importedsharpmodule itself, because Node already does.action(#2973): Internal cleanup, no change to behavior.DEFAULT_IGNORESfrom@node-minify/utilsinstead of its own copy.benchmark-compressorsis parsed with the same helper as the other comma-separated inputs.benchmark,cli(#2974):benchmarkdetects the file type from each input file's extension whentypeis not given, sonode-minify benchmark src/app.js -c terser,esbuildno longer reports esbuild as failed withYou must specify a type: js or css..js .mjs .cjs .jsxgivejs,.cssgivescss,.html .htmgivehtml. An explicittypestill wins, and other extensions pass no type as before. Thebenchmark -thelp text says so.All
@node-minify/*npm packages are published at11.1.0, and the GitHub Action is released asv11.1.0. Each package'sCHANGELOG.mdhas its own entries.v11.0.2Compare Source
Patch Changes
8903c65: Fail when no input file is left after glob expansion.minify()used to resolve with an empty string and write nothing when a wildcard input such assrc/**/*.jsmatched nothing and the output used$1; with a plain output it failed withNo content provided. Both cases now throwNo files matched input pattern: <pattern>. An array where at least one entry matches keeps working, and unmatched globs in it are skipped as before. Explicit empty arrays and in-memorycontentare unaffected.Published Packages
@node-minify/benchmark@11.0.2@node-minify/clean-css@11.0.2@node-minify/cli@11.0.2@node-minify/core@11.0.2@node-minify/cssnano@11.0.2@node-minify/csso@11.0.2@node-minify/esbuild@11.0.2@node-minify/google-closure-compiler@11.0.2@node-minify/html-minifier@11.0.2@node-minify/imagemin@11.0.2@node-minify/jsonminify@11.0.2@node-minify/lightningcss@11.0.2@node-minify/minify-html@11.0.2@node-minify/no-compress@11.0.2@node-minify/oxc@11.0.2@node-minify/sharp@11.0.2@node-minify/svgo@11.0.2@node-minify/swc@11.0.2@node-minify/terser@11.0.2@node-minify/types@11.0.2@node-minify/uglify-js@11.0.2@node-minify/utils@11.0.2See individual package CHANGELOGs for details.
v11.0.1Compare Source
Patch Changes
f8f121e: -@node-minify/core,@node-minify/types: Stop supplying a hidden 1 MB defaultbufferinsetup(), allowing Google Closure Compiler to use its own 100 MB per-stream limit unless a caller specifiesbuffer(custom compressors readingsettings.buffermust now handleundefined).@node-minify/sharp: Awaitconverter.toBuffer()insidetryso async encoding failures report the target format (Sharp conversion to <format> failed: …) in both single-format and multi-format runs.@node-minify/cli: Remove duplicateCompression failed:error wrapping incompress()so failed CLI runs print the prefix once.@node-minify/benchmark: Write temporary benchmark outputs to an isolatedos.tmpdir()directory removed infinallyinstead of next to the input file.@node-minify/benchmark,@node-minify/cli: Honoroutput/-oandformat/-fby writing the formatted benchmark report to disk (creating parent directories and stripping ANSI escape codes) instead of printing to stdout, and enable Commander positional options so-c,-o, and-treach thebenchmarksubcommand. Root-only flags such as-s,-Oor-iplaced afterbenchmarkhad no effect on it and are now rejected as unknown options.Published Packages
@node-minify/benchmark@11.0.1@node-minify/clean-css@11.0.1@node-minify/cli@11.0.1@node-minify/core@11.0.1@node-minify/cssnano@11.0.1@node-minify/csso@11.0.1@node-minify/esbuild@11.0.1@node-minify/google-closure-compiler@11.0.1@node-minify/html-minifier@11.0.1@node-minify/imagemin@11.0.1@node-minify/jsonminify@11.0.1@node-minify/lightningcss@11.0.1@node-minify/minify-html@11.0.1@node-minify/no-compress@11.0.1@node-minify/oxc@11.0.1@node-minify/sharp@11.0.1@node-minify/svgo@11.0.1@node-minify/swc@11.0.1@node-minify/terser@11.0.1@node-minify/types@11.0.1@node-minify/uglify-js@11.0.1@node-minify/utils@11.0.1See individual package CHANGELOGs for details.
v11.0.0Compare Source
Major Changes
1a1be73: v11: cleanup major release.Breaking changes
engines.nodemoved from>=20.0.0to>=22.0.0across all packages. Node 20 reached end-of-life on 2026-04-30 and is no longer covered by CI (the test matrix runs 22.x and 24.x). Upgrade to Node 22 or later.@node-minify/babel-minify,@node-minify/uglify-es,@node-minify/yui,@node-minify/sqwish,@node-minify/crass. Use the recommended replacements (terser/oxc/swc/esbuild for JS, lightningcss/cssnano for CSS).@node-minify/run: internal Java/process-spawn helper, no longer used by any compressor.@node-minify/types:CompressorReturnType(useCompressorResult) andMinifyOptions(useSettings).google-closure-compilernpm API instead of invoking the Java JAR through@node-minify/run. Same flags and output. Note: the npm package still bundlesgoogle-closure-compiler-java, so Java may still be invoked under the hood — this change removes node-minify's custom Java plumbing, not Java itself.New features
@node-minify/utils(recommended/supported/legacy/removed), surfaced in CLI help and the GitHub Action.node-minify doctor: read-only CLI command covering every v11 break. Scanspackage.json, source imports,compressor:values and workflow YAML for removed/legacy compressors, the removed@node-minify/runpackage, the removedCompressorReturnType/MinifyOptionstype aliases, andengines.noderanges that still allow Node below 22. Exits non-zero on errors so it can gate CI.bufferlimit (kills the child process when stdout/stderr exceeds it) plus hardened process/timeout/error handling.Migration
See the v11 migration guide, or run
npx --package=@node-minify/cli -- node-minify doctorin your project.Patch Changes
Published Packages
@node-minify/benchmark@11.0.0@node-minify/clean-css@11.0.0@node-minify/cli@11.0.0@node-minify/core@11.0.0@node-minify/cssnano@11.0.0@node-minify/csso@11.0.0@node-minify/esbuild@11.0.0@node-minify/google-closure-compiler@11.0.0@node-minify/html-minifier@11.0.0@node-minify/imagemin@11.0.0@node-minify/jsonminify@11.0.0@node-minify/lightningcss@11.0.0@node-minify/minify-html@11.0.0@node-minify/no-compress@11.0.0@node-minify/oxc@11.0.0@node-minify/sharp@11.0.0@node-minify/svgo@11.0.0@node-minify/swc@11.0.0@node-minify/terser@11.0.0@node-minify/types@11.0.0@node-minify/uglify-js@11.0.0@node-minify/utils@11.0.0See individual package CHANGELOGs for details.
v10.5.0Compare Source
Published Packages
@node-minify/babel-minify@10.5.0@node-minify/benchmark@10.5.0@node-minify/clean-css@10.5.0@node-minify/cli@10.5.0@node-minify/core@10.5.0@node-minify/crass@10.5.0@node-minify/cssnano@10.5.0@node-minify/csso@10.5.0@node-minify/esbuild@10.5.0@node-minify/google-closure-compiler@10.5.0@node-minify/html-minifier@10.5.0@node-minify/imagemin@10.5.0@node-minify/jsonminify@10.5.0@node-minify/lightningcss@10.5.0@node-minify/minify-html@10.5.0@node-minify/no-compress@10.5.0@node-minify/oxc@10.5.0@node-minify/run@10.5.0@node-minify/sharp@10.5.0@node-minify/sqwish@10.5.0@node-minify/svgo@10.5.0@node-minify/swc@10.5.0@node-minify/terser@10.5.0@node-minify/types@10.5.0@node-minify/uglify-es@10.5.0@node-minify/uglify-js@10.5.0@node-minify/utils@10.5.0@node-minify/yui@10.5.0See individual package CHANGELOGs for details.
v10.4.0Compare Source
Published Packages
@node-minify/babel-minify@10.4.0@node-minify/benchmark@10.4.0@node-minify/clean-css@10.4.0@node-minify/cli@10.4.0@node-minify/core@10.4.0@node-minify/crass@10.4.0@node-minify/cssnano@10.4.0@node-minify/csso@10.4.0@node-minify/esbuild@10.4.0@node-minify/google-closure-compiler@10.4.0@node-minify/html-minifier@10.4.0@node-minify/imagemin@10.4.0@node-minify/jsonminify@10.4.0@node-minify/lightningcss@10.4.0@node-minify/minify-html@10.4.0@node-minify/no-compress@10.4.0@node-minify/oxc@10.4.0@node-minify/run@10.4.0@node-minify/sharp@10.4.0@node-minify/sqwish@10.4.0@node-minify/svgo@10.4.0@node-minify/swc@10.4.0@node-minify/terser@10.4.0@node-minify/types@10.4.0@node-minify/uglify-es@10.4.0@node-minify/uglify-js@10.4.0@node-minify/utils@10.4.0@node-minify/yui@10.4.0See individual package CHANGELOGs for details.
v10.3.0Compare Source
Published Packages
@node-minify/babel-minify@10.3.0@node-minify/benchmark@10.3.0@node-minify/clean-css@10.3.0@node-minify/cli@10.3.0@node-minify/core@10.3.0@node-minify/crass@10.3.0@node-minify/cssnano@10.3.0@node-minify/csso@10.3.0@node-minify/esbuild@10.3.0@node-minify/google-closure-compiler@10.3.0@node-minify/html-minifier@10.3.0@node-minify/imagemin@10.3.0@node-minify/jsonminify@10.3.0@node-minify/lightningcss@10.3.0@node-minify/minify-html@10.3.0@node-minify/no-compress@10.3.0@node-minify/oxc@10.3.0@node-minify/run@10.3.0@node-minify/sharp@10.3.0@node-minify/sqwish@10.3.0@node-minify/svgo@10.3.0@node-minify/swc@10.3.0@node-minify/terser@10.3.0@node-minify/types@10.3.0@node-minify/uglify-es@10.3.0@node-minify/uglify-js@10.3.0@node-minify/utils@10.3.0@node-minify/yui@10.3.0See individual package CHANGELOGs for details.
v10.2.0Compare Source
Published Packages
@node-minify/babel-minify@10.2.0@node-minify/clean-css@10.2.0@node-minify/cli@10.2.0@node-minify/core@10.2.0@node-minify/crass@10.2.0@node-minify/cssnano@10.2.0@node-minify/csso@10.2.0@node-minify/esbuild@10.2.0@node-minify/google-closure-compiler@10.2.0@node-minify/html-minifier@10.2.0@node-minify/imagemin@10.2.0@node-minify/jsonminify@10.2.0@node-minify/lightningcss@10.2.0@node-minify/no-compress@10.2.0@node-minify/oxc@10.2.0@node-minify/run@10.2.0@node-minify/sharp@10.2.0@node-minify/sqwish@10.2.0@node-minify/svgo@10.2.0@node-minify/swc@10.2.0@node-minify/terser@10.2.0@node-minify/types@10.2.0@node-minify/uglify-es@10.2.0@node-minify/uglify-js@10.2.0@node-minify/utils@10.2.0@node-minify/yui@10.2.0See individual package CHANGELOGs for details.
v10.1.1Compare Source
Patch Changes
eb785b0: Fix npm install error caused by unresolved workspace:* references in published packageseb785b0]v10.1.0Compare Source
New Compressors
Other Changes
v10.0.2Compare Source
Patch Changes
156a53d: test: verify OIDC publishing with fixed workflow config156a53d]v10.0.1Compare Source
v10.0.0Compare Source
v10.0.0
Breaking Changes
minify()calls must useawaitor.then().import { minify } from '@node-minify/core').@node-minify/babel-minify(deprecated)@node-minify/uglify-es(deprecated)@node-minify/yui(deprecated)@node-minify/sqwish(deprecated)@node-minify/crass(deprecated)Features & Improvements
tsuptotsdownfor faster and more reliable builds.html-minifierwithhtml-minifier-next.Bug Fixes
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR has been generated by Mend Renovate CLI.
350ba71401b3d304743eView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.