diff --git a/www/docs/content/upgrade-guides/modules/_category_.json b/www/docs/content/upgrade-guides/modules/_category_.json new file mode 100644 index 0000000000..45ed2f544d --- /dev/null +++ b/www/docs/content/upgrade-guides/modules/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 4, + "link": null, + "label": "Modules" +} \ No newline at end of file diff --git a/www/docs/content/upgrade-guides/modules/product/1-2-0.md b/www/docs/content/upgrade-guides/modules/product/1-2-0.md new file mode 100644 index 0000000000..2786e658a4 --- /dev/null +++ b/www/docs/content/upgrade-guides/modules/product/1-2-0.md @@ -0,0 +1,51 @@ +--- +description: 'Actions Required for v.1.2.0' +sidebar_custom_props: + iconName: 'server-stack-solid' +--- + +# v1.2.0 + +Version 1.2.0 of the Product Module introduces minor breaking changes to the `ProductService`. + +## Overview + +This release contains breaking change to the methods `list` and `listAndCount` in the `ProductService` of the Product Module. + +Specifically, the category filter that the service methods accept has changed from `category_ids` to `category_id`. + +--- + +## How to Update + +Run the following command in your project: + +```bash npm2yarn +npm install @medusajs/product@1.2.0 +``` + +--- + +## Actions Required + +### Change usage of Product Module + +If you've applied the category filter to the `list` or `listAndCount` methods of the Product Module, you will need to change it as follows: + +```ts +// Before +ProductService.list({ + category_ids: ["pcat_123", "pcat_456"], +}) +ProductService.listAndCount({ + category_ids: ["pcat_123", "pcat_456"], +}) + +// Now +ProductService.list({ + category_id: ["pcat_123", "pcat_456"], +}) +ProductService.listAndCount({ + category_id: ["pcat_123", "pcat_456"], +}) +``` diff --git a/www/docs/content/upgrade-guides/modules/product/_category_.json b/www/docs/content/upgrade-guides/modules/product/_category_.json new file mode 100644 index 0000000000..073b547744 --- /dev/null +++ b/www/docs/content/upgrade-guides/modules/product/_category_.json @@ -0,0 +1,6 @@ +{ + "label": "Product Module", + "customProps": { + "reverse": true + }, +} \ No newline at end of file diff --git a/www/docs/sidebars.js b/www/docs/sidebars.js index 442cd98bf8..e7354b3bdf 100644 --- a/www/docs/sidebars.js +++ b/www/docs/sidebars.js @@ -1866,6 +1866,20 @@ module.exports = { }, ], }, + { + type: "category", + label: "Modules", + collapsible: false, + customProps: { + sidebar_is_group_headline: true, + }, + items: [ + { + type: "autogenerated", + dirName: "upgrade-guides/modules", + }, + ], + }, { type: "category", label: "Plugins",