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

throw when different client frameworks are used for microfrontends #18470

Merged

Conversation

emilpaw
Copy link
Contributor

@emilpaw emilpaw commented Apr 25, 2022

Fix #18200


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@emilpaw emilpaw force-pushed the jdl-validation-different-client-frameworks-in-mf branch 2 times, most recently from 1978110 to f94ef12 Compare April 27, 2022 19:44
@emilpaw emilpaw marked this pull request as ready for review April 27, 2022 20:23
@DanielFran DanielFran requested a review from mshima April 28, 2022 09:45
Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

Should be simplified.

cli/import-jdl.js Outdated Show resolved Hide resolved
cli/import-jdl.js Outdated Show resolved Hide resolved
@mshima mshima mentioned this pull request May 11, 2022
6 tasks
@emilpaw emilpaw force-pushed the jdl-validation-different-client-frameworks-in-mf branch 2 times, most recently from a247b41 to 4c8b7c3 Compare May 11, 2022 21:31
@DanielFran DanielFran requested a review from mshima May 13, 2022 08:59
Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

Unfortunately this won't work with main after #18254 using new jdl microfrontend notation.
Old notation will be dropped at #18632.
The relatedApplications needs to use microfrontends baseNames.

@@ -431,7 +431,7 @@ class JDLProcessor {
applicationWithEntities.config.baseName !== baseName &&
applicationWithEntities.entities.find(entity => entity.microserviceName === baseName)
Copy link
Member

Choose a reason for hiding this comment

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

Add

      const microfrontends = applicationWithEntities.config.microfrontends || [];
Suggested change
applicationWithEntities.entities.find(entity => entity.microserviceName === baseName)
(
applicationWithEntities.entities.find(entity => entity.microserviceName === baseName) ||
microfrontends.includes(baseName)
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Done.

@emilpaw emilpaw force-pushed the jdl-validation-different-client-frameworks-in-mf branch from 4c8b7c3 to f4fba20 Compare May 15, 2022 07:38
@mshima mshima merged commit a05703d into jhipster:main May 21, 2022
@emilpaw emilpaw deleted the jdl-validation-different-client-frameworks-in-mf branch May 30, 2022 06:30
@DanielFran DanielFran added this to the 7.9.0 milestone Jun 22, 2022
@emilpaw
Copy link
Contributor Author

emilpaw commented Dec 22, 2022

Bug bounty claimed: https://opencollective.com/generator-jhipster/expenses/115032 Thanks :)

@DanielFran
Copy link
Member

@emilpaw approved

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.

JDL validation should catch different clientFrameworks when using microfrontends
3 participants