Repository navigation
Conversation
The anyOf/allOf/oneOf and then/else regexes matched inside property names (something_else, strengthen) and also removed properties literally named then or else. Walk the pointer segment by segment instead and only skip keywords where a keyword is expected. Fixes eclipsesource#2664
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2664.
toDataPathSegmentsremovedanyOf/N/,allOf/N/,oneOf/N/andthen//else/with regexes over the whole scope string, so they also matched inside property names (something_elsebecamesomething_properties) and removed properties that are literally namedthenorelse.It now splits the scope into segments first and walks them: a combinator keyword followed by an index and a
then/elsesegment are skipped where a keyword is expected, and the segment afterpropertiesis always taken as the property name. The output for all existing paths is unchanged.I added two tests to
packages/core/test/util/path.test.ts(property names ending inthen/else, and properties namedthen,elseandanyOf). Both fail on master and pass with the change. The full core suite (447 tests) andeslint .inpackages/corepass.I used an AI coding assistant to help write this; I reviewed the change and ran the tests.