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: check if import name is a primitive and needs aliasing #1142

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

letsbelopez
Copy link
Contributor

@letsbelopez letsbelopez commented Dec 8, 2023

Problem

If a customer had an import for their generated component that was the same as a primitive component name e.g. "Text" it was not being aliased.

Solution

Add a check to see if the imported name is a primitive component.

Additional Notes

Links

Ticket

GitHub issue:

Other links

Verification

unit test

Manual tests

Automated tests

  • Unit tests added/updated
  • E2E tests added/updated
  • N/A - (provide a reason)
  • deferred - (provide GitHub issue for tracking)

Housekeeping

  • No non-essential console logs
  • All new files contain license notice

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@letsbelopez letsbelopez requested a review from a team as a code owner December 8, 2023 20:51
@codecov-commenter
Copy link

Codecov Report

Merging #1142 (0e9952d) into main (e2e5f41) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1142   +/-   ##
=======================================
  Coverage   93.86%   93.86%           
=======================================
  Files         150      150           
  Lines        6112     6114    +2     
  Branches     1836     1838    +2     
=======================================
+ Hits         5737     5739    +2     
  Misses        357      357           
  Partials       18       18           
Files Coverage Δ
.../codegen-ui-react/lib/imports/import-collection.ts 93.96% <100.00%> (+0.10%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2e5f41...0e9952d. Read the comment docs.

@letsbelopez letsbelopez merged commit f9dd802 into main Dec 8, 2023
11 checks passed
@letsbelopez letsbelopez deleted the alias-primitive-import-names branch December 8, 2023 21:22
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.

4 participants