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

feat(cart): Add cart module package #5982

Merged
merged 5 commits into from
Jan 2, 2024
Merged

feat(cart): Add cart module package #5982

merged 5 commits into from
Jan 2, 2024

Conversation

olivermrbl
Copy link
Contributor

@olivermrbl olivermrbl commented Jan 2, 2024

What
Adds Cart Module package @medusajs/cart

Whether to stick with jest or replace with node's built-in testing tools (from v20) is to be discussed

Resolves CORE-1609

@olivermrbl olivermrbl requested a review from a team as a code owner January 2, 2024 11:35
Copy link

changeset-bot bot commented Jan 2, 2024

🦋 Changeset detected

Latest commit: f90940c

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Jan 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 2:35pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 2:35pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 2, 2024 2:35pm

@@ -0,0 +1,50 @@
import { Modules } from "@medusajs/modules-sdk";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment: These scripts seem to contain a lot of duplicated code with little to no changes across modules. We should consider a refactor to eliminate the amount of boilerplate code

Copy link
Member

Choose a reason for hiding this comment

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

I believe we can create utils function to build those script and export them from the modules

@olivermrbl
Copy link
Contributor Author

I have left out the migration until I start integration testing

@olivermrbl
Copy link
Contributor Author

@riqwan @pKorsholm, did any of you experience issues with building medusa-react after adding the new package? I find it strange that these changes affect that package. Am I missing something trivial?

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, Maybe you can include a util proposal for the script in a later pr? or create a ticket that we can handle

@fPolic
Copy link
Contributor

fPolic commented Jan 2, 2024

@olivermrbl I had the same build issue on my SC module PR.

@olivermrbl
Copy link
Contributor Author

I had the same build issue on my SC module PR

How did you resolve it?

@fPolic
Copy link
Contributor

fPolic commented Jan 2, 2024

I fixed the line it's complaining about but it is strange.

Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

@adrien2p
Copy link
Member

adrien2p commented Jan 2, 2024

I have left out the migration until I start integration testing

Seems true, indeed the function does not return something all the time. In some cases it will return Promise<unknown> | unknown and on other cases it will return void. though, it should also fail on dev right?

@riqwan
Copy link
Contributor

riqwan commented Jan 2, 2024

@olivermrbl should this require a changeset for the other packages thats affected here?

@olivermrbl
Copy link
Contributor Author

should this require a changeset for the other packages thats affected here?

Yes, nice catch. Will include it

Copy link
Contributor

@fPolic fPolic left a comment

Choose a reason for hiding this comment

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

LGTM!

@olivermrbl olivermrbl merged commit 925feea into develop Jan 2, 2024
15 checks passed
@olivermrbl olivermrbl deleted the feat/cart-module branch January 2, 2024 14:59
This was referenced Jan 3, 2024
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.

4 participants