ember-codemods / ember-tracked-properties-codemod

A codemod for transforming your ember app code to start using `@tracked` properties.
MIT License
8 stars 3 forks source link

Feat: Include Glimmer component arguments as being tracked #182

Open IgnaceMaes opened 1 year ago

IgnaceMaes commented 1 year ago

Glimmer component arguments are auto tracked by default. So when in a Glimmer component, we can safely ignore these if they're part of the computed property watchlist.

This is only true for the reference of the argument itself, and not nested properties. For this a check has been added as well.

IgnaceMaes commented 1 year ago

FYI @suchitadoshi1987 @tylerturdenpants

As this might get lost in between Dependabot PRs as this repo hasn't been updated in a bit 😄

tylerturdenpants commented 1 year ago

@IgnaceMaes I will try and take a close look today. So far the PR looks ok, but I want to be sure.

IgnaceMaes commented 1 year ago

This should probably be updated to use @dependentKeyCompat for full compatibility in case there are CPs watching these getters.

Although I suspect this might be required for the other functionality of the codemod as well?