Skip to content

fix: only throw on warnings or errors with throwError - #90

Open
MoOx wants to merge 1 commit into
mainfrom
fix/throw-error-on-any-message
Open

MoOx wants to merge 1 commit into
mainfrom
fix/throw-error-on-any-message

Conversation

@MoOx

@MoOx MoOx commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Since 7.1.0 (#75), throwError makes the reporter throw as soon as any message is logged, including messages that are neither warnings nor errors. For example, a filter: () => true letting dependency messages through breaks the build even without any warning.

This restores the behavior documented in the README: with throwError, the reporter throws when at least one warning is logged. Errors still always make it throw, as introduced in 7.1.0.

  • Fix the throw condition in lib/reporter.js.
  • Add a regression test (fails without the fix).
  • Add a changelog entry.

Fixes #77

Since 7.1.0, throwError made the reporter throw as soon as any message
was logged, including messages that are neither warnings nor errors
(e.g. a filter letting dependency messages through).

Fixes #77
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.

v7.1.0 throws on all messages, not just errors and warnings

1 participant