Skip to content
New issue

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

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

Already on GitHub? # to your account

Chore: Fix type generation script #20151

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

aniketkatkar97
Copy link
Member

I worked on refactoring the json2ts script to:

  1. Fix the issue with current type generation script where we only generated types for the changed schemas resulting in the types of other schemas falling behind.
    Ex.:
    If schema1.json has ref inside referring to schema2.json, according to the existing script, making some change in the schema2.json regenerated type schema2.ts but since it might have affected schema1.json as well, we were not updating schema1.ts. The updated script will now generate the types for all the schemas.
  2. Improved the speed for time generation, taking too much time in pre-commit. The type generation should not take more than 1.5 mins (as compared to previous time of around 4-5mins)
  3. Fixed the generated types according to the existing schemas.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@aniketkatkar97 aniketkatkar97 added the UI UI specific issues label Mar 8, 2025
@aniketkatkar97 aniketkatkar97 self-assigned this Mar 8, 2025
@aniketkatkar97 aniketkatkar97 requested a review from a team as a code owner March 8, 2025 16:16
@aniketkatkar97 aniketkatkar97 changed the title Fix type generation Chore: Fix type generation script Mar 8, 2025
@github-actions github-actions bot added the safe to test Add this label to run secure Github workflows on PRs label Mar 8, 2025
Copy link
Contributor

github-actions bot commented Mar 8, 2025

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.49% (42244/66539) 38.2% (16462/43093) 42.92% (5047/11760)

Copy link

Copy link

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
safe to test Add this label to run secure Github workflows on PRs UI UI specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant