Highlights
Plugins
This release introduces Plugins. Plugins are customizations distributed as npm packages. A plugin can do everything a regular Medusa application can, including defining HTTP routes and workflows, registering subscribers, exporting custom modules, or defining links between modules.
Read our documentation on Plugins to learn more.
MikroORM V6 upgrade
This release marks the completion of the migration of all core modules to the Data Model API. As part of this effort, we’ve upgraded our MikroORM dependency from V5 to V6, as V5 has entered maintenance mode. You can read more about the upgrade here.
While this upgrade introduced breaking changes, none of them will impact user projects directly. The only required action is upgrading the MikroORM dependencies in your project.
Required actions
Upgrade the following dependencies in your package.json
alongside your Medusa packages:
"dependencies": {
- "@mikro-orm/core": "5.9.7",
- "@mikro-orm/knex": "5.9.7",
- "@mikro-orm/migrations": "5.9.7",
- "@mikro-orm/postgresql": "5.9.7",
+ "@mikro-orm/core": "6.4.3",
+ "@mikro-orm/knex": "6.4.3",
+ "@mikro-orm/migrations": "6.4.3",
+ "@mikro-orm/postgresql": "6.4.3",
...
"devDependencies": {
- "@mikro-orm/cli": "5.9.7",
+ "@mikro-orm/cli": "6.4.3",
...
Update your lock-file by installing the dependencies:
npm install // use your preferred package manager
DataTable component
This release adds an opinionated DataTable component to @medusajs/ui
. The DataTable component is an opinionated implementation of our Table component and @tanstack/react-table
. It simplifies the setup of tables with advanced features such as pagination, sorting, filtering, row selection, and commands.
Read more about the DataTable and learn how to set it up in our documentation.
New translations added to Admin
This release adds Macedonian, Romanian, Chinese, Persian, Czech, Arabic, and Mongolian to supported languages in Medusa Admin.
Change in behavior of one-to-one relation
This release updates the generated SQL of the one-to-one relation in our Data Model API. Until now, defining a one-to-one relation would generate a unique constraint. Unique constraints do not account for soft-deleted rows, so new rows with the same foreign key as a previously deleted row cannot be inserted. With this release, one-to-one relations will generate a unique index instead to ensure that the uniqueness is only enforced on non-deleted rows.
Features
- feat(ui,dashboard): Add DataTable block by @kasperkristensen in #10024
- feat: Add translations for Macedonian by @sradevski in #11039
- feat: Add support for creating payment methods to payment module by @sradevski in #11063
- feat(dashboard): Refactor Users table to use the new DataTable block by @kasperkristensen in #11058
- feat(medusa,product,types): product type & tag store missing endpoints by @fPolic in #11057
Bugs
- fix(medusa): use correct request and response types for batch location levels route by @shahednasser in #11055
- fix(dashboard,js-sdk,types): Remove redundant body for markAsDelivered by @kasperkristensen in #10964
- fix(framework): migration scripts regexp by @adrien2p in #11072
- fix(create-medusa-app): fix database name from input not used in setup by @shahednasser in #11071
- fix(promotion): eval conditions for rules are made accurate by @riqwan in #10915
- fix(event): Subscriber ID miss usage by @adrien2p in #11047
- fix: Unique constraint should account for soft deleted records by @adrien2p in #11048
- fix(dashboard): Use date util to properly format date in order details view by @kasperkristensen in #11073
- fix(core-flows): change some types to interfaces by @shahednasser in #11061
- fix: Flaky behavior of Yalc by @thetutlage in #11084
- fix(admin-bundler): Fix Vite imports to prevent deprecation warnings by @kasperkristensen in #11086
- fix(dashboard): Persist variant_rank by @kasperkristensen in #11074
- fix(ui): Fix position of Checkbox indicator by @kasperkristensen in #11075
- fix(dashboard): Add global errorElement by @kasperkristensen in #10981
- fix: Medusa package version should use ~ instead of ^ by @adrien2p in #11077
- fix(fulfillment): migration so rules by @carlos-r-l-rodrigues in #11109
- fix(fulfillment): migration so rules by @carlos-r-l-rodrigues in #11113
- fix: switch from tsc watch to chokidar by @thetutlage in #11110
- fix(admin-bundler): Optimize tanstack/react-query by @kasperkristensen in #11112
- fix(dashboard): Format i18n schema with Prettier by @kasperkristensen in #11107
- fix(core-flows, dashboard): handling fulfillment rules by @fPolic in #11111
- fix(medusa,cli): Resources not correctly loaded when running the migration scripts by @adrien2p in #11108
Documentation
- docs: add search to workflows reference by @shahednasser in #11054
- docs: fixes for core workflows reference by @shahednasser in #11056
- docs: fix types with arguments not showing correct properties by @shahednasser in #11062
- chore(order): dml by @carlos-r-l-rodrigues in #10292
- docs: added note in API reference clarifying what schemas are by @shahednasser in #11116
- docs: update list of routes accepting additional data by @shahednasser in #11119
- docs: add a note about installing tanstack query as a dev dependency by @shahednasser in #11123
- docs-util: fix incorrect workflow extracted in OAS by @shahednasser in #11120
- docs: clarify condition / variable manipulation restriction for workflows and steps by @shahednasser in #11125
- typo by @devduttabain in #11128
- docs: document workflow retention by @shahednasser in #11138
- docs: add troubleshooting for cloudflare s3 by @shahednasser in #11143
- docs: fix sidebar items not showing if they have same title in API reference by @shahednasser in #11122
- docs: generate sidebar for main docs by @shahednasser in #11139
- docs: fix current sidebar not found by @shahednasser in #11155
Chores
- chore(ui): add tsdocs for DataTable components by @shahednasser in #11087
- chore(utils): patch unique index migration by @carlos-r-l-rodrigues in #11136
Other Changes
- docs: how to add new admin route under existing route by @eugenepro2 in #10652
- fix(dashboard): create sales channel toast type by @Avia-Code in #11019
- feat: Add translations for Mongolian by @sanchir2011 in #11085
- refactor(ui-preset): replace defaultTheme import by @pnodet in #11041
- add support to arabic by @gharbi-mohamed-dev in #11088
- Add Romanian translation by @python27tt in #10890
- feat: add translation for zh-CN by @leosin in #10757
- Add Persian (fa) translations for the admin dashboard by @behrouz-shafaati in #11091
- feat: add Czech language translation by @TomasKliner in #11127
- product categories hooks by @noubase in #11093
New Contributors
- @sanchir2011 made their first contribution in #11085
- @pnodet made their first contribution in #11041
- @python27tt made their first contribution in #10890
- @leosin made their first contribution in #10757
- @behrouz-shafaati made their first contribution in #11091
- @devduttabain made their first contribution in #11128
- @TomasKliner made their first contribution in #11127
- @noubase made their first contribution in #11093
Full Changelog: v2.3.1...v2.4.0