feat(compare-config): add optional includeInherited property and apply it to comparison logic
Summary
Fixed inheritance chain comparison bug in Concerto analysis where inherited properties were incorrectly reported as "removed" when comparing model versions. Added includeInherited option to CompareConfig to properly handle inherited properties during model comparison.
Changes
- Added
includeInherited?: booleanoption toCompareConfigtype incompare-config.ts - Updated
compare.tsto usegetProperties()instead ofgetOwnProperties()whenincludeInheritedis true - Modified property comparison logic to consider inherited properties from parent classes
- Maintained backward compatibility by making
includeInheritedoptional with defaultfalse
Flags
- This is a breaking change for users who rely on the current behavior of ignoring inherited properties
- Users must explicitly set
includeInherited: trueto get the new behavior - Default behavior remains unchanged to maintain backward compatibility
Screenshots or Video
Related Issues
- Issue #1067: Concerto Analyser ignores the inheritance chain when comparing properties between two model versions
Author Checklist
- [x] Ensure you provide a DCO sign-off for your commits using the
--signoffoption of git commit. - [x] Vital features and changes captured in unit and/or integration tests
- [x] Commits messages follow AP format
- [ ] Extend the documentation, if necessary
- [x] Merging to
mainfromfork:branchname
@gaumrab Could you update the PR title to follow commit conventions please? https://www.conventionalcommits.org/en/v1.0.0/
sure @ekarademir
Is this looks good: feat(compare-config): add optional includeInherited property and apply it to comparison logic
according to the commit conventions.
let me know if still any change required.
@gaumrab could you also add test cases for the fix?
This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 10 days.