Skip to content

feat(compare): enhance props and emits handling#142

Merged
AmiteK23 merged 1 commit intomainfrom
feat/compare-props-emits-handling
Mar 10, 2026
Merged

feat(compare): enhance props and emits handling#142
AmiteK23 merged 1 commit intomainfrom
feat/compare-props-emits-handling

Conversation

@AmiteK23
Copy link
Member

@AmiteK23 AmiteK23 commented Mar 10, 2026

Description

Enhances the comparison logic for props and emits to support full object structures instead of only key names.

Previously, comparison operated only on prop/event names. This change stores and compares the full objects (including types), allowing more accurate detection of structural changes while maintaining deterministic behavior.

Key improvements include filtering invalid identifiers, improving change detection, and updating the display layer accordingly.


Type of Change

  • Bug fix
  • Feature
  • Breaking change
  • Docs
  • Refactor
  • CI / Tests
  • Performance
  • Other (please describe):

Architectural Impact

  • No contract/output changes
  • Contract/output changed (describe below)

If contract/output changed, explain the impact on:

  • Bundle structure: props and emits now store full objects (including types) instead of only keys.
  • CLI flags: No changes.
  • Watch/strict behavior: No behavioral changes; comparison accuracy is improved.

Testing

  • Tested locally
  • Tests added/updated
  • All tests pass

Unit tests were extended to cover the new props/emits structure and ensure correct detection of added and removed entries.


Related Issues

None.


Checklist

  • Target branch is main
  • Self-reviewed
  • Docs updated (if needed)
  • Changelog updated (if needed)

Additional Notes

This change improves structural accuracy of comparison results while preserving deterministic output ordering.

- Store full prop and emit objects with types instead of keys
- Filter invalid prop/emit identifiers
- Improve detection of added and removed props/emits
- Update display logic for new structure
- Extend unit tests for props/emits comparison
@AmiteK23 AmiteK23 merged commit 727d8f4 into main Mar 10, 2026
7 checks passed
@AmiteK23 AmiteK23 deleted the feat/compare-props-emits-handling branch March 11, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant