github medusajs/medusa v2.13.2
v2.13.2: Admin dashboard fixes and DX improvements

6 hours ago

⚠️ 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.

#14670

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.

#14781

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.

#14146

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
  })

#14720

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.

#14461

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.

#14681

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.

#14292

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.

14746

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.

14112

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.

#14565

Features

Bugs

  • fix(framework): exclude test files from resource auto-loading by @florianhv in #14292
  • fix(orchestration): continueOnPermanentFailure when 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 listAddresses by @shahednasser in #14712
  • fix(icons): default viewBox by @fPolic in #14700
  • fix(create-medusa-app): fix installations with storefronts for pnpm by @shahednasser in #14681
  • fix(cart): add completed_at to FilterableCartProps interface by @webgodo in #14658
  • fix(medusa-cli): verbose log level event name typo by @nenadfilipovic-builtt in #14669
  • fix: correct provirder typo to provider across files by @Anexus5919 in #14614
  • fix: add marked_shipped_by to 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

Chores

Full Changelog: v2.13.1...v2.13.2

Don't miss a new medusa release

NewReleases is sending notifications on new releases.