Highlights
Breaking changes
The input shape of two core workflows have changed:
updateLineItemInCartWorkflow
export interface UpdateLineItemInCartWorkflowInputDTO {
+ cart_id: string
+ item_id: string
- cart: CartDTO
- item: CartLineItemDTO
update: Partial<UpdateLineItemDTO>
}
addToCartWorkflow
export interface AddToCartWorkflowInputDTO {
+ cart_id: string
- cart: CartDTO
items: CreateCartCreateLineItemDTO[]
}
Patches a regression with the Cart Module
Warning
Schema changes
In an earlier release, we migrated the data models of the Cart Module from MikroORM to our DML. As part of that migration, the tax rate
column on line item tax lines and shipping method tax lines was mistakenly changed from a numeric to an integer. This led to issues with tax rates with decimal points, as they would get rounded to the nearest integer.
In this release, we are changing the rate
column to real
(or float()
in our DML) to be consistent with how tax rates are generally represented across the codebase.
Required action
Run migrations to ensure your server functions as expected after upgrading:
npx medusa db:migrate
Features
- refactor: migration stock location module by @thetutlage in #10471
- refactor: migrate promotion module by @thetutlage in #10410
- feat(core-flows, dashboard, fulfillment, fulfillment-manual, utils, types): create shipping options with calculated prices by @fPolic in #10495
- feat: Migrate customer module to DML by @thetutlage in #10499
- feat(file-s3): Add support for IAM role authentication to file-s3 provider by @sradevski in #10528
- feat: add support for float properties by @thetutlage in #10551
- feat(medusa, core-flows, fulfillment): calculate SO price endpoint by @fPolic in #10532
- Feat/tax dml by @thetutlage in #10525
- feat(types,fulfillment): ability to delete a canceled fulfillment by @riqwan in #10602
- feat(core-flows): calculate SO price on cart ops by @fPolic in #10563
- feat(medusa,pricing): Cart pricing context with customer group by @riqwan in #10579
Bugs
- fix(product): Only apply default order to products if user has not specified one by @kasperkristensen in #10535
- fix(dashboard): Prevent fulfillment provider modal from re-rendering before form submission is complete by @kasperkristensen in #10547
- breaking: pluralization rule for the info word by @thetutlage in #10599
- fix(core-flows): use customer create workflow to reuse the emit event by @riqwan in #10601
- fix(cart): tax rate data type by @carlos-r-l-rodrigues in #10626
Documentation
- docs: documented fetchCredentials options of JS SDK by @shahednasser in #10510
- docs: added restock notification guide by @shahednasser in #10413
- docs: fix page title in reference pagesnot showing + refactor workflows reference by @shahednasser in #10537
- docs: generate references manually for 2.1.1 by @shahednasser in #10534
- docs: regenerate references for core flows by @shahednasser in #10538
- docs: document when-then name by @shahednasser in #10543
- docs: fix typo in code in module isolation documentation by @shahednasser in #10546
- docs: revise recipe examples by @shahednasser in #10545
- docs: revise architectural modules documentation by @shahednasser in #10548
- chore: fixes to tsdocs + docs-util related to providers by @shahednasser in #10555
- docs: fix bugs in API reference by @shahednasser in #10557
- Nits by @MedusaNick in #10558
- docs: fix imports in createBrandStep by @shahednasser in #10567
- docs: clarify that stripe module provider is available in application by @shahednasser in #10577
- docs: add documentation on sending requests to custom routes with JS SDK by @shahednasser in #10582
- docs: updates to contribution guidelines by @shahednasser in #10578
- docs: document many-to-many with extra columns by @shahednasser in #10586
- docs: improve examples in module link direction by @shahednasser in #10590
- docs: add section on updating medusa by @shahednasser in #10589
- docs: document alternatives for conditional operators by @shahednasser in #10588
- docs-util: support @Version tag by @shahednasser in #10591
- chore: fix docs freshness check action by @shahednasser in #10592
- docs: add pivotTable in digital product recipe by @shahednasser in #10605
- docs: add customize stripe integration in next.js guide by @shahednasser in #10583
- docs: small wording fix by @shahednasser in #10616
- docs: remove unnecessary log by @shahednasser in #10619
- docs: add stripe events to provider guide by @shahednasser in #10618
- docs: add example of Table component with pagination by @shahednasser in #10621
- docs: fix expanding of custom relations in customer and product category routes by @shahednasser in #10620
Chores
- chore(payment): Payment module DML by @carlos-r-l-rodrigues in #10553
- chore: small tsdoc update to dml float property. by @shahednasser in #10576
- chore(inventory): convert to dml by @carlos-r-l-rodrigues in #10569
Other Changes
- feat: added Ukrainian translations by @Avia-Code in #10536
New Contributors
- @Avia-Code made their first contribution in #10536
Full Changelog: v2.1.1...v2.1.2