Skip to content

fix: make logLevel 'quiet' quiet and validate processingBatchSize - #78

Merged
rachfop merged 1 commit into
mainfrom
fix/quiet-log-level
Oct 2, 2026
Merged

rachfop merged 1 commit into
mainfrom
fix/quiet-log-level

Conversation

@rachfop

@rachfop rachfop commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

  • logLevel: 'quiet' printed every info and warn line. The level map fell back with ||, and LogLevel.QUIET is 0, so quiet resolved to NORMAL.
  • processingBatchSize had no validation. The batch loop advances by it, so 0 or a negative value never terminated.

Fix

Tests

tests/test-log-level-and-batch-size.js (added to test:integration) checks info/warn/verbose output at each log level and rejects 0, -5, 2.5, '50', and NaN as batch sizes. On main, 6 of its 14 checks fail; with this change all pass, and npm test passes.

The logLevel map fell back with `||`, and LogLevel.QUIET is 0, so
'quiet' resolved to NORMAL and printed every info and warn line. Use
`??`.

processingBatchSize had no validation, and the batch loop advances by
it, so 0 or a negative value never terminated. Reject anything that
isn't a positive integer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rachfop
rachfop merged commit c6dab16 into main Oct 2, 2026
3 checks passed
@rachfop
rachfop deleted the fix/quiet-log-level branch October 2, 2026 20:12
rachfop added a commit that referenced this pull request Oct 2, 2026
The logLevel map fell back with `||`, and LogLevel.QUIET is 0, so
'quiet' resolved to NORMAL and printed every info and warn line. Use
`??`.

processingBatchSize had no validation, and the batch loop advances by
it, so 0 or a negative value never terminated. Reject anything that
isn't a positive integer.
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.

1 participant