You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(transformer_plugins): add changed field to ReplaceGlobalDefinesReturn (#14617)
## Summary
Add a `changed: bool` field to `ReplaceGlobalDefinesReturn` to track whether the AST was modified during the global defines replacement transformation.
- Adds `changed` field to `ReplaceGlobalDefinesReturn` struct
- Tracks changes via consolidated `mark_as_changed()` helper method
- Updates both expression and assignment expression traversal methods
- Adds test assertion to verify correctness of the `changed` field
This allows callers to efficiently determine if replacements were made without needing to compare the AST before and after transformation.
## Test plan
- [x] All existing tests pass
- [x] Added assertion in test helper to verify `changed` field matches expected behavior (`source_text != expected`)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
0 commit comments