-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fetch and load extended presets during create #74
Conversation
be72872
to
0f4cc4a
Compare
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.
Looks solid, just a small change that may have been my fault 😉
presetInfos = presetInfos.concat(localPreset(context)); | ||
|
||
const presets = presetInfos.map(p => presetIdentifier(p.rawName).shortName); | ||
const presets = flattenPresets(presetInfos).map(p => presetIdentifier(p.rawName).shortName); |
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.
I may have mis-spoke on our zoom. These should not be flattened before placed on context. We want to preserve the original hierarchy here, however, the flatten utility is available for downstream cases.
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.
The problem here is that if I don't flatten presetInfos
the presets that are dependencies won't be included in the presets
list. The presetInfos
added into context
will keep the same tree format.
Also right now rawPresets
and localPresets
don't have the extended presets included in the list because these 2 lists come from the json
file. I thought that I didn't have to include the extended presets on these lists, only on presets
. What do you think?
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.
The extended presets will be available by reaching in from context (i.e. context.presets[0].presets
). It's important to not lose this hierarchy, and only have the top-level presets sitting on context. This lets the CLI know which presets to add the gasket.config for example.
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.
You wanted to mean context.presetInfos[0].presets
right?
d78ccb0
to
f9b54f8
Compare
Summary
Fetch and load extended presets during create. This would allow extended presets which define createContext or config to be used during the create process.
Changelog
Changelog entry added.
Test Plan
Unit tests updated and added.