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

No throwing #3

Merged
merged 17 commits into from
Sep 9, 2024
Merged

No throwing #3

merged 17 commits into from
Sep 9, 2024

Conversation

jacoscaz
Copy link
Owner

@jacoscaz jacoscaz commented Sep 7, 2024

This PR refactors the project to return validation results and handle validation errors in the same way that ajv does, meaning that validating functions are now implemented as user-defined type guards persisting errors in their respective .errors properties.

All this is done in support of handling validation errors without try/catch blocks, which we've seen make a very significant difference in terms of performance.

This PR also changes the relationship with ajv, flagging it as an actual dependency in package.json to fully control which version of ajv ends up being used and the options with which it is instantiated.

@jacoscaz jacoscaz merged commit 94c7cda into master Sep 9, 2024
3 checks passed
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