-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Improve composing of new generators and tests. #15618
Conversation
generators/project-name/config.js
Outdated
@@ -29,4 +35,4 @@ const defaultConfig = { | |||
...requiredConfig, | |||
}; | |||
|
|||
module.exports = { requiredConfig, defaultConfig }; | |||
module.exports = { requiredConfig, defaultConfig, reproducibleConfig }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idempotentConfig? defaultConfig? subGeneratorConfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- requiredConfig needs to be written to .yo-rc.json.
- defaultConfig is not written to .yo-rc.json to keep it clean.
- reproducibleConfig is for testing purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should requiredConfig be merged into defaultConfig and save everything?
What names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guys, instead of naming them this way, we should be naming them by their actual function, not just their properties: how should each variable be used? For example, is it for tests? "testConfig" can be used, or "configForTests".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not every test should use it.
reproducibleConfigForTests would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be a better name indeed!
Many methods must be switched from sync to async in other to support ESM blueprints.
The first queues the composed generator before current one, the later queues after current one.
jhipster add
command shortcut is planned.Related to #15490
Please make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.