Skip to content
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .changeset/fail-on-glob-with-no-match.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <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: <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.
Loading