diff --git a/.changeset/fail-on-glob-with-no-match.md b/.changeset/fail-on-glob-with-no-match.md index 660486130..a67fa859e 100644 --- a/.changeset/fail-on-glob-with-no-match.md +++ b/.changeset/fail-on-glob-with-no-match.md @@ -2,6 +2,6 @@ "@node-minify/core": patch --- -Fail when an `input` glob matches no file. +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 as `src/**/*.js` matched nothing and the output used `$1`; with a plain output it failed with `No content provided`. Both cases now throw `No files matched input pattern: `. Explicit empty arrays and in-memory `content` are unaffected. +`minify()` used to resolve with an empty string and write nothing when a wildcard input such as `src/**/*.js` matched nothing and the output used `$1`; with a plain output it failed with `No content provided`. Both cases now throw `No files matched input 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-memory `content` are unaffected.