v2.0.4
medusajs/medusav2.0.4Nov 12, 2024by olivermrbl
AI Summary
This release improves the pluralization logic for `MedusaService` types to handle uncountable nouns and special rules.
Key Highlights
- Type helper for `MedusaService` now checks for uncountable nouns and special rules (e.g., tooth, man).
Breaking Changes
- Pluralization logic change affects data models using uncountable nouns and special rules.
New Features
- Add AdminBatchUpdateProductVariant type.
- Filter product by external_id.
- Handle deleted products/variants in the order domain.
- Load product variant edit page and fix product detail query key.
Full Release Notes
<!--  # v2.0.4 This version improves the type generation in the service factory and resolves a range of minor bugs reported since 2.0.0. CMS_BREAK --> ## Highlights ### Improved pluralization of `MedusaService` types > [!WARNING] Breaking change: If you have created data models using the uncountable nouns and special rules below, you might be affected. We've updated the type helper used to generate types for the methods of the `MedusaService`. It now has two conditional checks when converting a singular value to a plural value at the types level. - First, it checks for uncountable nouns in a dictionary. - Second, it looks for special rules for certain words like tooth, man, etc. You can find the reference of uncountable nouns and special rules [here](https://github.com/medusajs/medusa/blob/713e428ec297aa9b23727673e64ca3505c5f5221/packages/core/types/src/common/common.ts#L246). ## Bugs * breaking: pluralize type helper to account for uncountable nouns and special rules by @thetutlage in https://github.com/medusajs/medusa/pull/10011 * fix(types): Add AdminBatchUpdateProductVariant type by @kasperkristensen in https://github.com/medusajs/medusa/pull/10009 * fix(medusa, types): filter product by external_id by @fPolic in https://github.com/medusajs/medusa/pull/10010 * fix(dashboard): handle deleted products/variants in the order domain by @fPolic in https://github.com/medusajs/medusa/pull/9841 * fix(dashboard): Load product variant edit page and fix product detail query key by @kasperkristensen in https://github.com/medusajs/medusa/pull/10029 ### Documentation * docs: improve transform docs by @shahednasser in https://github.com/medusajs/medusa/pull/10023 * docs: fix link to testing tools by @shahednasser in https://github.com/medusajs/medusa/pull/10030 * docs: improve getting started chapters by @shahednasser in https://github.com/medusajs/medusa/pull/10014 * docs: fix cart completion in subscriptions recipe by @shahednasser in https://github.com/medusajs/medusa/pull/10021 ## Chores * chore(medusa): show success message after user is created by @shahednasser in https://github.com/medusajs/medusa/pull/10027 ## Other Changes * docs: add changeset for #10011 by @thetutlage in https://github.com/medusajs/medusa/pull/10018 **Full Changelog**: https://github.com/medusajs/medusa/compare/v2.0.3...v2.0.4