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.
Describe the bug
In recent versions of valibot they've introduced a
variant
method. This method does not set apath
value in the issues array. Because of the way thevalibotResolver
loops over the issues returned from valibot, this can cause an infinite loop.To Reproduce
Additional context
I've included tests in this PR. If you wish to demonstrate the issue you can revert the changes I made to
valibot.ts
.Because there's no path returned from valibot we can't add the error to the resolver. I've requested a change in valibot to address this and the author seems to agree. This PR simply fixes the infinite loop and I will submit a second once the other issue has been addressed to update the dependency to the fixed version.
I've tried to follow the contributing guidelines as best as I can. It seems as they're out of date or were copied from somewhere else the following commands listed aren't in this repo as far as I can tell: