Highlights
Medusa MCP users can update their project using the following prompt:
Update my Medusa project to v2.19.0Update Vite and React Router to v7
🚧 Breaking change
This release updates the Medusa Admin dashboard to use Vite v7.3.6 and React Router v7.18.2. This is a breaking change and requires you to make the following changes:
- Update your
vitedirect dependency tov7.3.6 - Update your
react-router-domandreact-routerdirect dependencies to v7.18.2 - Use Node ^20.19.0, ^22.12.0, or greater LTS. Node 20.0–20.18 and 22.0–22.11 are no longer supported.
Due to this update, there are the following breaking changes related to Vite and React Router that may impact you if you use these features:
- Supported browsers are now changed to Chrome >= 107, Edge >= 107, Firefox >= 104, Safari >= 16 (previously 87 / 88 / 78 / 14)
- The Vite config allowed in
medusa-config.ts'sadmin.viteconfiguration now supports Vite 7 config, which makes the following changes:build.target: "modules"is removed. the Vite 7 default is "baseline-widely-available".splitVendorChunkPluginis removed. Usebuild.rollupOptions.output.manualChunksinsteadresolve.conditionsis changed from adding your values to the default, to replacing them.
Response.json()is removed due to the supported browser change. Return or throw aResponseinstead. For example,new Response(JSON.stringify(body), { status, headers: { "Content-Type": "application/json; charset=utf-8" } }).defer()is removed from the React Router API. Loaders return a plain object now; unresolved promises are streamed automatically, so<Await>keeps working unchanged.UIMatch.datafrom React Router is deprecated in favour ofUIMatch.loaderData, which holds the same value, andUIMatch.datais now typed as possibly undefined. This includes theprops.dataform used by detail-route breadcrumb components, which becomesprops.loaderData.
JS SDK Admin Product Option Methods Removed
🚧 Breaking change
The following methods have been removed from the JS SDK as they targeted endpoints that no longer exist:
sdk.admin.product.createOptionsdk.admin.product.updateOptionsdk.admin.product.retrieveOptionsdk.admin.product.deleteOption
To manage a product's options, use sdk.admin.product.update instead.
Changed Default Behavior for Totals Fetching in Carts and Orders
Previously, when retrieving * fields of carts and orders through Query or API routes, that didn't include totals. You had to request those specifically.
Retrieving all fields with * now includes the computed total fields. So, for better performance, make sure to request only the fields you actually need for carts and orders rather than using *.
Support JSONB Types in .json DML Properties
Previously, a property in a data model typed with .json had the TypeScript type of an object, even though the property stores any JSON-serializable value in a jsonb column.
You can now specify the actual type of the column in a type argument of the json method. This only affects the generated type of the property.
For example:
import { model } from "@medusajs/framework/utils"
const Brand = model.define("brand", {
id: model.id().primaryKey(),
name: model.text(),
warnings: model.json<{ code: string; message: string }[]>(),
})Inventory Item Export
Inventory items can now be exported from the admin dashboard as a CSV file. The export workflow is available through the admin UI and via the API, matching the pattern already established for products and orders.
Custom Delivery Address and Additional Data for Fulfillment Creation
When creating a fulfillment, you can now supply a custom delivery address independently of the order's shipping address, and pass arbitrary additional_data through to fulfillment providers. This enables use cases such as drop-shipping to a third-party address or forwarding provider-specific metadata without customizing core flows.
Notification Preferences for Order Edits
Order edit workflows now respect notification preferences. When triggering an order edit, you can opt in or out of sending notifications to the customer, consistent with the preference controls already available on other order operations.
Features
- feat(auth-oidc,dashboard,auth,js-sdk,types,medusa): generic OIDC auth provider by @NicolasGorga in #16023
- feat: Implement search module by @sradevski in #16298
- feat: Replace admin search with a BE endpoint by @sradevski in #16358
- feat: Implement a DSL for search index by @sradevski in #16391
- feat(core-flows,medusa,dashboard,js-sdk,types): add inventory item export by @srindom in #16223
- feat(fulfillment, core-flows, types, utils, medusa): support custom delivery address + pass additional data to createFulfillment by @shahednasser in #16139
- feat(core-flows,dashboard,js-sdk, medusa,types,utils): support notification preferences for order edits by @shahednasser in #16238
- feat(eslint-plugin): prefer workflow events by @leobenzol in #16150
Bugs
- fix(test-utils, modules-sdk, utils, medusa): fix plugin:add for monorepo projects by @shahednasser in #16308
- fix: Improve typings for schema metadata by @sradevski in #16400
- fix(core-flows): delete auth identity when possible upon customer/user deletion by @NicolasGorga in #16176
- fix(caching,core-flows,framework,query,types,utils): pass non automatically computed tags to various cached queries by @NicolasGorga in #16354
- fix(pricing): allow updating prices with an empty rules object by @lazerg in #16267
- fix(medusa): document the invite accept token as a query parameter by @lazerg in #16323
- fix(utils): support array and dynamic types for
.jsonfields in DML by @shahednasser in #16236 - fix(cart): fetch totals with all fields + fix inconsistent total calculation by @shahednasser in #16022
- fix(core-flows): guard calculated price set before reading it in cart line-item prep by @zain-asif-dev in #15939
- fix(order): fetch totals with all fields + fix inconsistent total calculation by @shahednasser in #16021
- fix(medusa): allow admin draft orders without an email or customer_id by @GBreg19 in #16133
- fix(dashboard): hide Property Labels settings item unless view_configurations is enabled by @shahednasser in #16255
- fix(core-flows): honor item-level allow_backorder when confirming inventory by @shafi-VM in #15731
- fix(admin-shared): add missing gift_card.list.side injection zone by @shahednasser in #16218
- fix(core-flows): re-price merged cart line items and hydrate compare_at on update by @shahednasser in #16211
- fix(index): preserve date filters by @DS123-ally in #16186
- fix(dashboard,draft-order): update @hookform/resolvers and react-hook-form to show validation errors in admin forms by @shahednasser in #16208
- fix(dashboard): fetch currency_code for visible currency columns in configurable tables by @Nahid-NHB in #16195
- fix(core-flows): pass the cart's currency and region to fulfillment providers when calculating shipping option prices by @shahednasser in #16207
- fix(dashboard): add tooltip for full product/variant name in pricing data grids by @andershermansen in #15962
- fix(js-sdk): remove dead product-option methods from admin.product by @shahednasser in #16187
- fix(dashboard): fix active sidebar link detection by @shahednasser in #16191
- fix(file-s3): preserve directory portion of filename in object key by @Tusharkhadde in #16010
- fix(core-flows): recompute draft order tax lines on address change and conversion by @shahednasser in #16033
- fix(product): delete individual variant metadata fields by @ihopenre-eng in #16179
Documentation
- docs: add TSDocs for CookieOptions and PluginDetails config types by @shahednasser in #16412
- docs: add TSDocs for DML and search schema metadata types by @shahednasser in #16408
- docs: add TSDocs for delete-auth-identity step and related workflow inputs by @shahednasser in #16404
- docs: add TSDocs for
3ff26b6by @shahednasser in #16403 - docs: add TSDocs for
39fac16by @shahednasser in #16399 - docs: add TSDocs for getVariantsAndItemsWithPrices workflow by @shahednasser in #16317
- docs: add TSDocs for
2648067by @shahednasser in #16383 - docs: add TSDocs for delete product categories workflow and step by @shahednasser in #16265
- docs: add TSDocs for
f2c9d7dby @shahednasser in #16299 - docs: clarify React version requirement for Medusa UI standalone projects by @shahednasser in #16410
- docs: add cloud changelog by @shahednasser in #16411
- docs: add Next.js 15 404 prerender troubleshooting to Cloud deployment guide by @shahednasser in #16371
- docs: fix accept invite parameters in api reference by @shahednasser in #16349
- docs: add docs on gating returns creation from storefront by @shahednasser in #16360
- docs: webhooks in cloud by @shahednasser in #16350
- docs: document webhook endpoints, webhook events, and environment error state by @shahednasser in #16352
- docs: add databaseUrl to Cloud prerequisites manual config warning by @shahednasser in #16356
- docs: fix global product options version tag from v2.16.0 to v2.17.0 by @shahednasser in #16346
- docs: add guide on restricting access for get order route by @shahednasser in #16343
- docs: update DNS verification buttons for custom and email domains by @shahednasser in #16340
- docs: add build/deployment webhook events and remove deprecated ones by @shahednasser in #16388
- docs: update navigation paths for environment Variables, Domains, and Previews tabs by @shahednasser in #16387
- docs: add Next.js tsconfig moduleResolution troubleshooting for Cloud storefront by @shahednasser in #16307
- docs: document multiple custom domains support per environment by @shahednasser in #16306
- docs: fix response of download route when version is not found by @shahednasser in #16295
- docs: document configuration groups, simplified domain flow, and DNS detail page redesign by @shahednasser in #16264
- docs: clarify that product categories must be deleted in order by @shahednasser in #16263
- docs: fix information on root build in cloud by @shahednasser in #16262
- docs: add guide on enforcing sales channel availability in cart by @shahednasser in #16259
- docs: fix info of outdated auth events by @shahednasser in #16258
- docs: split migration guide into three by @shahednasser in #16250
- docs: add docs for MCP server tools by @shahednasser in #16244
- docs: fix file upload encoding, scheduled job disable pattern, and variant inventory query path by @shahednasser in #16243
- docs: add clone cloud project locally doc by @shahednasser in #16242
- docs: document plan-based date range restriction for email logs by @shahednasser in #16237
- docs: fix Cloud storefront troubleshooting, Node.js version warning, and variables set scope defaults by @shahednasser in #16220
- docs: document widget zones changes + caching support in cloud by @shahednasser in #16217
- docs: add Cloud CLI 0.1.12 changelog and update CLI command docs by @shahednasser in #16221
- docs: update deployment rules and preview settings docs by @shahednasser in #16214
- docs: add troubleshooting guide for export error by @shahednasser in #16212
- docs: fix documentation issues in triage inbox by @shahednasser in #16210
- docs: fix sitemap in doc apps by @shahednasser in #16204
- docs: fix documentation issues in triage inbox by @shahednasser in #16183
- docs: fix documentation issues in triage inbox by @shahednasser in #16194
- docs: fix information on the auth verification routes by @shahednasser in #16189
- docs: add inventory events reference to the sidebar and fix tag generation by @shahednasser in #16180
- docs: update webhook and changelog reference by @shahednasser in #16394
- docs(api-reference): markdown retrieval + migrate docs links to new API reference paths by @shahednasser in #16185
Chores
- chore: update vite to v7 across packages by @shahednasser in #16314
- chore: update license by @olivermrbl in #16110
- chore: resolve dependabot alert for js-yaml by @shahednasser in #16385
- chore(product, types, utils, medusa): optimize migration script for product options by @shahednasser in #16315
- chore(utils): show helpful error message when a module's resolve isn't set by @shahednasser in #16192
- chore: improve TSDocs of auth events and cart sales channels by @shahednasser in #16260
- chore: fixes to since tags in TSDocs by @shahednasser in #16225
- chore: migrate legacy API reference links to new page paths in TSDocs by @shahednasser in #16184
- chore: update draft release notes action to include CMS block by @shahednasser in #16409
- perf(core-flows): index variants by id in cart line item preparation by @irontaek in #16233
- perf(medusa): O(n) translations batch matching via Set lookups by @irontaek in #16188
- chore(deps): bump nanoid from 4.0.2 to 5.1.16 in the security-updates group by @dependabot in #16382
- chore(deps): bump dompurify from 3.4.12 to 3.4.13 in the security-updates group by @dependabot in #16373
- chore(deps-dev): bump js-yaml from 4.3.0 to 4.3.1 in the security-updates group by @dependabot in #16357
- chore(deps): bump tar from 7.5.20 to 7.5.22 in the security-updates group by @dependabot in #16213
- docs-utils: fix OAS generation of requests that only returns status by @shahednasser in #16224
- docs-utils: add release banner generator by @shahednasser in #16413
New Contributors
- @NicolasGorga made their first contribution in #16176
- @sradevski made their first contribution in #16391
- @lazerg made their first contribution in #16267
- @zain-asif-dev made their first contribution in #15939
- @GBreg19 made their first contribution in #16133
- @shafi-VM made their first contribution in #15731
- @DS123-ally made their first contribution in #16186
- @Nahid-NHB made their first contribution in #16195
- @andershermansen made their first contribution in #15962
- @Tusharkhadde made their first contribution in #16010
- @ihopenre-eng made their first contribution in #16179
- @irontaek made their first contribution in #16233
- @leobenzol made their first contribution in #16150
Full Changelog: v2.18.0...v2.19.0