v11: cleanup major release#2865
Conversation
…i, sqwish, crass)
BREAKING CHANGE: 5 deprecated compressor packages deleted. Removed all cross-references from cli config, core tests, examples, compressor-resolver, and compressor-registry.
- Replace @node-minify/run + google-closure-compiler-java with google-closure-compiler@20240317.0.0 - Use Compiler class JS API: options object + stdin pipe instead of raw process spawning - Add wrapMinificationError for consistent error handling - Repurpose types.d.ts for google-closure-compiler module declaration - Remove runCommandLine mocks from tests, add in-memory + invalid JS tests - All 25 tests pass, typecheck clean
isRemovedCompressor() needs these entries for CLI fail-fast and doctor command.
…E_REQUIRED_COMPRESSORS - Remove 'yui' from TYPE_REQUIRED_COMPRESSORS (only esbuild requires type) - Replace DEPRECATED_COMPRESSORS warning logic with hard errors via isRemovedCompressor() - validateCompressor() now throws for removed compressors with replacement guidance - Add tests for removed compressor error handling - Rebuild dist/index.js with updated logic - All 188 tests pass
- Add fail-fast check in runOne() for removed compressors before resolveCompressor() - Error message includes replacement guidance from registry - Update displayCompressorsList() to group compressors by tier (recommended, supported, legacy) - Add 5 tests for removed compressor behavior (babel-minify, uglify-es, yui, sqwish, crass) - Remove unused AVAILABLE_MINIFIER import from cli.ts
- Remove @node-minify/run from Package Map and build order - Add 'doctor' command to Commands table - Change 'Deprecated' to 'Removed (v11)' for babel-minify, uglify-es, yui, crass, sqwish - Update FileType JSDoc: YUI → esbuild example - Remove Java compressor troubleshooting row - Update timeout note to remove YUI/Java references
…GCC type assertion)
Doctor:
- scan compressor assignments in source (compressor: "babel-minify")
- anchor regex to reject substring matches (decompressor)
- support quoted keys ("compressor":)
- recurse all workspace package.json, not just packages/*
- restrict to exact package.json basename
- scan peerDependencies + optionalDependencies
- add .jsx/.tsx/.mts/.cts to source extensions
- use path.join for parent dir (Windows compat)
GCC:
- forward settings.timeout (kill child process on exceed)
- forward settings.silence (suppress stderr in errors)
CI:
- fix YAML indentation in test.yml workflow steps
🦋 Changeset detectedLatest commit: 1771727 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR implements the node-minify v11 release: removes five deprecated compressor packages ( Changesv11 Compressor Cleanup and Doctor CLI
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI as node-minify CLI
participant runOne
participant guard as isRemovedCompressor
participant registry as COMPRESSOR_REGISTRY
User->>CLI: run --compressor babel-minify
CLI->>runOne: config
runOne->>guard: "babel-minify"
guard->>registry: lookup status
registry-->>guard: status removed
guard-->>runOne: true
runOne->>registry: getCompressorEntry
registry-->>runOne: { replacement: "terser" }
runOne-->>CLI: throw Error with terser suggestion
CLI-->>User: exit with error guidance
sequenceDiagram
participant User
participant DoctorCLI as doctor()
participant runDoctor
participant scanPackageJson
participant scanSourceImports
participant scanWorkflowYaml
participant report as reportFindings
User->>DoctorCLI: node-minify doctor
DoctorCLI->>runDoctor: process.cwd()
runDoctor->>scanPackageJson: scan dependencies
scanPackageJson-->>runDoctor: [removed, legacy] findings
runDoctor->>scanSourceImports: scan source files
scanSourceImports-->>runDoctor: [removed, legacy] findings
runDoctor->>scanWorkflowYaml: scan workflows
scanWorkflowYaml-->>runDoctor: [removed, legacy] findings
runDoctor->>report: aggregate findings
report-->>report: sort ERROR before WARNING
report-->>DoctorCLI: exit code (1 if errors, 0 if warnings only)
DoctorCLI->>DoctorCLI: process.exit(code)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
3 issues found and verified against the latest diff
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/plans/2026-03-14-v11-plan.md">
<violation number="1" location="docs/plans/2026-03-14-v11-plan.md:41">
P2: `clean-css` appears in contradictory support tiers: both "Supported but not recommended" and "Recommended" CSS options. This directly conflicts the stated plan to de-emphasize it (per the Assumptions section).</violation>
</file>
<file name="packages/benchmark/src/runner.ts">
<violation number="1" location="packages/benchmark/src/runner.ts:57">
P2: Orphan warmup files when `minify()` throws mid-loop in `runWarmup`. Already-created partial files are never cleaned up because neither `runWarmup` nor the caller's catch block tracks them.</violation>
</file>
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
packages/benchmark/__tests__/runner-warmup.test.ts (1)
24-38: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueConsider also asserting the returned warmup file paths.
The test verifies that
minifyis called with distinct output paths, but doesn't assert thatrunWarmupreturns those paths. This would strengthen coverage of the new return contract.💡 Suggested enhancement
- await runWarmup( + const warmupFiles = await runWarmup( "fixture.js", vi.fn() as never, "fixture.js.warmup.tmp", 2, {} ); expect(minify).toHaveBeenCalledTimes(2); const outputs = minify.mock.calls.map( ([args]) => (args as { output: string }).output ); expect(new Set(outputs).size).toBe(2); + expect(warmupFiles).toEqual(outputs);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/benchmark/__tests__/runner-warmup.test.ts` around lines 24 - 38, The test verifies that minify is called with distinct output paths but does not assert that the runWarmup function returns those paths. Capture the return value from the runWarmup function call and add an expectation to verify that the returned value contains or matches the warmup file paths that were generated (the outputs from the minify mock calls). This will strengthen test coverage by confirming that runWarmup properly returns the paths according to its new return contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/src/content/docs/guides/v11-migration.md`:
- Around line 38-45: The support tiers for compressors are misaligned with the
v11 plan. Move `jsonminify` from the Supported section to the Legacy section,
and move `google-closure-compiler` from the Legacy section to the Supported
section. This will ensure the migration documentation accurately reflects the
actual support status of each compressor in v11.
In `@packages/action/src/inputs.ts`:
- Around line 166-175: The JSDoc comment for the validateCompressor function is
missing the required `@returns` tag. Add a `@returns` tag to the JSDoc comment block
for validateCompressor that documents what the function returns (or void if it
returns nothing), ensuring the documentation complies with the coding guideline
that all exported functions must have both `@param` and `@returns` JSDoc tags.
In `@packages/google-closure-compiler/__tests__/google-closure-compiler.test.ts`:
- Around line 150-163: The test function "should suppress stderr details when
silence is true" lacks an assertion that the gcc call actually rejects. If gcc
unexpectedly resolves instead of throwing an error, the catch block never
executes and no assertions run, allowing the test to pass incorrectly. Add a
fail assertion after the try/catch block using expect.fail() to ensure the test
fails if the gcc call does not throw an error as expected.
In `@packages/google-closure-compiler/src/types.d.ts`:
- Line 1: The types.d.ts file is missing the required MIT license header at the
top. Add the MIT license header comment before the declare module statement. The
header should follow the format specified in the project guidelines: a comment
starting with /*! containing node-minify and MIT Licensed text. This header must
be placed on the first line of the file, before any TypeScript declarations like
the declare module statement.
In `@packages/utils/__tests__/compressor-registry.test.ts`:
- Around line 61-63: Remove the test case "returns empty array for non-existent
status" entirely. This test attempts to pass an invalid status "unknown" to
getCompressorsByStatus by using type suppression with `as any`. Since
CompressorStatus is a strict union type that only allows "recommended",
"supported", "legacy", or "removed", TypeScript's type system already prevents
this invalid scenario, making the test unnecessary and unmaintainable.
In `@packages/utils/src/compressor-registry.ts`:
- Around line 112-116: The notes field in the google-closure-compiler registry
entry contains outdated information stating it requires Java, but version 11 has
migrated to use the Node API. Update the notes field in the
google-closure-compiler object to accurately reflect that it now uses the Node
API instead of requiring Java, ensuring the metadata provides correct guidance
for users reviewing supported compressors.
In `@scripts/ci-guard-removed-compressors.sh`:
- Around line 4-11: The REMOVED_PACKAGES pattern and grep search scope are too
narrow. First, expand the REMOVED_PACKAGES regex pattern to match both the
scoped package names (e.g., `@node-minify/yui`) AND plain compressor identifiers
(e.g., yui without the `@node-minify/` prefix) to catch references like
"compressor: yui". Second, expand the directory scope beyond just packages/ and
examples/ to include root-level files and workflow files (such as .github/
directory) where compressor references might exist. Update both the regex
pattern in the REMOVED_PACKAGES variable and the directory paths passed to the
grep command to broaden the search coverage and improve the CI guard
effectiveness.
---
Nitpick comments:
In `@packages/benchmark/__tests__/runner-warmup.test.ts`:
- Around line 24-38: The test verifies that minify is called with distinct
output paths but does not assert that the runWarmup function returns those
paths. Capture the return value from the runWarmup function call and add an
expectation to verify that the returned value contains or matches the warmup
file paths that were generated (the outputs from the minify mock calls). This
will strengthen test coverage by confirming that runWarmup properly returns the
paths according to its new return contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d9aecc7c-a9b9-4ce0-b758-83acf25b14cf
⛔ Files ignored due to path filters (3)
.changeset/v11-cleanup-major.mdis excluded by!.changeset/**bun.lockis excluded by!**/*.lockpackages/yui/src/binaries/yuicompressor-2.4.7.jaris excluded by!**/*.jar
📒 Files selected for processing (113)
.github/actions/node-minify/action.yml.github/workflows/codeql.yml.github/workflows/publish.yml.github/workflows/release-action.yml.github/workflows/test-action.yml.github/workflows/test.ymlAGENTS.mddocs/package.jsondocs/plans/2026-03-14-v11-plan.mddocs/src/consts.tsdocs/src/content/docs/compressors/babel-minify.mddocs/src/content/docs/compressors/clean-css.mddocs/src/content/docs/compressors/crass.mddocs/src/content/docs/compressors/cssnano.mddocs/src/content/docs/compressors/csso.mddocs/src/content/docs/compressors/esbuild.mddocs/src/content/docs/compressors/gcc.mddocs/src/content/docs/compressors/html-minifier.mddocs/src/content/docs/compressors/imagemin.mddocs/src/content/docs/compressors/jsonminify.mddocs/src/content/docs/compressors/lightningcss.mddocs/src/content/docs/compressors/oxc.mddocs/src/content/docs/compressors/sharp.mddocs/src/content/docs/compressors/sqwish.mddocs/src/content/docs/compressors/svgo.mddocs/src/content/docs/compressors/swc.mddocs/src/content/docs/compressors/terser.mddocs/src/content/docs/compressors/uglify-es.mddocs/src/content/docs/compressors/uglify-js.mddocs/src/content/docs/compressors/yui.mddocs/src/content/docs/guides/v11-migration.mdexamples/package.jsonexamples/server.jspackage.jsonpackages/action/__tests__/inputs.test.tspackages/action/src/inputs.tspackages/babel-minify/CHANGELOG.mdpackages/babel-minify/LICENSEpackages/babel-minify/README.mdpackages/babel-minify/__tests__/babel-minify.test.tspackages/babel-minify/package.jsonpackages/babel-minify/src/index.tspackages/babel-minify/src/types.d.tspackages/babel-minify/tsconfig.jsonpackages/babel-minify/vitest.config.tspackages/benchmark/__tests__/runner-warmup.test.tspackages/benchmark/src/runner.tspackages/cli/__tests__/cli.test.tspackages/cli/__tests__/doctor.test.tspackages/cli/package.jsonpackages/cli/src/bin/cli.tspackages/cli/src/config.tspackages/cli/src/doctor.tspackages/cli/src/index.tspackages/core/__tests__/core.test.tspackages/crass/CHANGELOG.mdpackages/crass/LICENSEpackages/crass/README.mdpackages/crass/__tests__/crass-error.test.tspackages/crass/__tests__/crass.test.tspackages/crass/package.jsonpackages/crass/src/index.tspackages/crass/src/types.d.tspackages/crass/tsconfig.jsonpackages/crass/vitest.config.tspackages/cssnano/package.jsonpackages/google-closure-compiler/__tests__/google-closure-compiler.test.tspackages/google-closure-compiler/package.jsonpackages/google-closure-compiler/src/index.tspackages/google-closure-compiler/src/types.d.tspackages/oxc/package.jsonpackages/run/CHANGELOG.mdpackages/run/LICENSEpackages/run/README.mdpackages/run/__tests__/run.test.tspackages/run/package.jsonpackages/run/src/index.tspackages/run/tsconfig.jsonpackages/run/vitest.config.tspackages/sqwish/CHANGELOG.mdpackages/sqwish/LICENSEpackages/sqwish/README.mdpackages/sqwish/__tests__/sqwish-error.test.tspackages/sqwish/__tests__/sqwish.test.tspackages/sqwish/package.jsonpackages/sqwish/src/index.tspackages/sqwish/src/types.d.tspackages/sqwish/tsconfig.jsonpackages/sqwish/vitest.config.tspackages/terser/package.jsonpackages/types/src/types.d.tspackages/uglify-es/CHANGELOG.mdpackages/uglify-es/LICENSEpackages/uglify-es/README.mdpackages/uglify-es/__tests__/uglify-es.test.tspackages/uglify-es/package.jsonpackages/uglify-es/src/index.tspackages/uglify-es/tsconfig.jsonpackages/uglify-es/vitest.config.tspackages/utils/__tests__/compressor-registry.test.tspackages/utils/__tests__/utils.test.tspackages/utils/src/compressor-registry.tspackages/utils/src/compressor-resolver.tspackages/utils/src/index.tspackages/yui/CHANGELOG.mdpackages/yui/LICENSEpackages/yui/README.mdpackages/yui/__tests__/yui.test.tspackages/yui/package.jsonpackages/yui/src/index.tspackages/yui/tsconfig.jsonpackages/yui/vitest.config.tsscripts/ci-guard-removed-compressors.sh
💤 Files with no reviewable changes (61)
- docs/src/content/docs/compressors/babel-minify.md
- packages/crass/CHANGELOG.md
- packages/sqwish/src/types.d.ts
- docs/src/content/docs/compressors/yui.md
- packages/sqwish/tests/sqwish.test.ts
- packages/crass/LICENSE
- packages/yui/tests/yui.test.ts
- packages/yui/LICENSE
- packages/crass/tsconfig.json
- packages/run/vitest.config.ts
- packages/sqwish/tsconfig.json
- packages/crass/package.json
- packages/babel-minify/src/types.d.ts
- docs/src/content/docs/compressors/sqwish.md
- packages/crass/vitest.config.ts
- packages/babel-minify/README.md
- packages/sqwish/tests/sqwish-error.test.ts
- packages/uglify-es/tsconfig.json
- packages/run/src/index.ts
- packages/yui/tsconfig.json
- packages/babel-minify/LICENSE
- packages/sqwish/package.json
- packages/run/CHANGELOG.md
- packages/crass/tests/crass.test.ts
- packages/babel-minify/tsconfig.json
- packages/crass/tests/crass-error.test.ts
- packages/uglify-es/vitest.config.ts
- packages/sqwish/LICENSE
- packages/uglify-es/tests/uglify-es.test.ts
- packages/yui/README.md
- docs/src/content/docs/compressors/uglify-es.md
- packages/crass/src/index.ts
- packages/sqwish/CHANGELOG.md
- docs/src/content/docs/compressors/crass.md
- packages/run/README.md
- packages/run/tests/run.test.ts
- packages/yui/vitest.config.ts
- packages/uglify-es/LICENSE
- packages/utils/src/compressor-resolver.ts
- packages/sqwish/README.md
- packages/uglify-es/README.md
- packages/yui/CHANGELOG.md
- packages/crass/README.md
- packages/babel-minify/package.json
- packages/uglify-es/CHANGELOG.md
- packages/cli/src/config.ts
- packages/uglify-es/package.json
- packages/babel-minify/tests/babel-minify.test.ts
- packages/run/tsconfig.json
- packages/yui/package.json
- packages/run/LICENSE
- packages/babel-minify/src/index.ts
- packages/crass/src/types.d.ts
- packages/run/package.json
- packages/sqwish/vitest.config.ts
- packages/sqwish/src/index.ts
- packages/babel-minify/vitest.config.ts
- packages/yui/src/index.ts
- packages/uglify-es/src/index.ts
- packages/babel-minify/CHANGELOG.md
- examples/server.js
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/plans/2026-06-22-v12-backlog.md (1)
28-28: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueMinor clarity improvement: add "that" for grammatical flow.
Line 28 would read more smoothly with the addition of "that" after "so". Current: "...so removal is itself a breaking change..." → Suggested: "...so that removal is itself a breaking change..."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/plans/2026-06-22-v12-backlog.md` at line 28, Fix the grammatical flow in the sentence on line 28 by adding the word "that" after "so". In the phrase that currently reads "so removal is itself a breaking change", insert "that" between "so" and "removal" to read "so that removal is itself a breaking change" for improved grammatical clarity and readability.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docs/plans/2026-06-22-v12-backlog.md`:
- Line 28: Fix the grammatical flow in the sentence on line 28 by adding the
word "that" after "so". In the phrase that currently reads "so removal is itself
a breaking change", insert "that" between "so" and "removal" to read "so that
removal is itself a breaking change" for improved grammatical clarity and
readability.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d7da066b-d168-44e4-aa3d-3f689301f202
📒 Files selected for processing (2)
docs/plans/2026-06-22-v12-backlog.mdpackages/cli/src/doctor.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/cli/src/doctor.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/google-closure-compiler/src/index.ts (1)
145-154:⚠️ Potential issue | 🟠 MajorRemove the empty output length check; rely on exit code validation.
Line 145 rejects
stdOut.length === 0as a failure, but Google Closure Compiler can legitimately produce empty output when compiling comment-only or whitespace-only input while exiting successfully. The exit code (checked at line 131) is the correct signal for failure. Removing the length check also aligns with how other compressors (e.g., Terser) validate output—checking only the type, not the length—and allows the framework'sallowEmptyOutputsetting to work as designed.🐛 Proposed fix
- if (typeof stdOut !== "string" || stdOut.length === 0) { + if (typeof stdOut !== "string") { rejectOnce( new Error( - "Google Closure Compiler failed: empty result" + "Google Closure Compiler failed: missing result" ) ); return; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/google-closure-compiler/src/index.ts` around lines 145 - 154, The condition in the if statement that rejects when stdOut.length equals zero is too strict and prevents legitimate empty outputs from being accepted. Remove the stdOut.length === 0 check from the condition while keeping the typeof stdOut !== "string" type validation, since the exit code validation at line 131 is the correct signal for compiler failure and empty output can be valid when compiling comment-only or whitespace-only input.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@packages/google-closure-compiler/src/index.ts`:
- Around line 145-154: The condition in the if statement that rejects when
stdOut.length equals zero is too strict and prevents legitimate empty outputs
from being accepted. Remove the stdOut.length === 0 check from the condition
while keeping the typeof stdOut !== "string" type validation, since the exit
code validation at line 131 is the correct signal for compiler failure and empty
output can be valid when compiling comment-only or whitespace-only input.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1d5e5954-36bc-4db5-b18c-9667fc29a87c
⛔ Files ignored due to path filters (1)
.changeset/v11-cleanup-major.mdis excluded by!.changeset/**
📒 Files selected for processing (14)
.github/actions/node-minify/action.ymlReadme.mdaction.ymldocs/plans/2026-06-22-v12-backlog.mddocs/src/content/docs/getting-started.mddocs/src/content/docs/github-action.mddocs/src/content/docs/introduction.mddocs/src/content/docs/options.mdpackages/action/action.ymlpackages/google-closure-compiler/__tests__/google-closure-compiler.test.tspackages/google-closure-compiler/src/index.tspackages/google-closure-compiler/src/types.d.tspackages/utils/__tests__/compressor-registry.test.tsscripts/ci-guard-removed-compressors.sh
💤 Files with no reviewable changes (4)
- docs/src/content/docs/getting-started.md
- Readme.md
- packages/utils/tests/compressor-registry.test.ts
- docs/src/content/docs/introduction.md
✅ Files skipped from review due to trivial changes (4)
- docs/plans/2026-06-22-v12-backlog.md
- packages/action/action.yml
- docs/src/content/docs/options.md
- action.yml
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/google-closure-compiler/src/types.d.ts
- packages/google-closure-compiler/tests/google-closure-compiler.test.ts
There was a problem hiding this comment.
3 issues found across 15 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/benchmark/src/runner.ts">
<violation number="1" location="packages/benchmark/src/runner.ts:57">
P2: Orphan warmup files when `minify()` throws mid-loop in `runWarmup`. Already-created partial files are never cleaned up because neither `runWarmup` nor the caller's catch block tracks them.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 11 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/benchmark/src/runner.ts">
<violation number="1" location="packages/benchmark/src/runner.ts:57">
P2: Orphan warmup files when `minify()` throws mid-loop in `runWarmup`. Already-created partial files are never cleaned up because neither `runWarmup` nor the caller's catch block tracks them.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
3 issues found across 5 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
You're iterating quickly on this pull request. To help protect your rate limits, cubic has paused automatic reviews on new pushes for now—when you're ready for another review, comment |
Add maxBuffer support (settings.buffer, default 1 MiB) that kills the child process when stdout/stderr exceeds the limit. Rewrite runCompiler with a single settled guard (resolveOnce/rejectOnce), add error and stdin error handlers, and fix the timeout race. Switch to the default import for Node ESM interop.
Register no-compress as the 22nd compressor (legacy status) for passthrough concatenation and unknown types.
Major bump (10.5.0 -> 11.0.0) for the whole @node-minify/* fixed group. Documents removed compressors/run package/type aliases, the GCC JS API switch, and the new tier registry, doctor command, and GCC buffer limit.
Track deferrals from v11 cleanup: remaining doctor scanners (type-alias and GCC/Java guidance), buildArgs/toBuildArgsOptions deprecation, list unification, @MNFY rebrand, tier reassessment, and npm-deprecate ops.
doctor emitted OS-native path separators, so on Windows findings read "src\config.ts" and the doctor tests (asserting "src/config.ts") failed in CI. Normalize the reported path to forward slashes for stable, copy-pasteable output across platforms.
- docs(migration): align support-tier lists with the registry source of
truth (html-minifier/GCC are Supported, cssnano Recommended, jsonminify
Legacy) — flagged by cubic and CodeRabbit.
- registry: correct the stale GCC note ("requires Java") to describe the
v11 npm API backend and the upstream-Java caveat.
- gcc(types): add the MIT license header to the typings file.
- gcc(test): make the silence-mode test reject explicitly so it can't
false-pass if gcc resolves.
- action: add the missing @returns tag to validateCompressor (AGENTS.md).
- docs(v12-backlog): log the deferred CI-guard widening and benchmark
warmup cleanup; minor grammar fix.
Object-valued flags like `define: { DEBUG: false }` reached the compiler
as `--define=[object Object]` because the value was passed through
verbatim. Normalize objects to repeated `KEY=value` entries (the form
Closure expects), keep string/boolean/string[] as-is, and drop anything
else. Export applyOptions and assert the serialized flags in a test.
… notes Code-review found v11-removed compressors still advertised in published content even though the runtime now rejects them: - docs: drop babel-minify/uglify-es/yui/sqwish/crass from getting-started, options, introduction, github-action, and the root README; reframe the Action "deprecated" table as "removed" with replacements. - action.yml (published + legacy composite): stop advertising yui in the compressor/type inputs; remove the yui Java setup and warning steps. - changeset: correct the false "Java JAR dependency is gone" claim — the google-closure-compiler npm package still bundles the JAR, so Java may still run; v11 only drops node-minify's custom Java plumbing. - ci-guard: broaden to scan the docs site, .github actions, root README, and bare `compressor:` YAML values so these refs can't regress (migration guides excluded). Catches what slipped through before. - registry test: drop the `as any` invalid-status case per repo rules. - v12-backlog: retire the now-done guard item; log the stale Migrate.md.
Object `define` options now JSON-quote string values, so { NAME: "false" }
defines the string "false" instead of the boolean false. Only string, number,
and boolean entries are emitted; null/undefined/nested values are skipped.
Also wraps the process/stdin error constructors to satisfy the formatter.
Exclusions now match the path portion of each match only, so a removed name appearing inside a line of code (e.g. a comment mentioning node_modules) can no longer mask a real violation. Also adds a bare-name scan over CLI/action source and the shipped skill/agent docs, and scans the root package.json for removed dependencies.
…docs - CLI help and the action's type-required check no longer mention the removed yui compressor - SKILL.md and the action docs label the five v11-removed compressors as "removed" (they fail early) instead of "deprecated" - drop yui from the legacy composite-action README - remove clean-css from the recommended-CSS list in the v11 plan to match the registry (supported tier)
Replaces the regex line-anchored exclusion filters with grep's native --exclude-dir/--exclude, so excluded locations are skipped by path at the source rather than filtered out of the match stream. A removed name appearing inside a matched line (e.g. a comment mentioning node_modules or CHANGELOG) can no longer mask a real violation. Behavior is unchanged for real violations and genuinely excluded paths.
- the bare-name scan now includes *.yml/*.yaml, so a removed compressor named in a composite-action manifest (outside a `compressor:` value) can no longer bypass the guard - the "removed"/"use instead" content filter now applies only to the .md doc scan; code and action YAML are checked strictly, so a source line that happens to contain "removed" can no longer hide a real match
The 3b comment wrongly implied the docs site and packages/action/README.md rely on the content filter. They are intentionally out of the bare scan and covered only by the scoped pass (#1); reword to say so. No behavior change.
google-closure-compiler (90% -> 99% lines): a mocked compiler now exercises the runCompiler error and buffer-limit branches (process/stdin 'error' events, empty result, stdout overflow for Buffer and string chunks, double-settle, missing stdin), plus applyOptions cases for unsupported flag-value shapes. doctor (95% -> 99% lines): cover a missing scan target, a non-directory .github/workflows, a non-object package.json, imports of supported packages, blank workflow lines, the process.cwd() default, and the doctor() entrypoint. Remaining uncovered lines are unreachable defensive guards (double-resolve in gcc; empty regex capture groups in doctor).
Brings the action package's reporting/annotation surfaces to full line coverage: - comment.ts (3% -> 100%): postPRComment token/non-PR guards, create vs update, the base-comparison column, and API-failure handling (mocked @actions/github). - annotations.ts (20% -> 100%): every reduction tier (error/warning/notice/ silent) plus addErrorAnnotation. - reporters/summary.ts (71% -> 100%): generateSummary and generateBenchmarkSummary (badges, failures, missing metrics, N/A fallback). - benchmark.ts and inputs.ts: the missing-input and output-dir traversal guards. Project line coverage 95.8% -> 99.3%.
… action) Pushes project line coverage to 99.86% (functions 100%): - cli/spinner.ts (75% -> 100%): spinnerStart/Stop/Error with a mocked ora. - utils gzipped/brotli filesize (89% -> 100%): non-FileOperationError wrapping. - core/setup.ts: checkOutput $1 placeholder rewriting (single + array input). - core/compress.ts: in-memory content path and invalid array-input guards. - action/index.ts (98% -> 100%): chunkArray invalid size and './' outputDir. The two still-uncovered lines (compress createDirectory and setup checkOutput array guards) are unreachable defensive branches.
…loop runWarmup now registers each warmup output path with a caller-provided collector before minifying, so benchmarkCompressor's catch deletes partial files instead of orphaning them. Resolves the recurring PR-review finding and removes the item from the v12 backlog. Also strengthens the new action reporter tests to assert rendered content (comparison values + '-' placeholders, benchmark badges/failures/missing metrics) instead of only that the summary methods were called.
Empty output is valid (e.g. dead-code elimination) and is handled by the shared validateMinifyResult / allowEmptyOutput layer, so the compressor no longer throws on an empty string and only rejects a non-string result. Raise the default per-stream buffer cap from 1MB to 100MB so large bundles do not spuriously overflow; set settings.buffer to 0 to disable.
Replace readdirSync({ recursive: true }), which walked node_modules/.git/
dist before filtering, with an async walk that skips EXCLUDED_DIRS during
traversal. Source and package.json scanning no longer descend into heavy
directories, and runDoctor now genuinely awaits the scan.
- registry: drop unused `notes` field and the `isRemovedCompressor` wrapper; inline removed-compressor checks at the cli/action call sites - doctor: collapse the two near-identical map builders into one and drop redundant length guards in reportFindings - benchmark: track warmup paths in a single `collected` array - ci-guard: remove the fragile bare-name doc scan and its content filter
…tion - resolve `gcc` to `google-closure-compiler` via resolveAlias in the resolver, and recognize it in isBuiltInCompressor/getKnownExportName - map `gcc` to the real package name in the composite action install step so `compressor: gcc` no longer tries to install @node-minify/gcc - match scoped package names in getCompressorEntry so the removed-compressor fail-fast fires for e.g. @node-minify/yui
- babel-preset-minify was only pulled in by the removed babel-minify package; remove it and refresh bun.lock - add @returns to the doctor() CLI entry point
* origin/develop: (36 commits) fix(deps): update dependency ora to v9.4.1 (#2866) chore(deps): update dependency @vercel/ncc to ^0.44.0 chore(deps): lock file maintenance fix(deps): update dependency oxc-minify to ^0.135.0 fix(deps): update dependency postcss to v8.5.15 (#2859) fix(deps): update dependency terser to v5.48.0 (#2860) chore(deps): update dependency @astrojs/ts-plugin to v1.10.9 (#2858) fix(deps): update dependency oxc-minify to ^0.131.0 chore(deps): lock file maintenance (#2852) chore(deps): update dependency @astrojs/ts-plugin to v1.10.8 (#2855) chore(deps): update dependency bun to v1.3.14 (#2854) fix(deps): update dependency @astrojs/cloudflare to v13 [security] fix(deps): update dependency oxc-minify to ^0.129.0 fix(deps): update dependency terser to v5.47.1 (#2850) fix(deps): update dependency postcss to v8.5.14 (#2848) chore(deps): lock file maintenance (#2847) fix(deps): update dependency postcss to v8.5.13 (#2846) chore(deps): lock file maintenance (#2845) fix(deps): update dependency oxc-minify to ^0.128.0 fix(deps): update dependency postcss to v8.5.12 (#2844) ... # Conflicts: # bun.lock
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2865 +/- ##
===========================================
+ Coverage 95.26% 99.62% +4.36%
===========================================
Files 73 69 -4
Lines 1773 1876 +103
Branches 553 576 +23
===========================================
+ Hits 1689 1869 +180
+ Misses 84 7 -77 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Context
v11 cleanup major release per spec at
docs/plans/2026-03-14-v11-plan.md. Removes obsolete compressors, introduces support tiers, simplifies the Google Closure Compiler architecture, and adds migration DX. All@node-minify/*packages bump to 11.0.0 (fixed group).40 commits · 116 files · +2,294 / −3,905.
Breaking changes
babel-minify,uglify-es,yui,sqwish,crass. Replacements: terser/oxc/swc/esbuild (JS), lightningcss/cssnano (CSS).@node-minify/run— internal Java/process-spawn helper, no longer used.@node-minify/types:CompressorReturnType→CompressorResult,MinifyOptions→Settings.google-closure-compilernpm JS API instead of the bundled Java wrapper. Same flags/output; Java JAR dependency dropped.New features
@node-minify/utils(recommended/supported/legacy/removed), surfaced in CLI help and the Action.node-minify doctor— read-only command scanningpackage.json, source imports, and workflow YAML for removed/legacy compressor references with replacement guidance.bufferlimit (kills child process on overflow) plus hardened process/timeout/error handling.Verification
bun run ci→ EXIT 0 (build + lint + typecheck + test).sisyphus/evidence/)Migration
See
docs/src/content/docs/guides/v11-migration.md, or runnpx node-minify doctor.Release
Changeset included (
.changeset/v11-cleanup-major.md) — major bump for the whole fixed group. Merge triggerschangeset version+publish.🤖 Generated with Claude Code
Summary by cubic
v11 cleanup removes five deprecated compressors and
@node-minify/run, adds support tiers andnode-minify doctor, switches GCC to thegoogle-closure-compilerJS API, and hardens the CLI/Action, docs, and CI. All@node-minify/*publish at 11.0.0.New Features
@node-minify/utils(shown in CLI help, docs, and the Action);no-compressmarked legacy.node-minify doctorscans workspace-widepackage.json(incl. peer/optional deps), source imports andcompressor:assignments, and workflows using exact-match detectors, normalized paths, and a fast async walk that skips heavy dirs.google-closure-compilerJS API with raised buffer limit (100MB; setbuffer: 0to disable), timeout/silence forwarding, empty-output support, and proper object flag serialization (JSON-quoted string--define); the compiler may still invoke Java internally.esbuildrequirestype;output-dirmust be a safe relative path; removed compressors fail fast with replacement hints;gccalias supported and scoped removed packages detected; benchmark mode requires an input; safer chunking/output-dir normalization; improved summary/PR-comment/annotation reporting.Migration
@node-minify/babel-minify,@node-minify/uglify-es,@node-minify/yui,@node-minify/sqwish,@node-minify/crass→ use@node-minify/terser(JS) and@node-minify/lightningcssor@node-minify/cssnano(CSS).CompressorReturnType→CompressorResult,MinifyOptions→Settings) and switch GCC usage to thegoogle-closure-compilerJS API (repo Java plumbing removed; upstream may still use Java).Written for commit 1771727. Summary will update on new commits.
Summary by CodeRabbit
node-minify doctorto scan projects for removed (fail-fast) and legacy (warnings-only) compressor usage.babel-minify,crass,sqwish,uglify-es,yui) now fail early.google-closure-compilernpm API.