Skip to content

fix(copy): downgrade "no files matched" from warn to info#780

Merged
sxzz merged 3 commits intorolldown:mainfrom
adamlohner:fix/copy-no-match-warn-to-info
Feb 26, 2026
Merged

fix(copy): downgrade "no files matched" from warn to info#780
sxzz merged 3 commits intorolldown:mainfrom
adamlohner:fix/copy-no-match-warn-to-info

Conversation

@adamlohner
Copy link
Contributor

@adamlohner adamlohner commented Feb 25, 2026

Summary

Fixes #774

When the copy option is configured with a glob pattern that matches zero files (e.g., copy: [{ from: 'src/**/*.png', to: 'dist' }]), the build fails in CI because failOnWarn defaults to 'ci-only', which promotes the warning to an error via process.exitCode = 1.

An empty glob match for copy is a benign, expected condition — not a build problem — so this downgrades the log level from warn to info to prevent it from failing the build.

When the `copy` option is configured with a glob pattern that matches
zero files, the build fails in CI because `failOnWarn` (default:
`'ci-only'`) promotes the warning to an error with `process.exitCode = 1`.

An empty glob match for copy is a benign condition — not a build
problem — so downgrade the log level from `warn` to `info`.

Co-authored-by: Cursor <[email protected]>
@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit b0d3f02
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/699fd6fdae49af0007640bc9
😎 Deploy Preview https://deploy-preview-780--tsdown-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 25, 2026

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/tsdown@780 -D
npm i https://pkg.pr.new/tsdown@780 -D
yarn add https://pkg.pr.new/[email protected] -D

create-tsdown

pnpm add https://pkg.pr.new/create-tsdown@780 -D
npm i https://pkg.pr.new/create-tsdown@780 -D
yarn add https://pkg.pr.new/[email protected] -D

tsdown-migrate

pnpm add https://pkg.pr.new/tsdown-migrate@780 -D
npm i https://pkg.pr.new/tsdown-migrate@780 -D
yarn add https://pkg.pr.new/[email protected] -D

commit: b0d3f02

@adamlohner
Copy link
Contributor Author

hey @sxzz, saw your comment #778 (comment) here, hoping this is an acceptable fix. if not, can you share more details on how you'd like to see this addressed? thanks!

Copy link
Member

@sxzz sxzz left a comment

Choose a reason for hiding this comment

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

Essentially, we want to follow the description in the original issue: if no files are specified for copying, a warning should not be reported.

As for the concern that warnings might cause failures in CI environments (failOnWarn), this option has already been set to default to false in all cases in the next release.

@sxzz sxzz merged commit afaabb9 into rolldown:main Feb 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty copy options should not warn No files matched for copying

2 participants