-
Notifications
You must be signed in to change notification settings - Fork 70
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: Refactor component script and check if enum contents are numbers #13694
fix: Refactor component script and check if enum contents are numbers #13694
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13694 +/- ##
=======================================
Coverage 95.27% 95.27%
=======================================
Files 1635 1635
Lines 21828 21828
Branches 2567 2567
=======================================
Hits 20796 20796
Misses 787 787
Partials 245 245 ☔ View full report in Codecov by Sentry. |
23da349
to
6bc116b
Compare
6bc116b
to
656843e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 🚀
Added one nitpick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ok 💯
Description
Functional changes
Previously, when generating JSON Schemas for the components, the script always asserted that enum values were strings.
Now, the script checks the first value of the enum and asserts the type (number or string) based on that.
In addition, the console now logs
definitionName: ComponentNameExternal
instead ofdefinitionName: ComponentName
for v4 components, because that is the actual definition we get the component schemas from.Refactoring
expandRef
utility function to get the external references to v4 components. This improves the quick fix from a couple of weeks ago.writeToFile
function into a new file calledfileUtils.ts
.run.ts
intoschemaUtils.ts
andlanguageUtils.ts
.Related Issue(s)
Verification