Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: include parsed value in details for invalid text fields #51

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

targos
Copy link
Member

@targos targos commented Feb 23, 2024

When a value doesn't match the expected regex, it still has a clear value with start and end indexes.

BREAKING CHANGE: The result's details may now include a non-null value even when it's invalid.
The start and end fields will refer to it instead of the entire range when that happens.
The fields object is unchanged and still contains null for invalid fields.

Closes: #50

When a value doesn't match the expected regex, it still has a clear value with start and end indexes.

BREAKING CHANGE: The result's `details` may now include a non-null `value` even when it's invalid.
The `start` and `end` fields will refer to it instead of the entire range when that happens.
The `fields` object is unchanged and still contains `null` for invalid fields.

Closes: #50
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 89.46%. Comparing base (e4af53c) to head (1c0ddd3).

Files Patch % Lines
src/parsers/parseDocumentNumberOptional.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   88.94%   89.46%   +0.51%     
==========================================
  Files          44       44              
  Lines         380      389       +9     
  Branches       97       99       +2     
==========================================
+ Hits          338      348      +10     
+ Misses         42       41       -1     

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

@targos targos enabled auto-merge (squash) February 23, 2024 11:41
@targos targos merged commit b6e2652 into main Feb 23, 2024
9 checks passed
@targos targos deleted the fix-from-to branch February 23, 2024 11:42
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.

First name and last name share the same range
2 participants