Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
023e7f4
fix(benchmark): isolate warmup temp outputs
srod Mar 8, 2026
a8c32e4
style(utils): wrap long mock setup in test
srod Mar 8, 2026
e08b278
Merge branch 'main' into develop
srod Mar 8, 2026
7262b16
chore(deps): update dependency rimraf to v6.1.3 (#2814)
renovate[bot] Mar 9, 2026
d6592bc
fix(deps): update dependency postcss to v8.5.8 (#2815)
renovate[bot] Mar 10, 2026
8487110
chore(deps): update dependency @changesets/cli to v2.30.0 (#2816)
renovate[bot] Mar 10, 2026
0b1abfc
fix(deps): update astro monorepo (#2819)
renovate[bot] Mar 10, 2026
b6bbd47
chore(deps): update dependency tsdown to ^0.21.0
renovate[bot] Mar 10, 2026
8f83f4c
Merge pull request #2817 from srod/renovate/tsdown-0.x
srod Mar 10, 2026
5b9bec0
fix(deps): update dependency oxc-minify to ^0.117.0
renovate[bot] Mar 10, 2026
6036763
Merge pull request #2818 from srod/renovate/oxlint-monorepo
srod Mar 11, 2026
e30dea8
fix(deps): update dependency oxc-minify to ^0.119.0
renovate[bot] Mar 14, 2026
5e67f38
Merge pull request #2820 from srod/renovate/oxlint-monorepo
srod Mar 14, 2026
11d191b
fix(deps): update dependency terser to v5.46.1 (#2822)
renovate[bot] Mar 16, 2026
814a99c
fix(deps): update dependency oxc-minify to ^0.120.0
renovate[bot] Mar 16, 2026
45fcc6d
Merge pull request #2823 from srod/renovate/oxlint-monorepo
srod Mar 17, 2026
c59ef01
chore(deps): update dependency bun to v1.3.11
renovate[bot] Mar 18, 2026
d6dc79f
Merge pull request #2824 from srod/renovate/bun-1.x
srod Mar 18, 2026
e463ec1
fix(deps): update dependency oxc-minify to ^0.121.0
renovate[bot] Mar 19, 2026
05ffbc0
Merge pull request #2825 from srod/renovate/oxlint-monorepo
srod Mar 19, 2026
92d9d3a
feat(utils): add compressor-status registry
srod Mar 26, 2026
812fa85
feat(types)!: remove deprecated CompressorReturnType and MinifyOption…
srod Mar 26, 2026
754e34e
docs: remove deprecated compressor pages (babel-minify, uglify-es, yu…
srod Mar 26, 2026
2da575b
feat!: remove babel-minify, uglify-es, yui, sqwish, crass packages
srod Mar 26, 2026
2b4f0aa
feat(gcc)!: switch to google-closure-compiler JS API, drop Java wrapper
srod Mar 26, 2026
0603c01
fix: restore removed compressor entries in registry
srod Mar 26, 2026
0c7f2b4
docs: commit deleted deprecated compressor doc pages
srod Mar 26, 2026
fb9e00f
feat!: remove @node-minify/run package
srod Mar 26, 2026
db73ce5
docs: add v11 migration guide and sidebar Guides section
srod Mar 26, 2026
16509d4
docs: add tier labels to compressor pages, add GCC v11 backend note
srod Mar 26, 2026
933bdce
feat(action): fail early for removed compressors, remove yui from TYP…
srod Mar 26, 2026
f77da14
feat(cli): fail early for removed compressors, add tier labels to help
srod Mar 26, 2026
80caaab
chore: update AGENTS.md, FileType JSDoc for v11
srod Mar 26, 2026
ede8925
ci: add guard preventing removed compressors outside migration content
srod Mar 26, 2026
e132520
feat(cli): add node-minify doctor command
srod Mar 26, 2026
1d77cb3
fix: address final wave review issues (doctor null safety, CI guard, …
srod Mar 26, 2026
f7ba5aa
fix: harden doctor scanners and GCC runtime controls
srod Mar 26, 2026
38b02a3
fix(deps): update dependency @astrojs/partytown to v2.1.6 (#2826)
renovate[bot] Mar 26, 2026
eab7330
chore(deps): lock file maintenance (#2821)
renovate[bot] Mar 27, 2026
f425bfb
chore(deps): lock file maintenance (#2827)
renovate[bot] Mar 30, 2026
6b2bc46
fix(deps): update dependency oxc-minify to ^0.123.0
renovate[bot] Mar 31, 2026
5e3f72d
Merge pull request #2828 from srod/renovate/oxlint-monorepo
srod Mar 31, 2026
c154d85
fix(deps): update dependency esbuild to ^0.28.0
renovate[bot] Apr 2, 2026
a318141
Merge pull request #2829 from srod/renovate/esbuild-0.x
srod Apr 3, 2026
73639b4
chore(deps): lock file maintenance (#2830)
renovate[bot] Apr 6, 2026
c6abf45
fix(deps): update dependency postcss to v8.5.9 (#2832)
renovate[bot] Apr 8, 2026
39d7eba
chore(deps): update dependency bun to v1.3.12 (#2833)
renovate[bot] Apr 10, 2026
8ff8d3b
fix(deps): update dependency @astrojs/partytown to v2.1.7 (#2835)
renovate[bot] Apr 13, 2026
3deb5b6
chore(deps): lock file maintenance (#2834)
renovate[bot] Apr 14, 2026
926ae35
fix(deps): update dependency postcss to v8.5.10 (#2836)
renovate[bot] Apr 16, 2026
79ae434
chore(deps): update dependency @changesets/cli to v2.31.0 (#2837)
renovate[bot] Apr 18, 2026
1890679
chore(deps): lock file maintenance (#2838)
renovate[bot] Apr 20, 2026
0887d33
chore(deps): update dependency bun to v1.3.13 (#2839)
renovate[bot] Apr 20, 2026
6ef9549
fix(deps): update dependency ora to v9.4.0 (#2841)
renovate[bot] Apr 22, 2026
82936bb
fix(deps): update dependency terser to v5.46.2 (#2842)
renovate[bot] Apr 23, 2026
730d4d4
fix(deps): update dependency postcss to v8.5.12 (#2844)
renovate[bot] Apr 26, 2026
200e492
fix(deps): update dependency oxc-minify to ^0.128.0
renovate[bot] Apr 27, 2026
0b84431
Merge pull request #2831 from srod/renovate/oxc-minify-0.x
srod Apr 27, 2026
ad2c250
chore(deps): lock file maintenance (#2845)
renovate[bot] Apr 27, 2026
9ce056b
fix(deps): update dependency postcss to v8.5.13 (#2846)
renovate[bot] May 1, 2026
94db82e
chore(deps): lock file maintenance (#2847)
renovate[bot] May 4, 2026
4528ee0
fix(deps): update dependency postcss to v8.5.14 (#2848)
renovate[bot] May 4, 2026
3b6d2f0
fix(deps): update dependency terser to v5.47.1 (#2850)
renovate[bot] May 7, 2026
abbd1f2
fix(deps): update dependency oxc-minify to ^0.129.0
renovate[bot] May 7, 2026
42a6b75
Merge pull request #2849 from srod/renovate/oxc-minify-0.x
srod May 8, 2026
a4d2b77
fix(deps): update dependency @astrojs/cloudflare to v13 [security]
renovate[bot] May 8, 2026
f90dd37
Merge pull request #2843 from srod/renovate/npm-astrojs-cloudflare-vu…
srod May 8, 2026
e9aca87
chore(deps): update dependency bun to v1.3.14 (#2854)
renovate[bot] May 13, 2026
8280183
chore(deps): update dependency @astrojs/ts-plugin to v1.10.8 (#2855)
renovate[bot] May 14, 2026
47d3a93
chore(deps): lock file maintenance (#2852)
renovate[bot] May 14, 2026
4228f98
fix(deps): update dependency oxc-minify to ^0.131.0
renovate[bot] May 15, 2026
ee1f550
Merge pull request #2853 from srod/renovate/oxc-minify-0.x
srod May 18, 2026
2afad53
chore(deps): update dependency @astrojs/ts-plugin to v1.10.9 (#2858)
renovate[bot] May 19, 2026
3a5ec03
fix(deps): update dependency terser to v5.48.0 (#2860)
renovate[bot] May 21, 2026
94b5bb0
fix(deps): update dependency postcss to v8.5.15 (#2859)
renovate[bot] May 22, 2026
7cab5c4
fix(deps): update dependency oxc-minify to ^0.135.0
renovate[bot] Jun 8, 2026
0bc6fe4
Merge pull request #2857 from srod/renovate/oxc-minify-0.x
srod Jun 8, 2026
218e1f7
chore(deps): lock file maintenance
renovate[bot] Jun 8, 2026
215ea24
Merge pull request #2856 from srod/renovate/lock-file-maintenance
srod Jun 8, 2026
903e57e
chore(deps): update dependency @vercel/ncc to ^0.44.0
renovate[bot] Jun 9, 2026
c6a4ff3
Merge pull request #2861 from srod/renovate/vercel-ncc-0.x
srod Jun 9, 2026
e8fdc46
feat(gcc): add buffer limit and harden compiler runtime
srod Jun 22, 2026
1c8de13
feat(registry): add no-compress as legacy compressor
srod Jun 22, 2026
1a1be73
chore(changeset): add v11 cleanup major release note
srod Jun 22, 2026
892384d
docs(plans): add v12 backlog
srod Jun 22, 2026
82c3820
fix(cli): normalize doctor report paths to forward slashes
srod Jun 22, 2026
b87649a
fix: address v11 PR review feedback
srod Jun 22, 2026
aefa44f
fix(gcc): normalize object flag values to KEY=value entries
srod Jun 22, 2026
a124d54
fix: purge removed compressors from shipped docs, action, and release…
srod Jun 22, 2026
39a3426
fix(gcc): quote string define values so they keep string type
srod Jun 22, 2026
33e46a3
ci: harden removed-compressor guard
srod Jun 22, 2026
f5255e9
fix: correct stale removed-compressor references in CLI, action, and …
srod Jun 22, 2026
f33ff48
ci: use grep --exclude-dir/--exclude for guard path filtering
srod Jun 22, 2026
6968861
ci: scan action YAML and scope the removed-name doc filter to docs
srod Jun 22, 2026
311d3dc
ci: correct guard comment on which docs the bare scan covers
srod Jun 22, 2026
bee3698
test: cover gcc runCompiler edge paths and doctor scanner edge cases
srod Jun 22, 2026
5d5067c
test: cover GitHub Action comment, annotations, and summary reporters
srod Jun 22, 2026
226bc26
test: cover remaining edge paths (spinner, filesize, setup, compress,…
srod Jun 22, 2026
f28d5dd
fix(benchmark): clean up partial warmup files when minify throws mid-…
srod Jun 22, 2026
b8a4317
fix(gcc): accept empty compiler output and raise default buffer limit
srod Jun 22, 2026
fecbfc4
perf(cli): prune excluded dirs during doctor scan
srod Jun 22, 2026
03d7b8d
refactor: remove over-engineering from v11 cleanup
srod Jun 22, 2026
05cef7a
fix(action,utils): support gcc alias and scoped removed-package detec…
srod Jun 22, 2026
5377342
chore: drop unused babel-preset-minify and document doctor()
srod Jun 22, 2026
768a648
fix(deps): update dependency ora to v9.4.1 (#2866)
renovate[bot] Jun 22, 2026
1771727
Merge remote-tracking branch 'origin/develop' into v11-cleanup
srod Jun 22, 2026
d665a4d
Merge pull request #2865 from srod/v11-cleanup
srod Jun 22, 2026
ed9f5d2
fix(deps): update dependency oxc-minify to ^0.137.0 (#2864)
renovate[bot] Jun 22, 2026
eaf02b6
fix(deps): update dependency sharp to ^0.35.0 (#2862)
renovate[bot] Jun 22, 2026
d1029b3
chore(deps): update dependency tsdown to ^0.22.0 (#2851)
renovate[bot] Jun 22, 2026
8360cab
fix(deps): update dependency astro to v6 [security] (#2840)
renovate[bot] Jun 22, 2026
0cfc60e
chore(lint): exclude docs/public static assets from biome
srod Jun 22, 2026
af594d7
chore(deps): lock file maintenance (#2863)
renovate[bot] Jun 22, 2026
09253dc
fix(deps): update dependency postcss to v8.5.16 (#2867)
renovate[bot] Jun 28, 2026
ccc22ff
chore(deps): lock file maintenance (#2868)
renovate[bot] Jun 29, 2026
c5edee7
chore(deps): update dependency @astrojs/ts-plugin to v1.10.10 (#2870)
renovate[bot] Jul 2, 2026
97f7b02
chore(deps): lock file maintenance (#2871)
renovate[bot] Jul 6, 2026
9d2d1a8
fix(deps): update dependency terser to v5.49.0 (#2872)
renovate[bot] Jul 9, 2026
0cc3f32
fix(deps): update dependency postcss to v8.5.17 (#2873)
renovate[bot] Jul 12, 2026
de23599
fix(deps): update dependency postcss to v8.5.18 (#2874)
renovate[bot] Jul 13, 2026
c8cf1d7
chore(deps): lock file maintenance (#2875)
renovate[bot] Jul 13, 2026
78dc2b1
fix(deps): update dependency postcss to v8.5.19 (#2876)
renovate[bot] Jul 13, 2026
1faae2c
chore(deps): update dependency @changesets/cli to v2.31.1 (#2877)
renovate[bot] Jul 16, 2026
40cc771
fix(deps): update dependency postcss to v8.5.20 (#2878)
renovate[bot] Jul 19, 2026
a801d76
chore(deps): lock file maintenance (#2879)
renovate[bot] Jul 20, 2026
ad392c9
fix(deps): update dependency postcss to v8.5.21 (#2881)
renovate[bot] Jul 21, 2026
f250efb
fix(deps): update dependency postcss to v8.5.22 (#2882)
renovate[bot] Jul 22, 2026
e3a997a
fix(deps): update dependency postcss to v8.5.23 (#2883)
renovate[bot] Jul 24, 2026
56b0673
chore(deps): lock file maintenance (#2884)
renovate[bot] Jul 27, 2026
2047741
fix(deps): update dependency postcss to v8.5.24 (#2885)
renovate[bot] Jul 28, 2026
edc8ff4
fix(deps): update dependency postcss to v8.5.25 (#2886)
renovate[bot] Jul 29, 2026
4c14ca3
chore(deps): lock file maintenance (#2888)
renovate[bot] Aug 3, 2026
01ce5f2
fix(deps): update dependency terser to v5.49.1 (#2889)
renovate[bot] Aug 4, 2026
ec86b73
fix(deps): update dependency terser to v5.49.2 (#2890)
renovate[bot] Aug 5, 2026
18cfcb5
fix(deps): update dependency postcss to v8.5.26 (#2891)
renovate[bot] Aug 6, 2026
a71c901
chore(deps): lock file maintenance (#2892)
renovate[bot] Aug 10, 2026
3fff5a7
fix(deps): update dependency terser to v5.50.0 (#2894)
renovate[bot] Aug 12, 2026
e1fb6a2
chore(deps): lock file maintenance (#2896)
renovate[bot] Aug 17, 2026
5d4a8b7
chore(deps): update dependency @astrojs/ts-plugin to v1.10.11 (#2897)
renovate[bot] Aug 18, 2026
f7a7f8e
chore(deps): update dependency bun to v1.4.0 (#2898)
renovate[bot] Aug 20, 2026
032ea79
chore(deps): lock file maintenance (#2899)
renovate[bot] Aug 24, 2026
b405e0a
fix(deps): update dependency terser to v5.51.0 (#2900)
renovate[bot] Aug 27, 2026
272e2e5
fix(deps): update dependency terser to v5.51.2 (#2901)
renovate[bot] Aug 27, 2026
d66690a
chore(deps): lock file maintenance (#2902)
renovate[bot] Aug 31, 2026
9542427
chore(deps): update dependency @vercel/ncc to ^0.45.0 (#2895)
renovate[bot] Sep 2, 2026
b4c4cd7
fix(deps): update dependency oxc-minify to ^0.148.0 (#2869)
renovate[bot] Sep 2, 2026
b8548bb
fix(deps): update dependency astro to v7 [security] (#2880)
renovate[bot] Sep 2, 2026
27074d5
fix(deps): regenerate lockfile to repair missing @napi-rs/wasm-runtim…
srod Sep 2, 2026
3f77cc8
feat(node)!: raise minimum Node.js to 22
srod Sep 2, 2026
e5aadfe
docs: document doctor command and Node 22 requirement
srod Sep 2, 2026
5de85b4
docs: use guard-safe doctor sample output
srod Sep 2, 2026
168428b
feat(cli): detect all v11 breaking changes in doctor
srod Sep 2, 2026
0ec8a94
fix(minify-html): call minify through the CommonJS default export
srod Sep 2, 2026
d8180c2
test(cli): cover line resolution for later type-alias imports
srod Sep 2, 2026
e4fa385
fix(cli): close doctor detection gaps and correct npx invocation
srod Sep 2, 2026
666c172
fix(cli): ignore comments and unbounded engine ranges in doctor
srod Sep 2, 2026
0094935
fix: align oxc engines, force LF on shell scripts, sync docs
srod Sep 2, 2026
ad0d150
fix(cli): make doctor comment stripping literal-aware
srod Sep 2, 2026
59c058a
fix: widen guard file types and align README tiers with registry
srod Sep 2, 2026
b2dc29c
ci: run removed-compressor guard on one matrix leg
srod Sep 2, 2026
1d8484c
test(cli): cover escaped quotes in doctor comment stripping
srod Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/fix-minify-html-esm-interop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@node-minify/minify-html": patch
---

Fix `minify-html` throwing `minifyHtmlLib.minify is not a function` at runtime.

`@minify-html/node` is a CommonJS native addon, so under Node's ESM loader its exports are reachable only through the default export. The compressor called `minify` off the namespace object, which is always `undefined` there, making the package fail on every input when consumed from real Node.

The bug was masked in CI: the error test mocked `@minify-html/node` with a flat `{ minify }` shape that does not match the real module, and Vitest's CommonJS interop resolved the namespace differently than Node does. The mock now mirrors the real default-export shape, and a regression test asserts the interop directly.
24 changes: 24 additions & 0 deletions .changeset/v11-cleanup-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@node-minify/core": major
---

v11: cleanup major release.

### Breaking changes

- **Minimum Node.js is now 22**: `engines.node` moved from `>=20.0.0` to `>=22.0.0` across 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.
- **Removed 5 deprecated compressor packages**: `@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).
- **Removed `@node-minify/run`**: internal Java/process-spawn helper, no longer used by any compressor.
- **Removed deprecated type aliases** from `@node-minify/types`: `CompressorReturnType` (use `CompressorResult`) and `MinifyOptions` (use `Settings`).
- **Google Closure Compiler now uses the `google-closure-compiler` npm API** instead of invoking the Java JAR through `@node-minify/run`. Same flags and output. Note: the npm package still bundles `google-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

- **Compressor support tiers**: shared status registry in `@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. Scans `package.json`, source imports, `compressor:` values and workflow YAML for removed/legacy compressors, the removed `@node-minify/run` package, the removed `CompressorReturnType`/`MinifyOptions` type aliases, and `engines.node` ranges that still allow Node below 22. Exits non-zero on errors so it can gate CI.
- **CLI and Action fail early** when a removed compressor is requested, pointing at the replacement.
- **GCC runtime controls**: configurable `buffer` limit (kills the child process when stdout/stderr exceeds it) plus hardened process/timeout/error handling.

### Migration

See the [v11 migration guide](https://github.com/srod/node-minify/blob/main/docs/src/content/docs/guides/v11-migration.md), or run `npx --package=@node-minify/cli -- node-minify doctor` in your project.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Shell scripts must keep LF endings: the Windows CI legs run them through Git
# Bash, which fails to parse `set -euo pipefail\r` if Git checks them out CRLF.
*.sh text eol=lf
4 changes: 2 additions & 2 deletions .github/actions/node-minify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The following inputs are **not supported** in the new action and must be removed

#### Java Compressors Migration

If you use `gcc` or `yui` compressors that require Java:
If you use the `gcc` compressor that requires Java:

**Before (deprecated):**
```yaml
Expand Down Expand Up @@ -99,7 +99,7 @@ The following documentation is for the deprecated composite action.
| `options` | Compressor options (JSON) | No | `{}` |
| `report-summary` | Add results to job summary | No | `true` |
| `include-gzip` | Include gzip sizes | No | `true` |
| `java-version` | Java version for gcc/yui | No | - |
| `java-version` | Java version for gcc | No | - |

### Outputs

Expand Down
25 changes: 12 additions & 13 deletions .github/actions/node-minify/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ inputs:
description: |
Compressor to use.
Recommended: terser, esbuild, swc (fast, no Java).
Note: 'gcc' and 'yui' require Java (pre-installed on GitHub runners).
Note: 'gcc' may invoke Java (pre-installed on GitHub runners).
required: false
default: "terser"
output:
description: "Output file path"
required: true
type:
description: "File type: js or css (required for esbuild, yui)"
description: "File type: js or css (required for esbuild)"
required: false
options:
description: "Compressor-specific options (JSON string)"
Expand All @@ -35,7 +35,7 @@ inputs:
required: false
default: "true"
java-version:
description: "Java version for gcc/yui compressors (optional)"
description: "Java version for gcc compressor (optional)"
required: false

outputs:
Expand Down Expand Up @@ -72,23 +72,17 @@ runs:
run: |
echo "::warning::This action (.github/actions/node-minify) is DEPRECATED. Please migrate to 'uses: srod/node-minify@v1' for the new bundled action with more features (PR comments, annotations, benchmarking)."

- name: Setup Java (for gcc/yui)
if: contains(fromJSON('["gcc", "google-closure-compiler", "yui"]'), inputs.compressor)
- name: Setup Java (for gcc)
if: contains(fromJSON('["gcc", "google-closure-compiler"]'), inputs.compressor)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: When a workflow passes compressor: yui, the install step still runs bun add @node-minify/yui (the yui entry remains in compressor-registry), but the yui Java setup and its deprecation warning were removed. yui requires Java, so remaining users get no explicit Java provisioning and no guidance, and fail only at minification time. Since yui is being dropped, fail fast instead: reject the yui input with a clear error in the alias mapping, or keep the Java setup and warning.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/actions/node-minify/action.yml, line 76:

<comment>When a workflow passes `compressor: yui`, the install step still runs `bun add @node-minify/yui` (the yui entry remains in compressor-registry), but the yui Java setup and its deprecation warning were removed. yui requires Java, so remaining users get no explicit Java provisioning and no guidance, and fail only at minification time. Since yui is being dropped, fail fast instead: reject the `yui` input with a clear error in the alias mapping, or keep the Java setup and warning.</comment>

<file context>
@@ -72,23 +72,17 @@ runs:
-    - name: Setup Java (for gcc/yui)
-      if: contains(fromJSON('["gcc", "google-closure-compiler", "yui"]'), inputs.compressor)
+    - name: Setup Java (for gcc)
+      if: contains(fromJSON('["gcc", "google-closure-compiler"]'), inputs.compressor)
       uses: actions/setup-java@v4
       with:
</file context>

uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ inputs.java-version || '17' }}

- name: Deprecation warning (yui)
if: inputs.compressor == 'yui'
shell: bash
run: |
echo "::warning::YUI Compressor was deprecated by Yahoo in 2013. Consider using 'terser' for JS or 'lightningcss' for CSS."

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
bun-version: "1.4.0"

- name: Install dependencies
shell: bash
Expand All @@ -100,7 +94,12 @@ runs:
mkdir -p "$TEMP_DIR"
cd "$TEMP_DIR"
bun init -y
bun add @node-minify/core @node-minify/utils "@node-minify/${COMPRESSOR}"
# Map friendly compressor aliases to their package name (mirrors resolveAlias in @node-minify/utils).
PACKAGE="$COMPRESSOR"
case "$COMPRESSOR" in
gcc) PACKAGE="google-closure-compiler" ;;
esac
bun add @node-minify/core @node-minify/utils "@node-minify/${PACKAGE}"
cp "$ACTION_PATH/minify.ts" "$TEMP_DIR/"
echo "NODE_MINIFY_ACTION_DIR=$TEMP_DIR" >> $GITHUB_ENV

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/node-minify/minify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async function run(): Promise<void> {

console.log(`Minifying ${inputFile} with ${label}...`);

const requiresType = ["esbuild", "yui"].includes(compressorName);
const requiresType = compressorName === "esbuild";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: yui still requires a type: @node-minify/yui@10.5.0 throws "You must specify a type: js or css" when type is absent, so removing yui from this guard does not relax a real requirement. It only moves the failure from the action's clear pre-flight error into a less specific "Minification failed" message thrown from inside the compressor. Keep yui in the requiresType check (and fix action.yml which claims type is required only for esbuild).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/actions/node-minify/minify.ts, line 112:

<comment>yui still requires a type: @node-minify/yui@10.5.0 throws "You must specify a type: js or css" when `type` is absent, so removing yui from this guard does not relax a real requirement. It only moves the failure from the action's clear pre-flight error into a less specific "Minification failed" message thrown from inside the compressor. Keep yui in the requiresType check (and fix action.yml which claims type is required only for esbuild).</comment>

<file context>
@@ -109,7 +109,7 @@ async function run(): Promise<void> {
         console.log(`Minifying ${inputFile} with ${label}...`);
 
-        const requiresType = ["esbuild", "yui"].includes(compressorName);
+        const requiresType = compressorName === "esbuild";
         if (requiresType && !fileType) {
             console.error(
</file context>
Suggested change
const requiresType = compressorName === "esbuild";
const requiresType = ["esbuild", "yui"].includes(compressorName);

if (requiresType && !fileType) {
console.error(
`::error::Compressor '${compressorName}' requires the 'type' input (js or css)`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
bun-version: "1.4.0"

- name: Setup Node.js
uses: actions/setup-node@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: 📦 Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
bun-version: "1.4.0"

- name: ⚙️ Setup Node
uses: actions/setup-node@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
bun-version: "1.4.0"

- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
bun-version: "1.4.0"

- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20.x, 22.x, 24.x]
node-version: [22.x, 24.x]
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
bun-version: "1.4.0"

- name: Set up JDK 11
uses: actions/setup-java@v5
Expand All @@ -45,6 +45,12 @@ jobs:
- name: Run tests
run: bun run ci

- name: Guard - no removed compressor references
# Static grep over source, docs and action files: OS- and Node-version
# independent, so one leg is enough.
if: runner.os == 'Linux' && matrix.node-version == '22.x'
run: bash scripts/ci-guard-removed-compressors.sh
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.

- name: Upload coverage to Codecov
if: runner.os == 'Linux'
uses: codecov/codecov-action@v5
Expand Down
13 changes: 6 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ This file provides guidance to AI coding assistants when working with code in th
**Generated:** 2026-01-28 | **Commit:** 9b0b0f5f | **Branch:** develop

## Requirements
- **Node.js**: >=20.0.0
- **Node.js**: >=22.0.0
- **Bun**: 1.3.5+ (package manager & runtime)

## Commands
| Task | Command |
|------|---------|
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
| Install | `bun install` |
| Build all | `bun run build` |
| Build deps first | `bun run build:deps` (utils + run) |
| Build deps first | `bun run build:deps` (utils) |
| Lint | `bun run lint` |
| Format | `bun run format` |
| Typecheck | `bun run typecheck` |
| Test all | `bun run test` |
| Test package | `bun run test packages/<name>` |
| Test file | `bun run test packages/core/__tests__/core.test.ts` |
| Doctor | `node-minify doctor` |
| CI (full) | `bun run ci` |
| Add changeset | `bun run changeset` |

Expand All @@ -42,7 +43,6 @@ packages/
├── core/ # Main minify() function
├── utils/ # Shared utilities (see packages/utils/AGENTS.md)
├── types/ # TypeScript definitions (no build, exports src/types.d.ts)
├── run/ # Java process wrapper (YUI, GCC)
├── cli/ # Commander.js CLI
├── benchmark/ # Compressor comparison tool
├── action/ # GitHub Action (see packages/action/AGENTS.md)
Expand All @@ -59,7 +59,7 @@ packages/
| **JSON** | `jsonminify` | - |
| **Images** | `sharp` (WebP/AVIF), `svgo` (SVG), `imagemin` (PNG/JPEG/GIF) | - |

**Deprecated** (emit warnings): `babel-minify`, `uglify-es`, `yui`, `crass`, `sqwish`
**Removed** (v11): `babel-minify`, `uglify-es`, `yui`, `crass`, `sqwish`

### Dependencies
```
Expand All @@ -70,7 +70,7 @@ benchmark → core + utils
compressors → utils + types
```

**Build order**: `utils` + `run` first → all others parallel
**Build order**: `utils` first → all others parallel

### Package Pattern
```
Expand Down Expand Up @@ -130,7 +130,7 @@ export async function myCompressor({ settings, content }: MinifierOptions): Prom

**Convention**: Tests auto-isolate to `tests/tmp/` when using `replaceInPlace` or `$1` output patterns.

**Timeouts**: Core/YUI packages use 60s timeout for slow Java compressors.
**Timeouts**: Some packages use 60s timeout for slow compressors.

## Changesets

Expand Down Expand Up @@ -197,4 +197,3 @@ cd docs && bun run build # Production build
| Type errors | Run `bun run build` (types from `dist/`) |
| Test isolation | Uses `tests/tmp/` (gitignored) |
| Clean rebuild | `bun run clean && bun run build` |
| Java compressors | Ensure Java installed for `yui`/`gcc` |
45 changes: 25 additions & 20 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ It allows you to compress JavaScript, CSS, HTML, and image files.
- [swc](https://node-minify.2clics.net/compressors/swc)
- [terser](https://node-minify.2clics.net/compressors/terser)
- [uglify-js](https://node-minify.2clics.net/compressors/uglify-js)
- [babel-minify](https://node-minify.2clics.net/compressors/babel-minify) _(deprecated)_
- [uglify-es](https://node-minify.2clics.net/compressors/uglify-es) _(deprecated)_
- [YUI Compressor](https://node-minify.2clics.net/compressors/yui) _(deprecated)_

**CSS:**

Expand All @@ -34,12 +31,10 @@ It allows you to compress JavaScript, CSS, HTML, and image files.
- [CSSO](https://node-minify.2clics.net/compressors/csso)
- [esbuild](https://node-minify.2clics.net/compressors/esbuild)
- [lightningcss](https://node-minify.2clics.net/compressors/lightningcss)
- [crass](https://node-minify.2clics.net/compressors/crass) _(deprecated)_
- [sqwish](https://node-minify.2clics.net/compressors/sqwish) _(deprecated)_
- [YUI Compressor](https://node-minify.2clics.net/compressors/yui) _(deprecated)_

**HTML:**

- [minify-html](https://node-minify.2clics.net/compressors/minify-html) - Rust-based, recommended
- [html-minifier](https://node-minify.2clics.net/compressors/html-minifier)

**JSON:**
Expand All @@ -64,6 +59,15 @@ It allows you to compress JavaScript, CSS, HTML, and image files.

- [Benchmark](https://node-minify.2clics.net/benchmark) - Compare compressor performance

**Upgrading:**

- [v11 Migration Guide](https://node-minify.2clics.net/guides/v11-migration) - Run `npx --package=@node-minify/cli -- node-minify doctor` to scan your project

## Requirements

- **Node.js**: 22 or higher
- **Module System**: ESM only (`"type": "module"` in package.json)

## Installation

```bash
Expand All @@ -82,36 +86,37 @@ And install the compressor(s) you want:

```bash
npm install @node-minify/terser # Recommended - modern, fast, well-maintained
npm install @node-minify/esbuild # Extremely fast, also handles CSS
npm install @node-minify/swc # Rust-based, very fast
npm install @node-minify/oxc # Rust-based, cutting-edge
npm install @node-minify/uglify-js # Classic, battle-tested
npm install @node-minify/google-closure-compiler # Advanced optimizations
npm install @node-minify/esbuild # Recommended - extremely fast, also handles CSS
npm install @node-minify/swc # Recommended - Rust-based, very fast
npm install @node-minify/oxc # Recommended - Rust-based, cutting-edge
npm install @node-minify/uglify-js # Supported - classic, battle-tested
npm install @node-minify/google-closure-compiler # Supported - advanced optimizations
```

### CSS Compressors

```bash
npm install @node-minify/lightningcss # Recommended - Rust-based, fastest
npm install @node-minify/esbuild # Also handles JS
npm install @node-minify/clean-css # Feature-rich, reliable
npm install @node-minify/cssnano # PostCSS-based, customizable
npm install @node-minify/csso # Structural optimizations
npm install @node-minify/cssnano # Recommended - PostCSS-based, customizable
npm install @node-minify/esbuild # Recommended - also handles JS
npm install @node-minify/clean-css # Supported - feature-rich, reliable
npm install @node-minify/csso # Supported - structural optimizations
```

### HTML & Other

```bash
npm install @node-minify/html-minifier # HTML minification
npm install @node-minify/jsonminify # JSON minification
npm install @node-minify/minify-html # Recommended - Rust-based, fastest
npm install @node-minify/html-minifier # Supported - feature-rich HTML minification
npm install @node-minify/jsonminify # Legacy - JSON minification
```

### Image Compressors

```bash
npm install @node-minify/sharp # WebP/AVIF conversion, high performance
npm install @node-minify/svgo # SVG optimization
npm install @node-minify/imagemin # PNG/JPEG/GIF compression
npm install @node-minify/sharp # Recommended - WebP/AVIF conversion, high performance
npm install @node-minify/svgo # Recommended - SVG optimization
npm install @node-minify/imagemin # Supported - PNG/JPEG/GIF compression
```

## Quick Start
Expand Down
5 changes: 2 additions & 3 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const result = await minify({
| **Images** | `sharp` (WebP/AVIF) | `svgo` (SVG), `imagemin` (PNG/JPEG/GIF) |
| **Utility** | `no-compress` | Pass-through for concatenation without minification |

**Deprecated (avoid)**: `babel-minify`, `uglify-es`, `yui`, `crass`, `sqwish`
**Removed in v11** (will fail; use a replacement above): `babel-minify`, `uglify-es`, `yui`, `crass`, `sqwish`

## API Reference

Expand All @@ -62,7 +62,7 @@ type Settings = {
output?: string | string[]; // Output path(s) or pattern: "$1.min.js"
content?: string | Buffer; // In-memory content (skip input/output)
options?: Record<string, unknown>; // Compressor-specific options
type?: "js" | "css"; // Required for esbuild, yui
type?: "js" | "css"; // Required for esbuild
publicFolder?: string; // Prepend to input paths
replaceInPlace?: boolean; // Overwrite input files
silence?: boolean; // Suppress console output
Expand Down Expand Up @@ -158,7 +158,6 @@ await minify({
| `esbuild` | Requires `type: "js"` or `type: "css"` |
| `lightningcss` | Uses Buffer internally, supports `targets: { chrome: 95 }` |
| `google-closure-compiler` | Requires Java; advanced optimizations available |
| `yui` | Deprecated; requires Java; needs `type` |

## Error Handling

Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ inputs:
description: |
Compressor to use.
Recommended: terser, esbuild, swc, oxc (fast, no Java).
Note: 'gcc' and 'yui' require Java (pre-installed on GitHub runners).
Note: 'gcc' may invoke Java (pre-installed on GitHub runners).
required: false
default: "terser"
type:
description: "File type: js or css (required for esbuild, yui)"
description: "File type: js or css (required for esbuild)"
required: false
options:
description: "Compressor-specific options (JSON string)"
Expand Down
Loading
Loading