Repository navigation
feat: Add template package.json for Hilla components - #2015
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2015 +/- ##
=======================================
Coverage 95.26% 95.26%
=======================================
Files 57 57
Lines 3861 3861
Branches 564 564
=======================================
Hits 3678 3678
Misses 147 147
Partials 36 36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Adds Hilla components to package.json automatically in build time, so that developers don't need to swap hilla-react and hilla-lit artifacts in the pom dependencies. Related-to #18564, vaadin/hilla#2015
|
This ticket/PR has been released with Vaadin 24.4.0.alpha3 and is also targeting the upcoming stable 24.4.0 version. |
Adds Hilla components to package.json automatically in build time, so that developers don't need to swap hilla-react and hilla-lit artifacts in the pom dependencies. Related-to #18564, vaadin/hilla#2015
2aaed9f to
4d3c424
Compare
Uses class finder instead of Class.forName to: - lookup for Hilla endpoint class at build time, - load package.json templates Fixes errors in vaadin/hilla#2015 Fixes vaadin/platform#5013 Fixes vaadin/platform#5023
This reverts commit 5e35751.
|
This is proposed for a separate PR, as it's not directly related to goals in vaadin/flow#18564 and most likely needed for |
|
Fails with the same error as other PRs, so probably not caused by this change: |
caalador
left a comment
There was a problem hiding this comment.
Only question I have really is that should we actually have
| @@ -0,0 +1,16 @@ | |||
| { | |||
| "name": "hilla-components-dependencies", | |||
There was a problem hiding this comment.
I feel the lit package should not be available in the react module.
There was a problem hiding this comment.
My idea was to have only one module hilla where you have both packages and this module isn't bound to lit or react, it just have Hilla components.
With this change, both hilla and hilla-react have the same content: Hilla's init-app logic depends on what artifact is used, so I cannot just remove hilla-react.
But init-app will be removed from the Hilla plugin and moved to Copilot soon, so I expect hilla-react module to be completely removed (in a separate PR). Also, platform and starters need a change when we remove hilla-react so better to do it synchronously.
So finally we'll have one single module hilla with both packages and Flow decides which package to use based on auto-detection.
| @@ -0,0 +1,19 @@ | |||
| { | |||
| "name": "hilla-components-dependencies", | |||
There was a problem hiding this comment.
I feel the react package should not be available in the lit module.
|
what is wrong with the release lable and comment? ;-P |
Referenced issue in Flow has been merged and released, thus this label is there. Maybe. |
|
|
This ticket/PR has been released with Hilla 24.4.0.alpha4 and is also targeting the upcoming stable 24.4.0 version. |
|
This ticket/PR has been released with Vaadin 24.4.0.alpha4 and is also targeting the upcoming stable 24.4.0 version. |



Adds template files where Hilla components packages are listed.
Replaces
AtNpmPackageannotations inhillaandhilla-react, so now Flow can add these packages to package.json automatically depending on whether Hilla is used and React or Lit is used.Places these templates in
hillaandhilla-react.So basically developers don't need to do manual swaps or exclusions in their projects:
Related-to vaadin/flow#18564
Depends-on vaadin/flow#18597