v2.1.2
medusajs/medusav2.1.2Dec 17, 2024by olivermrbl
AI Summary
This release patches a regression with the Cart Module's tax rates (changing from integer to float) and introduces DML migrations for several core modules.
Key Highlights
- Tax rate data type in the Cart Module changed from integer to float to support decimal values.
- Input shapes for `updateLineItemInCartWorkflow` and `addToCartWorkflow` have changed to require `cart_id` instead of full DTOs.
- Stock Location, Promotion, and Customer modules have been migrated to DML.
- Support for float properties has been added to the Data Model API.
Breaking Changes
- The input shape of `updateLineItemInCartWorkflow` now requires `cart_id` instead of `cart` DTO.
- The input shape of `addToCartWorkflow` now requires `cart_id` instead of `cart` DTO.
- Tax rate column type changed from numeric to integer (fixed to float in this release).
New Features
- Migrate stock location module to DML.
- Migrate promotion module to DML.
- Create shipping options with calculated prices.
- Migrate customer module to DML.
- Add support for IAM role authentication to file-s3 provider.
- Add support for float properties.
Full Release Notes
<!--

# v2.1.2
This version patches an issue with the database type of tax rates in the Cart Module.
CMS_BREAK -->
## Highlights
### Breaking changes
The input shape of two core workflows have changed:
- `updateLineItemInCartWorkflow`
```diff
export interface UpdateLineItemInCartWorkflowInputDTO {
+ cart_id: string
+ item_id: string
- cart: CartDTO
- item: CartLineItemDTO
update: Partial<UpdateLineItemDTO>
}
```
- `addToCartWorkflow`
```diff
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 https://github.com/medusajs/medusa/pull/10471
* refactor: migrate promotion module by @thetutlage in https://github.com/medusajs/medusa/pull/10410
* feat(core-flows, dashboard, fulfillment, fulfillment-manual, utils, types): create shipping options with calculated prices by @fPolic in https://github.com/medusajs/medusa/pull/10495
* feat: Migrate customer module to DML by @thetutlage in https://github.com/medusajs/medusa/pull/10499
* feat(file-s3): Add support for IAM role authentication to file-s3 provider by @sradevski in https://github.com/medusajs/medusa/pull/10528
* feat: add support for float properties by @thetutlage in https://github.com/medusajs/medusa/pull/10551
* feat(medusa, core-flows, fulfillment): calculate SO price endpoint by @fPolic in https://github.com/medusajs/medusa/pull/10532
* Feat/tax dml by @thetutlage in https://github.com/medusajs/medusa/pull/10525
* feat(types,fulfillment): ability to delete a canceled fulfillment by @riqwan in https://github.com/medusajs/medusa/pull/10602
* feat(core-flows): calculate SO price on cart ops by @fPolic in https://github.com/medusajs/medusa/pull/10563
* feat(medusa,pricing): Cart pricing context with customer group by @riqwan in https://github.com/medusajs/medusa/pull/10579
## Bugs
* fix(product): Only apply default order to products if user has not specified one by @kasperkristensen in https://github.com/medusajs/medusa/pull/10535
* fix(dashboard): Prevent fulfillment provider modal from re-rendering before form submission is complete by @kasperkristensen in https://github.com/medusajs/medusa/pull/10547
* breaking: pluralization rule for the info word by @thetutlage in https://github.com/medusajs/medusa/pull/10599
* fix(core-flows): use customer create workflow to reuse the emit event by @riqwan in https://github.com/medusajs/medusa/pull/10601
* fix(cart): tax rate data type by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/10626
## Documentation
* docs: documented fetchCredentials options of JS SDK by @shahednasser in https://github.com/medusajs/medusa/pull/10510
* docs: added restock notification guide by @shahednasser in https://github.com/medusajs/medusa/pull/10413
* docs: fix page title in reference pagesnot showing + refactor workflows reference by @shahednasser in https://github.com/medusajs/medusa/pull/10537
* docs: generate references manually for 2.1.1 by @shahednasser in https://github.com/medusajs/medusa/pull/10534
* docs: regenerate references for core flows by @shahednasser in https://github.com/medusajs/medusa/pull/10538
* docs: document when-then name by @shahednasser in https://github.com/medusajs/medusa/pull/10543
* docs: fix typo in code in module isolation documentation by @shahednasser in https://github.com/medusajs/medusa/pull/10546
* docs: revise recipe examples by @shahednasser in https://github.com/medusajs/medusa/pull/10545
* docs: revise architectural modules documentation by @shahednasser in https://github.com/medusajs/medusa/pull/10548
* chore: fixes to tsdocs + docs-util related to providers by @shahednasser in https://github.com/medusajs/medusa/pull/10555
* docs: fix bugs in API reference by @shahednasser in https://github.com/medusajs/medusa/pull/10557
* Nits by @MedusaNick in https://github.com/medusajs/medusa/pull/10558
* docs: fix imports in createBrandStep by @shahednasser in https://github.com/medusajs/medusa/pull/10567
* docs: clarify that stripe module provider is available in application by @shahednasser in https://github.com/medusajs/medusa/pull/10577
* docs: add documentation on sending requests to custom routes with JS SDK by @shahednasser in https://github.com/medusajs/medusa/pull/10582
* docs: updates to contribution guidelines by @shahednasser in https://github.com/medusajs/medusa/pull/10578
* docs: document many-to-many with extra columns by @shahednasser in https://github.com/medusajs/medusa/pull/10586
* docs: improve examples in module link direction by @shahednasser in https://github.com/medusajs/medusa/pull/10590
* docs: add section on updating medusa by @shahednasser in https://github.com/medusajs/medusa/pull/10589
* docs: document alternatives for conditional operators by @shahednasser in https://github.com/medusajs/medusa/pull/10588
* docs-util: support @version tag by @shahednasser in https://github.com/medusajs/medusa/pull/10591
* chore: fix docs freshness check action by @shahednasser in https://github.com/medusajs/medusa/pull/10592
* docs: add pivotTable in digital product recipe by @shahednasser in https://github.com/medusajs/medusa/pull/10605
* docs: add customize stripe integration in next.js guide by @shahednasser in https://github.com/medusajs/medusa/pull/10583
* docs: small wording fix by @shahednasser in https://github.com/medusajs/medusa/pull/10616
* docs: remove unnecessary log by @shahednasser in https://github.com/medusajs/medusa/pull/10619
* docs: add stripe events to provider guide by @shahednasser in https://github.com/medusajs/medusa/pull/10618
* docs: add example of Table component with pagination by @shahednasser in https://github.com/medusajs/medusa/pull/10621
* docs: fix expanding of custom relations in customer and product category routes by @shahednasser in https://github.com/medusajs/medusa/pull/10620
## Chores
* chore(payment): Payment module DML by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/10553
* chore: small tsdoc update to dml float property. by @shahednasser in https://github.com/medusajs/medusa/pull/10576
* chore(inventory): convert to dml by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/10569
## Other Changes
* feat: added Ukrainian translations by @Avia-Code in https://github.com/medusajs/medusa/pull/10536
## New Contributors
* @Avia-Code made their first contribution in https://github.com/medusajs/medusa/pull/10536
**Full Changelog**: https://github.com/medusajs/medusa/compare/v2.1.1...v2.1.2