Remove valibot dependency and implement manual validation#79
Merged
bartveneman merged 4 commits intomainfrom Mar 12, 2026
Merged
Remove valibot dependency and implement manual validation#79bartveneman merged 4 commits intomainfrom
bartveneman merged 4 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
+ Coverage 96.52% 96.56% +0.04%
==========================================
Files 14 14
Lines 1035 1020 -15
Branches 120 136 +16
==========================================
- Hits 999 985 -14
Misses 34 34
+ Partials 2 1 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will decrease total bundle size by 516 bytes (-1.95%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: cli.js-esmAssets Changed:
Files in
view changes for bundle: index.js-esmAssets Changed:
Files in
|
…into one step - Remove valibot dependency from lib and CLI - Replace valibot schemas in parse-coverage.ts with plain type guard functions - Collapse parse_arguments + validate_arguments into a single parse_arguments function in arguments.ts, eliminating the two-step CLI flow - Update cli.ts to call parse_arguments directly - Simplify arguments.test.ts: remove validate_arguments import and update all call sites; merge redundant "not.toThrowError + value" tests into single assertions https://claude.ai/code/session_018N1GFSHdC3AunmZM98wwG9
405bbf4 to
aca5f95
Compare
Member
Author
|
refs #63 |
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
Removed the valibot schema validation library and replaced it with manual validation logic. This simplifies the codebase by eliminating an external dependency while maintaining the same validation behavior.
Key Changes
Removed valibot dependency from
package.jsonRefactored argument parsing (
src/cli/arguments.ts):as constarraysparse_arguments()andvalidate_arguments()into a singleparse_arguments()function that handles both parsing and validationmin-file-coveragea required field (always returns a number, defaults to 0)Refactored coverage parsing (
src/cli/parse-coverage.ts):is_valid_coverage()Updated CLI entry point (
src/cli/cli.ts):parse_arguments()instead of chainingparse_arguments()thenvalidate_arguments()Updated tests (
src/cli/arguments.test.ts):validate_arguments()wrapper functionexpect.soft()callsImplementation Details
as constfor enum-like values and custom type guardshttps://claude.ai/code/session_018N1GFSHdC3AunmZM98wwG9