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: add TransferTypes plugin for Generator #3171

Merged
merged 16 commits into from
Feb 4, 2025
Merged

Conversation

Lodin
Copy link
Contributor

@Lodin Lodin commented Jan 21, 2025

No description provided.

@Lodin Lodin added the hilla Issues related to Hilla label Jan 21, 2025
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 82.41758% with 16 lines in your changes missing coverage. Please review.

Project coverage is 86.91%. Comparing base (40c4ef3) to head (91ff57d).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/ts/generator-core/src/Schema.ts 0.00% 11 Missing ⚠️
...nerator-plugin-backbone/src/TypeSchemaProcessor.ts 76.92% 3 Missing ⚠️
packages/ts/generator-core/src/Generator.ts 0.00% 1 Missing ⚠️
packages/ts/generator-core/src/PluginManager.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3171      +/-   ##
==========================================
+ Coverage   86.74%   86.91%   +0.16%     
==========================================
  Files         120      118       -2     
  Lines        8196     8194       -2     
  Branches     1260     1256       -4     
==========================================
+ Hits         7110     7122      +12     
+ Misses       1071     1058      -13     
+ Partials       15       14       -1     
Flag Coverage Δ
unittests 86.91% <82.41%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Lodin Lodin marked this pull request as ready for review January 22, 2025 11:37
@Lodin Lodin requested review from platosha, cromoteca and taefi January 22, 2025 11:51
Copy link
Contributor

@taefi taefi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though, changed / added a lot of files, most of the changes were mechanical replacements of types, or changes in the signature of the internal functions, so LGTM!
However, requested changes for the sake of the questions I asked.

packages/ts/generator-plugin-subtypes/package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@cromoteca cromoteca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removal of ReadonlyDeep and addition of the TransferTypes plugin would have deserved separate PRs. Other changes, like the switch to vitest in i18n hardly correlate with this PR.

@Lodin
Copy link
Contributor Author

Lodin commented Jan 25, 2025

@cromoteca

Removal of ReadonlyDeep

Yes, I agree with that part. It was just created some issues when I worked with the plugin, so I decided to change it, and my issues were resolved.

addition of the TransferTypes plugin

Erm... Didn't get it. This PR is about adding that plugin, isn't it?

Other changes, like the switch to vitest in i18n hardly correlate with this PR.

Agree but CI continued failed because of various weird issues, so to reduce the time spent on debugging these issues, I just decided to do the planned replace.

Copy link
Contributor

@taefi taefi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we skip renaming the files unless it's absolutely necessary, since it makes the review process harder. For instance, renaming the packages/ts/frontend/src/types.d.ts to packages/ts/frontend/src/types.t.ts had a lot of side effects in many files. Similar for renaming the SharedStorage.d.ts to SharedStorage.t.ts.

We can also skip changing from karma to vitest, unless it is not working with Karma at all.

@Lodin Lodin force-pushed the feat/multipart-file branch from 4801749 to eedafbb Compare February 2, 2025 19:30
@Lodin
Copy link
Contributor Author

Lodin commented Feb 2, 2025

Ok, now there are only changes related to the scope of PR! 😊

@Lodin Lodin requested review from cromoteca and taefi February 3, 2025 06:44
cromoteca
cromoteca previously approved these changes Feb 3, 2025
packages/ts/generator-plugin-backbone/src/index.ts Outdated Show resolved Hide resolved
packages/ts/generator-core/src/PluginManager.ts Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Feb 4, 2025

@taefi taefi merged commit e238c32 into main Feb 4, 2025
15 of 16 checks passed
@taefi taefi deleted the feat/multipart-file branch February 4, 2025 11:28
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Hilla 24.7.0.alpha11 and is also targeting the upcoming stable 24.7.0 version.

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.

4 participants