github medusajs/medusa v2.13.0
v2.13.0: Improved Translations, Priority-based event processing, Better pnpm support

latest releases: @medusajs/workflow-engine-redis@2.13.0, @medusajs/workflow-engine-inmemory@2.13.0, @medusajs/user@2.13.0...
8 hours ago

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 #14574
  • fix(order): call compensateRelationFieldsSelectionFromLoadStrategy when select-in strategy is configured in order repository list methods by @NicolasGorga in #14566
  • fix(core-flows, types): improve product exports memory consumption by @NicolasGorga in #14598
  • fix(core-flows, types): ensure promotion calculation context has required rules data by @fPolic in #14597
  • fix(dashboard): translations settings ui styles alignment by @NicolasGorga in #14601
  • fix(translation): recompute entity translations translated_field_count upon setting update by @NicolasGorga in #14599

Documentation

Chores

Other Changes

New Contributors

Full Changelog: v2.12.5...v2.13.0

Don't miss a new medusa release

NewReleases is sending notifications on new releases.