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

fix(medusa-config): dont run all functions immediately in medusa-config, only promises #169

Merged
merged 4 commits into from
Jan 27, 2023

Conversation

dwene
Copy link
Contributor

@dwene dwene commented Jan 17, 2023

The current way of running everything with key[obj] === function and setting the value is breaking plugins that require you to pass functions.

Now we only await promises, not all functions.

@@ -83,6 +83,9 @@ export function buildRegexpIfValid(str: string): RegExp | undefined {
return;
}

export const isPromise = (obj: any): boolean =>
Copy link
Owner

Choose a reason for hiding this comment

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

todo: could you type it as unknown and see if that is ok.

@adrien2p
Copy link
Owner

seams reasonable to me 💪 thanks man

@adrien2p
Copy link
Owner

Can I get you to update the test accordingly please?

@adrien2p
Copy link
Owner

@dwene any news?

@adrien2p adrien2p merged commit 6c0ab06 into adrien2p:main Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants