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: wrap ModuleImplementations so that all methods are async #9012

Merged

Conversation

Alexnortung
Copy link
Contributor

@Alexnortung Alexnortung commented Sep 5, 2024

As discussed on slack: modules are wrapped in a proxy which makes all of its methods async. Currently if you try to do declaration merging on th ModuleImplementations type, then you can end up getting the wrong types, since non-async methods will not be converted to async on a type level.

This PR fixes that by wrapping ModuleImplementations in a type that makes all non-async methods async.

CLOSES: FRMW-2687

Copy link

changeset-bot bot commented Sep 5, 2024

⚠️ No Changeset found

Latest commit: daba092

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 5, 2024

@Alexnortung is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

@Alexnortung Alexnortung force-pushed the fix/correctness-of-module-methods branch from 6618ff0 to c15752a Compare September 6, 2024 07:39
Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution 🥂

@Alexnortung Alexnortung force-pushed the fix/correctness-of-module-methods branch from c15752a to daba092 Compare September 6, 2024 09:15
@olivermrbl
Copy link
Contributor

Only unrelated tests failing due to authentication issues, so merging this now.

@olivermrbl olivermrbl merged commit 20545b1 into medusajs:develop Sep 6, 2024
14 of 22 checks passed
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.

3 participants