Skip to content

feat: add structured validation results with first-error and all-errors functions#441

Merged
gjbkz merged 5 commits into
mainfrom
434-structured-validation
Jul 20, 2026
Merged

feat: add structured validation results with first-error and all-errors functions#441
gjbkz merged 5 commits into
mainfrom
434-structured-validation

Conversation

@gjbkz

@gjbkz gjbkz commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

  • add validate() and validateAll() with structured machine-readable issues
  • export built-in issue codes through ValidationIssueCode
  • collect nested object and array issues through private checker diagnostics
  • preserve the existing boolean guard, ensure(), and TypeChecker.test() paths

Tests

  • npm run lint
  • npm run test:type
  • npm run test:unit
  • npm run test:example

Closes #434

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.17629% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.57%. Comparing base (373c09b) to head (53008e3).

Files with missing lines Patch % Lines
src/typeChecker.ts 97.44% 5 Missing ⚠️
src/validation.private.ts 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #441      +/-   ##
==========================================
+ Coverage   97.01%   97.57%   +0.55%     
==========================================
  Files          45       48       +3     
  Lines        2144     2472     +328     
  Branches      212      248      +36     
==========================================
+ Hits         2080     2412     +332     
+ Misses         64       60       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gjbkz
gjbkz merged commit d4313bc into main Jul 20, 2026
8 checks passed
@gjbkz
gjbkz deleted the 434-structured-validation branch July 20, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat: add structured validation results with first-error and all-errors functions

1 participant