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

feat(npm-scripts): improve strategy for generating types, only generate types for modules that have changes to ts files or if their dependencies have changes #1146

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

bryceosterhaus
Copy link
Member

@bryceosterhaus bryceosterhaus commented Jun 22, 2023

Here the goal is to only generate types when ts files have been changed. This is particularly helpful when running ant format-source-current-branch

The strategy is to diff against the liferay working branch (master). If there are any typescript files changed then we re-build types for that module and it's dependents.

Here is the new output:

  • No changes to any files
    Screenshot 2023-06-22 at 11 39 17 AM

  • new --force option when we want to re-build all types. Will primarily only be used by FI team
    Screenshot 2023-06-22 at 11 40 38 AM

  • Changes to a single module's ts files. This rebuilds the changed module and any dependent modules
    Screenshot 2023-06-22 at 11 42 51 AM

  • ant format-source-current-branch when only java files have changed
    Screenshot 2023-06-22 at 11 44 45 AM

  • ant format-source-current-branch when ts files have changed
    Screenshot 2023-06-22 at 11 47 13 AM

…te types for modules that have changes to ts files or if their dependencies have changes
@izaera
Copy link
Member

izaera commented Jun 22, 2023

LGTM

@izaera
Copy link
Member

izaera commented Jun 22, 2023

One more question (I missed the screenshots before approval). What happens with ant format-source-local-changes? Will it work correctly? 🤔

@bryceosterhaus
Copy link
Member Author

Hmm. I haven't run that before. I will test and see

@bryceosterhaus bryceosterhaus merged commit e3fb023 into liferay:master Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants