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

fix: Update parseJson() for v8 11.7.72 and newer #2356

Conversation

egfx-notifications
Copy link
Contributor

What issue does this pull request resolve?
Fixes #2355

What changes did you make?
Update regex to extract end position from error in parseJson() - the updated regex works both for the previous and the new v8 error messages

Is there anything that requires more attention while reviewing?
https://chromium-review.googlesource.com/c/v8/v8/+/3513684 also added some changes to the messages with some of the new message templates not mentioning a position at all. I'm not sure if this would affect ajv, but since npm test completes successfully with my patch I assume it does not.

@jasoniangreen
Copy link
Collaborator

I have verified this on https://regex101.com/, looks good. I will look to get this fix in after we get the builds working again.

@jasoniangreen jasoniangreen merged commit c0a130d into ajv-validator:master Feb 16, 2024
4 checks passed
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.

JSON parsing fails for v8 versions 11.7.72 and newer
2 participants