Skip to content

refactor(cli): make configuration validation side-effect free - #132

Merged
luojiyin1987 merged 1 commit into
masterfrom
refactor/side-effect-free-config-validation
Aug 9, 2026
Merged

refactor(cli): make configuration validation side-effect free#132
luojiyin1987 merged 1 commit into
masterfrom
refactor/side-effect-free-config-validation

Conversation

@luojiyin1987

Copy link
Copy Markdown
Contributor

Summary

  • Add structured CLI errors for configuration validation.
  • Make configuration utilities throw errors without process side effects.
  • Format validation errors at the CLI boundary.
  • Preserve current messages, stderr output, and exit status.

Part of #131.

Behavior

Commander still owns parser errors. Invalid JSON still includes the original parse error.

Validation

  • npm run lint
  • npm test -- --runInBand
  • npm run test:package

All 167 tests pass.

@luojiyin1987
luojiyin1987 marked this pull request as ready for review August 9, 2026 16:27
@luojiyin1987
luojiyin1987 merged commit 4c1e59e into master Aug 9, 2026
6 checks passed
@luojiyin1987
luojiyin1987 deleted the refactor/side-effect-free-config-validation branch August 9, 2026 16:31
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