networknt / json-schema-validator

A fast Java JSON schema validator that supports draft V4, V6, V7, V2019-09 and V2020-12
Apache License 2.0
800 stars 320 forks source link

Add GraalJS regular expression and factory implementation #1058

Closed justin-tay closed 3 weeks ago

justin-tay commented 3 weeks ago

This adds the optional usage of GraalJS as the regular expression evaluation engine. This makes it somewhat easier to verify that the Joni regular expression implementation is correct.

This also fixes the JoniRegularExpression implementation as the Syntax.ECMAScript wasn't accepting certain valid regular expressions by configuring a custom Syntax with additional options

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 93.22034% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.86%. Comparing base (48ca3c2) to head (3e41dee). Report is 21 commits behind head on master.

Files Patch % Lines
...hema/regex/ECMAScriptRegularExpressionFactory.java 76.92% 1 Missing and 2 partials :warning:
.../networknt/schema/regex/GraalJSContextFactory.java 75.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1058 +/- ## ============================================ - Coverage 78.90% 78.86% -0.05% - Complexity 1965 2061 +96 ============================================ Files 172 198 +26 Lines 6352 6651 +299 Branches 1255 1261 +6 ============================================ + Hits 5012 5245 +233 - Misses 867 929 +62 - Partials 473 477 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.