Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix computed properties being renamed #93

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

albertogasparin
Copy link
Owner

If computed properties are using a dependency, the scope rename would impact them too even if it should not (I've opened an issue on Babel side too babel/babel#16751 as I think it is somewhat unexpected)

So we added a special condition that checks for computed properties and ignores the immediate scope and reverts the renamed identifier.

Closes #92

@albertogasparin albertogasparin merged commit ad782c6 into master Aug 20, 2024
1 check passed
@albertogasparin albertogasparin deleted the fix/di-getters-error branch August 20, 2024 03:26
@theKashey
Copy link
Collaborator

🤯 definitely above and beyond my understanding of magnetic.

@albertogasparin
Copy link
Owner Author

albertogasparin commented Aug 22, 2024

Babel fixed the issue on their side overnight :D babel/babel#16756
It is now available on v7.25.4+ but might be a bit before I can clean the extra code...

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.

{ get [expression]() { /* … */ } } is transformed in a wrong way causing a runtime error
2 participants