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(transformers): handle single string styles or styleUrl property #2186

Merged

Conversation

leosvelperez
Copy link
Contributor

@leosvelperez leosvelperez commented Nov 9, 2023

Summary

With Angular v17, the styles property of the Component decorator additionally accepts a single string value instead of an array. Also, there's a new styleUrl property that accepts a single string value. The change was made at angular/angular#51715.

This PR updates the transformer to handle the additional use cases and strip the properties accordingly. Without these changes, tests running over components that have those properties, fail.

Test plan

I tested the fix as part of the Angular 17 support work in Nx. This particular PR nrwl/nx#20146 is currently failing due to this issue. I tested the changes in this PR over those failing tests, and the failures are resolved.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@ahnpnl ahnpnl merged commit cf00f55 into thymikee:main Nov 11, 2023
10 checks passed
ahnpnl pushed a commit that referenced this pull request Nov 11, 2023
ahnpnl pushed a commit that referenced this pull request Nov 11, 2023
@leosvelperez leosvelperez deleted the fix/component-single-string-styles branch November 13, 2023 09:42
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.

None yet

2 participants