Repository navigation
fix(core): fail when an input glob matches no file - #2955
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 29ba6de 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 |
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2955 +/- ##
========================================
Coverage 98.63% 98.64%
========================================
Files 70 70
Lines 2052 2060 +8
Branches 625 629 +4
========================================
+ Hits 2024 2032 +8
Misses 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A wildcard
inputthat matched nothing reached the compressors asinput: []. With a$1output,minify()resolved""and wrote nothing, so a typo in a glob or an empty build directory looked like success.The check uses
*, the same testwildcards()uses to decide whether to glob."nope/**/*.js", output$1.min.js"", writes nothingNo files matched input pattern: nope/**/*.js"nope/**/*.js", outputall.jsNo content providedNo files matched …["nope/*.js", "real.js"]"missing.js"(no glob)input: [], in-memorycontentEvidence
setup-no-match.test.ts, 6 tests: before the fix 4 fail and 2 pass, after the fix all pass.bun run test: 72 files, 1086 tests pass. Lint, typecheck,ci-guard-type-suppressions.shpass.Merge Danger
Door: two-way
Blast Radius: core, CLI, Action users
A build or workflow that relied on an empty glob succeeding will now fail. That is the intended fix, but the release notes should say so. Changeset:
@node-minify/corepatch.Summary by cubic
Fails
minify()when a wildcard input matches no file, so a typo'ed glob or empty build directory no longer looks like success. Previously an unmatched glob reached the compressors asinput: [], resolved a$1output to an empty string and wrote nothing, or failed withNo content providedfor a plain output; both cases now throwNo files matched input pattern: <pattern>.*wildcard detection thatwildcards()uses to decide whether to glob.contentare unaffected, as are non-glob missing files such asmissing.js.@node-minify/coreas a patch.Written for commit 4d4ca60. Summary will update on new commits.