fix: medusa-service generated update functions always returns an array even if single object is passed. - #12880
Closed
dwene wants to merge 10 commits into
Closed
Conversation
🦋 Changeset detectedLatest commit: 571414f The changes in this PR will be included in the next version bump. This PR includes changesets to release 69 packages
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 |
|
@dwene is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
adrien2p
approved these changes
Jul 3, 2025
olivermrbl
reviewed
Jul 3, 2025
- Add tests for single object input/output consistency - Add tests for array input/output consistency - Add proper mocks for create/update service methods - Fix update method to preserve input type (single object vs array) - Tests validate the bug fix where update method was always returning arrays
…ub.com:lambda-curry/medusa into fix/medusa-service-update-always-returns-array
olivermrbl
approved these changes
Jul 20, 2025
Contributor
Author
|
@olivermrbl OK all the tests are passing now. Looks like create had the same issue. |
Contributor
Author
|
Looks like this was fixed by a core team member in PR #13225 so I'm going to close this. Thanks for fixing this @carlos-r-l-rodrigues ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to the change with Medusa Internal Service here: https://github.com/medusajs/medusa/pull/12715/files#diff-4d287d33cf799750dfc3957d3c22d87a5d369ca15bbbc7db29265fc864cedfadL248
Context: all of my medusa-service generated update functions are always returning an array, forcing me to have to check the response myself.
ex: