-
Notifications
You must be signed in to change notification settings - Fork 41
feat: refactor configs [JS-831] #1064
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
Conversation
} else { | ||
try { | ||
// ensure env config also when provider.yaml exists | ||
await access(getProviderConfigPath()); | ||
setEnvConfig(await initNewEnvConfig()); | ||
} catch { | ||
const envConfig = await initEnvConfig(); |
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.
We don't need that anymore?
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 added a global "cache" for all configs long ago (and for refactored configs I also added this "cache"), cause essentially when you init a config object you can reuse it for the duration of CLI running cause it is expected not to move anywhere, so there is no need anymore to store it globally separately, cause it's already stored globally anyway (there is a Map<configPath, config>).
… when using Promise.all that inits and manipulates the same config
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.
LGTM
No description provided.