Add RightSideComparisonResult as factResult#396
Merged
chris-pardy merged 6 commits intoCacheControl:masterfrom Nov 18, 2024
Merged
Add RightSideComparisonResult as factResult#396chris-pardy merged 6 commits intoCacheControl:masterfrom
chris-pardy merged 6 commits intoCacheControl:masterfrom
Conversation
Collaborator
|
Conceptually this is fine a few things It should be in a field like valueResult not overriding the factResult You should set the field unconditionally Make sure you update the types and please add some more unit tests |
Contributor
Author
|
I've followed your advice and added the field unconditionally. Also i've updated all acceptance tests to check for the new value and updated the typings. I've also added an specific test for this feature checking if the valueResult matches. |
Contributor
Author
|
I've found that the toJSON Serialization was missing and added it. I've tested in a working application and now it correctly returns the value even when serializing to JSON. |
chris-pardy
approved these changes
Nov 18, 2024
Collaborator
chris-pardy
left a comment
There was a problem hiding this comment.
@thorin8k Looks great, thanks for the contribution!
emilefokkemanavara
added a commit
to emilefokkemanavara/json-rules-engine
that referenced
this pull request
Nov 18, 2024
chris-pardy
added a commit
that referenced
this pull request
Nov 21, 2024
re-apply changes from #396 onto v8
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.
Hello!
I noticed the issue mentioned in #310, which is important for my use case, so I tried to address it with this pull request.
My implementation approach is straightforward. When setting the factResult for a condition, if the value property is an object, I include the rightSideValue as the factResult.
I'm eager to see this merged, as it is of great interest to me.