⚠️ Warning: v2.13.2 introduces a regression that causes req.queryConfig to include entity: undefined, which can break routes that spread req.queryConfig into query.graph() (e.g., query.graph({entity: "some_entity", ...req.queryConfig })), resulting in a Service with alias "undefined" was not found error. Please wait for v2.13.3, which fixes this issue. See #14815 for details.
Highlights
Fix credit line computation on order cancellation and refunding
When cancelling an order with multiple payments (some cancelled or pending), the credit line amount was being incorrectly computed based on all payment amounts, regardless of status. This could result in large negative pending differences. The computation now only considers captured amounts, ensuring accurate credit line totals.
When refunding an order's payments, the credit line amount was being incorrectly computed based on all payments, regardless of the outcome of their corresponding refund. The computation now only takes into account successful refunds.
Filter orders by total amount (view configuration FF enabled) and define max file upload size
Provided the View Configurations feature flag is enabled, the order table now allows filtering orders by their total amount by mapping the value to the underlying order_summary field.
We previously introduced a 1MB limit on file uploads. To attend to different use cases, this release introduces the ability to configure this limit through the medusa-config file. This can be configured as shown below:
// medusa-config.ts
import { defineConfig } from "@medusajs/framework/utils"
export default defineConfig({
admin: {
// Set max upload size to 10MB
maxUploadFileSize: 10 * 1024 * 1024,
// Or disable the limit entirely
// maxUploadFileSize: Infinity,
},
// ... other config
})Show all plugin settings routes in the dashboard
Up until now, only the first plugin's settings routes have appeared in the admin dashboard. If multiple plugins register settings pages, only one would show. All plugin settings route children are now correctly merged and displayed.
Fix create-medusa-app storefront installation when using pnpm
When installing Medusa with pnpm and enabling the Next.js Starter Storefront, an error was raised mentioning pnpm is not available. This release includes dynamic resolution of the package manager set in package.json to match the one being used by the user.
Test files no longer break medusa develop
Previously, having test files (.spec.ts, .test.ts) inside src/workflows, src/subscribers, or src/jobs directories would cause jest is not defined errors when running medusa develop. The resource auto-loader now excludes test files and __tests__/ directories, so they can be placed alongside the source code without issues.
Stripe Payment provider improvements
Previously, if a refund was performed in the Stripe dashboard directly, when trying to create the corresponding Medusa refund, the Stripe provider would throw an error. We know handle this scenario gracefully.
Deleting a customer in Stripe is a permanent action, and if the createPaymentSessionWorkflow failed, this action was performed as part of a compensation function, trapping the customer in a loop when trying to create the account holder in subsequent attempts. We now avoid compensating the createPaymentAccountHolderStep inside the workflow.
Translations no longer crash on primitive arrays
If an entity had a JSONB column containing an array of primitive values (e.g., ["foo", "bar"]), the translation utility would crash with a TypeError when attempting to treat strings as translatable entities. This is now handled gracefully.
Features
- feat(medusa): filter query fields (RBAC field filtering) by @carlos-r-l-rodrigues in #14588
- feat: add forbidden error 403 by @carlos-r-l-rodrigues in #14665
- feat: Allow passing
session_tokento S3 credentials when using an access key by @sradevski in #14778 - feat: Add dynamodb packages as dependencies by @sradevski in #14721
- feat: Introduce filtering by orders total on the Admin UI by @adevinwild in #14146
- feat(admin): add configurable maximum file upload size by @arjusmoon860 in #14720
- feat(medusa,types): add metadata field to AdminUpsertStockLocationAddress and validators by @bouazzaayyoub in #14557
Bugs
- fix(framework): exclude test files from resource auto-loading by @florianhv in #14292
- fix(orchestration):
continueOnPermanentFailurewhen timeout by @carlos-r-l-rodrigues in #14719 - fix(core-flows): only consider captures amounts for credit line amount computation by @NicolasGorga in #14670
- fix(dashboard): settingsRoutes list error (all plugin settings routes now visible) by @chuxi in #14461
- fix(dashboard): pass product ID explicitly to edit option form by @marlinjai in #14631
- fix(dashboard): Added the
__BASE__prefix to the datatable row on click by @adevinwild in #14118 - fix(dashboard): fix toggleable number cell set value by @NicolasGorga in #14619
- fix(dashboard): fix view configurations order filters by @NicolasGorga in #14620
- fix(admin): Fix table cell stacking in RTL languages by @iharshyadav in #14568
- fix(utils): Translations crash on primitive arrays by @Mohammed-AlSharafi in #14565
- fix(types): fix item type for shipping option price calculation by @shahednasser in #14725
- fix(types): make images of product variant optional by @shahednasser in #14689
- fix(js-sdk): fix return type of
listAddressesby @shahednasser in #14712 - fix(icons): default
viewBoxby @fPolic in #14700 - fix(create-medusa-app): fix installations with storefronts for pnpm by @shahednasser in #14681
- fix(cart): add
completed_attoFilterableCartPropsinterface by @webgodo in #14658 - fix(medusa-cli): verbose log level event name typo by @nenadfilipovic-builtt in #14669
- fix: correct
provirdertypo toprovideracross files by @Anexus5919 in #14614 - fix: add
marked_shipped_byto create order shipment by @Fadyy22 in #14660 - fix(core-flows): credit only successful refunds upon order cancellation by @NicolasGorga in #14781
- fix(ui): stale filters when selecting a view by @adevinwild in #14160
- fix(dashboard): Initialize complete price structure for variants in price list edit by @docloulou in #14273
- fix(core-flows,order): avoid returning recreated credit lines due to version bumping as new credit lines in
createOrderCreditLinesWorkflow by @NicolasGorga in #14715 - fix(payment-stripe): handle refunds happening outside of Medusa by @NicolasGorga in #14746
- fix(payment-stripe): Prevent the Stripe payment provider to delete Stripe customers by @adevinwild in #14112
- fix(dashboard): handle undefined payment_collections in order table calculations by @bqst in #14523
- fix(admin): use is_tax_inclusive as column id in store add-currencies form by @webgodo in #14677
- fix(medusa): resolve user_id from user linked to secret key on draft order edit with api-key auth by @NicolasGorga in #14053
Documentation
- docs: added support in Cloud for Next.js 16 by @shahednasser in #14729
- docs: add missing section on custom validation for admin custom auth by @shahednasser in #14682
- docs: add constraint for loops in workflows by @shahednasser in #14639
- docs: add tanstack start solid to supported storefront framework in Cloud by @shahednasser in #14649
- docs: fix Dockerfile COPY command for
.yarn/releasesdirectory by @alexander-wolf in #14710 - docs: update API reference for the loyalty plugin by @shahednasser in #14750
- docs: added information about Claude Code storefront plugin by @shahednasser in #14685
- docs: add ai assistant to homepage by @shahednasser in #14624
- docs: Bloom documentation by @shahednasser in multiple PRs
- docs: fix typo in Notification Module documentation by @mouaz-allahham in #14666
- docs: fix so table data updates on pagination by @420coupe in #14644
- docs: fix command for creating Medusa app with pnpm in configuration guide by @shahednasser in #14684
- docs: disable explain this page if ai feature is disabled by @shahednasser in #14783
- docs: disable AI assistant in bloom docs by @shahednasser in #14779
- docs: new additions to bloom docs by @shahednasser in #14777
- docs: fix navbar active state by @shahednasser in #14760
- docs: expand links section on homepage by @shahednasser in #14751
- docs: send md event instantly by @shahednasser in #14744
- docs: only track event for markdown headers by @shahednasser in #14743
- docs: track markdown page visits by @shahednasser in #14741
- docs: fix AI assistant callout not sticky by @shahednasser in #14734
- docs: content fixes to homepage by @shahednasser in #14696
- docs: fixes to homepage by @shahednasser in #14694
- docs: fix to ai assistant chat by @shahednasser in #14691
- docs: fix command for installing skills by @shahednasser in #14687
- docs: fix updating schemas in generated OAS by @shahednasser in #14662
- docs: fix list products api route response by @shahednasser in #14657
- docs: fix scrolling inside subcategories in the sidebar by @shahednasser in #14656
- docs: fix description of ID param in order-edit routes by @shahednasser in #14647
- docs: update next.js and react by @shahednasser in #14646
- docs: updated instructions for claude-code plugins by @shahednasser in #14638
- Update page.mdx, change run --rm to exec for npm by @adapole in #14786
- docs: fix import for use toast by @svintsoff78 in #14427
Chores
- chore(medusa): super admin user and rbac invite link by @carlos-r-l-rodrigues in #14642
- chore(medusa): admin list policies by @carlos-r-l-rodrigues in #14663
- chore(medusa): add role users endpoint by @carlos-r-l-rodrigues in #14676
- chore: assign user roles by @carlos-r-l-rodrigues in #14695
- chore: missing rbac role policy by @carlos-r-l-rodrigues in #14701
- chore: create announcement in Cloud for new releases by @shahednasser in #14699
- chore: expand fetch order tests by @fPolic in #14651
- chore: fix TSDocs for JS SDK order edit methods by @shahednasser in #14648
- chore(docs): Generated + Updated UI Reference (automated) by @github-actions[bot] in #14634
- chore(docs): Update version in documentation (automated) by @github-actions[bot] in #14633
- chore(core-flows): Add original item totals for cart refresh by @pepijn-vanvlaanderen in
#14539 - chore(core-flows): include stock_location in validation context for flat rate shipping options by @NicolasGorga in
#14749 - chore(dashboard): Add i18n support for promotion template titles and descriptions by @mokivan in #14780
- chore(core-flows): expose product weight as fallback for shipping calculations by @picardplaisimond in #14773
Full Changelog: v2.13.1...v2.13.2