Skip to content

Releases: medusajs/medusa

v2.13.6

08 Apr 09:01
f04adb1

Choose a tag to compare

This release includes an update for MikroORM dependencies to v6.6.12 due to recent security vulnerabilities. While Medusa's core API routes were not impacted by the security vulnerability as they're guarded with Zod validation, it may impact custom API routes if they're not properly guarded. So, we highly recommend updating your Medusa project to avoid potential security vulnerabilities.

There are no breaking changes at Medusa's level due to this update. However, if you use MikroORM and the entity manager in your code, we advise you to read MikroORM's v6.5 and v6.6 release announcements for potential changes.

What's Changed

Features

  • feat(http-types-generator): Add an HTTP types generator and validator for Zod schemas by @shahednasser in #14988

Bugs

Documentation

Chores

Other Changes

  • fix(cli): close leaked file descriptor in clearProject by @buley in #14917
  • fix: use exponential backoff in Redis lock acquisition retries by @peterlgh7 in #14954
  • Chore: Release by @github-actions[bot] in #15030

New Contributors

Full Changelog: v2.13.5...v2.13.6

v2.13.5

25 Mar 08:10
6c3511a

Choose a tag to compare

Features

Bugs

Documentation

Chores

  • chore(docs): Update version in documentation (automated) by @github-actions[bot] in #14890
  • chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #14891
  • Chore/increase stale thresholds by @NicolasGorga in #14929
  • chore: disable rbac user link when ff is off by @carlos-r-l-rodrigues in #14933

Other Changes

New Contributors

Full Changelog: v2.13.4...v2.13.5

v2.13.4

14 Mar 10:14

Choose a tag to compare

Features

Bugs

  • fix(core-flows): ensure reason ids is an array in validateReturnReasons util by @NicolasGorga in #14836
  • fix(ui): propagate data table scroll by @fPolic in #14849

Documentation

  • chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #14822
  • docs: remove ignored resources from references by @shahednasser in #14841
  • docs: add plaintext doc message to markdown content responses by @shahednasser in #14888

Chores

Other Changes

New Contributors

Full Changelog: v2.13.3...v2.13.4

v2.13.3: Fixes regression with entity on query config

27 Feb 13:01

Choose a tag to compare

Highlights

Fixes regression with undefined entity on req.queryConfig

In v2.13.2 req.queryConfig started including an entity property even when its value was undefined. This caused routes that spread req.queryConfig into query.graph() to have their entity property overwritten by undefined, resulting in the exception: Service with alias "undefined" was not found error. This release fixes the issue by only setting the entity property in req.queryConfig when it indeed has a value.

#14815

Bugs

  • fix(core-flows): prevent exception when deleting product/variant with orphaned inventory by @NicolasGorga in #14805
  • fix(framework): remoteQueryConfig undefined entity regression by @NicolasGorga in #14815

Chores

Full Changelog: v2.13.2...v2.13.3

v2.13.2: Admin dashboard fixes and DX improvements

26 Feb 16:55

Choose a tag to compare

⚠️ 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 upgrade to 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

Read more

v2.13.1: Fixes regression with totals on order listing

25 Jan 16:20

Choose a tag to compare

Highlights

Fixes regression with totals on order listing

This release fixes a bug introduced in v2.13.0 around total fields selection when listing orders. The bug occurs when loading order items with their relations using the select-in strategy:

  1. The code maps field selections from items.* to items.item.* to load OrderLineItem data
  2. However, critical OrderItem fields like quantity live on items.detail, not on items.item
  3. These fields were being dropped during the mapping process
  4. Without quantity data, the order totals couldn't be calculated correctly

The select-in strategy is used when listing orders with pagination options, which is for example used in the GET /admin/orders and GET /admin/draft-orders endpoints.

This fix adds compensatory logic that ensures when items.item.* fields are selected, the corresponding items.* fields are also selected or preserved. This prevents the data required for order calculations from being removed.

Bugs

  • fix(medusa): use http type for batch translation settings request by @shahednasser in #14612
  • fix(core-flows): recompute adjustments for draft orders after changes are added by @fPolic in #14511
  • fix(order): item relation loading in select-in path by @fPolic in #14629

Documentation

  • docs: changes for v2.13.0 by @shahednasser in #14524
  • chore(docs): Updated API Reference (automated) by @github-actions[bot] in #14609
  • docs: fix references pipeline + generate references for v2.13.0 by @shahednasser in #14623

Chores

  • chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #14608
  • chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in #14607
  • chore(docs): Update version in documentation (automated) by @github-actions[bot] in #14611
  • chore(medusa): default medusa policies by @carlos-r-l-rodrigues in #14542

Full Changelog: v2.13.0...v2.13.1

v2.13.0: Improved Translations, Priority-based event processing, Better pnpm support

22 Jan 09:47

Choose a tag to compare

Highlights

Zod dependency restructuring

🚧 Breaking change

This release adds zod as a dependency of @medusajs/framework.

This change has been marked as breaking although for the vast majority of projects, existing zod imports will continue to work through either as a direct dependency (if zod is installed directly in your project), or a transitive dependency.

Developers using pnpm couldn't access zod due to strict dependency isolation. Since zod is essential for Medusa development, making it a framework export ensures consistent versioning and accessibility, similar to other third-party libraries used in Medusa.

Migration

Update your zod imports from:

import { z } from "zod"

To:

import { z } from "@medusajs/framework/zod"

We've added a codemod to automate this migration. After updating to the latest version, run:

npx medusa codemod replace-zod-imports

#14441
#14520


Improved Translations

Translation Settings Management UI

This release adds a new admin dashboard interface for managing translation settings, allowing merchants to configure which entities and fields are translatable directly from the UI.

Translatable modifier in the Data Model API

This release adds a new .translatable() modifier for text properties in the Data Model API.

Example Usage:

const Store = model.define("store", {
  name: model.text().translatable(),
  description: model.text().translatable(),
})

These two changes to Translations improve the experience of managing translatable entities and their translatable fields. When the translatable modifier from the Data Model API is used, the entity will automatically be marked as translatable. This will make it available for configuration in the admin dashboard. Merchants can select what fields of each entity needs translation.

In https://github.com/medusajs/medusa/releases/tag/v2.12.4, we added support for translating custom entities by specifying them in the module options of Translations. This option has been removed in favor of the changes in this release. As described above, entities that has any field with the .translatable() modifier will be marked as translatable.

The following are required actions, if you have already translated data models from custom modules:

  • Remove the entities option from the translation module in medusa-config.ts
  • Add the .translatable() property to fields in your data model definitions
  • Configure the translatable entities from the new management view in the admin dashboard

Existing translations for custom data models will remain as is after the upgrade.

Translations is still an experimental feature. Enable it in your project by following the guide in our documentation.

#14494
#14541


Priority-based event processing

This release introduces a priority queue system for event processing to improve system responsiveness and prevent internal events from blocking critical business operations.

Key Changes

  • Event processing now uses priority levels to determine processing order (lower number = higher priority)
  • Internal system events are automatically assigned the lowest priority to prevent queue overload
  • Critical business events like order placement are processed first with high priority (priority 10)
  • All other events default to standard priority (priority 100)
  • Priority can be customized at message, emit, or module level for fine-grained control

This ensures that important customer-facing events (e.g., order confirmations) are processed immediately, even during high-volume internal system operations.

#14476


Improved support for pnpm

This release resolves common issues with pnpm for new installations.

create-medusa-app now installs Medusa with the package manager you're using:

yarn dlx create-medusa-app@latest # install with yarn
pnpm dlx create-medusa-app@latest # install with pnpm
npx create-medusa-app@latest # install with npm

You can alternatively use the --use-npm, --use-yarn, or --use-pnpm options to specify the package manager to use.

Note: we recommend using yarn or pnpm to install dependencies. npm is known to be slower.


Filtering admin notifications

This release introduces a fixed filter, channel=feed, on notifications fetched for the notification drawer in Medusa Admin.

This was always intended to ensure we only show notifications that are purpose-built for the notification drawer. Other channel notifications will break the rendering of the drawer, since they don't have the required content format for the component.

#14549


React Router upgrade

This release bumps react-router-dom from 6.20.1 to 6.30.3 to eliminate a security vulnerability. See advisory here.

If your project has react-router-dom installed explicitly, please upgrade to version 6.30.3.


Claude Code Plugins

We've published new Claude Code plugins to assist you in your development with Medusa. The medusa-dev plugin gives Claude the knowledge to help you in building customizations in your backend, admin, and storefront.

To install the plugin:

claude # start claude code
/plugin marketplace add medusajs/medusa-claude-plugins
/plugin install medusa-dev@medusa

Then, you can ask Claude Code to build Medusa features, fix bugs, and more. Claude Code will use the skills in the plugin to provide you with accurate and relevant Medusa code.

For example, you can run the following prompts to create a product reviews feature:

Implement a product reviews feature. Authenticated customers can add reviews. Admin users can view and approve or reject reviews from the dashboard

Features

  • feat(DML): Add a new translatable property modifier applicable on text by @adrien2p in #14494
  • feat(deps,framework): add zod as framework dependency by @shahednasser in #14441
  • feat(create-medusa-app): add support for pnpm and specifying package manager by @shahednasser in #14443
  • feat(events): Implement default priority-based event processing by @adrien2p in #14476
  • feat(config): Default event worker concurrency to 3 on cloud by @adrien2p in #14477
  • feat(core-flows,types,utils,medusa): Translate tax lines by @NicolasGorga in #14359
  • feat(medusa-cli): add codemod command + codemod for replacing zod imports by @shahednasser in #14520
  • feat(translation,fulfillment,customer,product,region,tax,core-flows,medusa,types): Implement dynamic translation settings management by @NicolasGorga in #14536
  • Feat(): improve module typings in medusa config and prepare event config typings by @adrien2p in #14478
  • feat(medusa): Prevent build command from throwing on missing config by @adrien2p in #14540
  • feat(core-flows): Allow payment session status captured to be processable upon cart completion by @NicolasGorga in #14527
  • feat(create-medusa-app): add facts for Claude Code plugin and MCP server by @shahednasser in #14578
  • feat(dashboard,translation,js-sdk,medusa,types): Translation settings management UI by @NicolasGorga in #14541

Bugs

  • fix: Add schema only flag on Medusa app loader by @adrien2p in #14502
  • fix(core-flows): Avoid throwing if no prices found for variant when adding to cart custom price item by @NicolasGorga in #14528
  • fix(utils): fix import of caching and translation modules to be from @medusajs/medusa by @shahednasser in #14519
  • fix(dashboard): filter feed channel notifications in admin dashboard by @NicolasGorga in #14549
  • fix(core-flows): pass created_by to fulfillment input by @NicolasGorga in #14561
  • fix: fix validation in posthog analytics identify by @peterlgh7 in #14562
  • fix(core-flows): Prevent calling list methods unnecessarily in various update workflows by @NicolasGorga in #14567
  • fix(docs): Remove spread operators and let mergeConfig handle merging by @NicolasGorga in #14558
  • fix(create-medusa-app): fix error handling when thrown error is a string by @shahednasser in #14555
  • fix(utils): support both path and parentPath in migration file by @riqwan in #14576
  • fix(cli): show clear error when running outside a Medusa project by @shahednasser in h...
Read more

v2.12.5: Fix build-process regression

09 Jan 12:01
baaee11

Choose a tag to compare

Highlights

Fixes regression with link migrations

This release fixes a regression in type generation during builds that could cause build failures under certain conditions. In PR #14493, we updated the build process to generate Medusa’s autogenerated types at build time, ensuring they are available both during development and in production.

This change introduced an unintended issue in the build process. Generating types during the build requires bootstrapping the application. During bootstrap, several core internal loaders are executed, including those responsible for establishing database connections. These loaders depend on specific environment variables, and when those variables are not present, the build fails.

This release changes the types generation to rely on a β€œlightweight” bootstrap mode , which allows the application to start without executing these core internal loaders, avoiding the dependency on environment variables during the build phase.

Features

Bugs

  • feat(medusa-app): Link initialization should respect migrationOnly flag by @adrien2p in #14493

Documentation

Chores

  • chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in #14467
  • chore(docs): Update version in documentation (automated) by @github-actions[bot] in #14468

Full Changelog: v2.12.4...v2.12.5

v2.12.4: Improved Translations

06 Jan 15:38

Choose a tag to compare

Highlights

New Translations features

This release expands the capabilities of Translations. Note that Translations is still an experimental feature. Refer to our documentation on how to get started.

New translatable core data models

We have extended the set of core translatable data models to include:

  • Shipping Option
  • Region
  • Customer Group
  • Shipping Option Type

If you need additional core data models to be translatable, please feel free to open an issue and we will address it as soon as possible.

Support for custom data models

We have added support for translating data models from custom modules. These can be specified in the module options of the @medusajs/translation module, as shown below:

module.exports = defineConfig({
  projectConfig: { ... },
  modules: [
    {
      resolve: "@medusajs/translation",
      options: {
        entities: [{ type: "post", fields: ["title"] }],
      },
    },
  ],
  featureFlags: {
    translation: true,
  },
})

The API is still under development and may change in a future release.

When custom data models are specified in the module options, they are automatically detected and will allow merchants to add translations from the admin dashboard without any additional setup.

Fetching the localized version of your data is easily done with query.graph:

const { data } = query.graph(
  {
    entity: "post",
    fields: ["title"]
  },
  {
    locale: "de-DE"
  }
)

Simply pass the locale option and Medusa will take care of the rest under the hood.

Generate types during build

This release improves our build-tooling to generate types in .medusa/types/ during the build. This ensures that types used during development will not cause the production build to fail.

Resolved risk of critical data loss

This release solves an issue with order-deletion, that could lead to critical data loss. See PR here. The issue was reported by @mo6zes and solved shortly after. We will publish an advisory describing the details soon.

Although, the data loss could only happen under rare circumstances, we advise upgrading to the latest version as soon as possible.

Features

  • feat(): Auto generated types generation upon build by @adrien2p in #14337
  • feat(): Translation settings + user configuration + admin hook and js sdk + dashboard by @adrien2p in #14355
  • feat(dashboard): Add first and last name inputs to update order shipping and billing address forms by @NicolasGorga in #14394
  • feat(translation,core-flows): translate remaining core entities and sync shipping option <> method translations by @NicolasGorga in #14358
  • feat(core-flows,utils): Shipping options workflow events emission by @NicolasGorga in #14388
  • feat(dashboard,draft-order): Remove hardcoded strings and replace with translations in draft orders list page by @NicolasGorga in #14400
  • feat(medusa,utils,core-flows): add reset password metdata by @riqwan in #14417
  • feat(translation): Update wording in translation list for translation… by @adrien2p in #14453
  • feat(translation): Order translastable entities ordered alphabetically by @adrien2p in #14451
  • feat(translation): Add support for locale to the graph query by @adrien2p in #14454
  • feat(translation): Improve translation alert in empty languages state by @adrien2p in #14464

Bugs

Documentation

Chores

  • chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #14336
  • chore(docs): Update version in documentation (automated) by @github-actions[bot] in #14334
  • chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in #14335
  • chore: fix TSDocs of total fields to be accurate by @shahednasser in #14367
  • chore: Ensure isolated order deletion by @olivermrbl in #14405
  • chore: Create publishable API key as part of the defaults by @olivermrbl in #14356
  • chore: Add Claude Code commands by @olivermrbl in #14438
  • chore: fix eslint config in root by @shahednasser in #14444
  • chore(medusa): add missing fields and filters to product variants endpoint by @NicolasGorga in #14448
  • chore: Require manual trigger of Claude review by @olivermrbl in #14455
  • chore: update TSDocs + export getTranslatedShippingOptionsStep from core-flows by @shahednasser in #14460

Other Changes

  • fix(translation): prevent duplicate locale error on server restart by @0xFl4g in #14345
  • feat(medusa...
Read more

v2.12.3: Translations (experimental) and Order Exports

17 Dec 13:15

Choose a tag to compare

Highlights

Translations (experimental)

This release introduces experimental support for Translations. Translations allows merchants to configure multiple locales in their store and translate their product information accordingly. In this experimental release, translations support all entities from the Product Module. In the official release in January, we expect to support additional core entities and offer framework-level tooling to translate entities from custom modules.

Read the announcement blog post or get started in our documentation.

Order Exports

This release introduces support for exporting Orders to a .csv file from Medusa Admin. The export will use the filters applied in the orders table.

Features

Bugs

Documentation

Chores

Other Changes

New Contributors

Full Changelog: v2.12.2...v2.12.3