Releases: medusajs/medusa
v1.7.13
Features
Bulk emit events
This release contains an improvement of the events system in Medusa. We've updated the EventBusService.emit
method to now support bulk emitting a collection of events. This is useful in bulk upsert scenarios and significantly improves performance.
Note, these changes are backward compatible so that you can use emit to send a single event, as usual.
Single emit
await eventBusService.emit("product.created", { id: product.id }, { attempts: 4 })
Bulk emit
let events = [
{
eventName: "product.created",
data: { id: product.id }
opts: { attempts: 5 }
},
{
eventName: "product.created",
data: { id: product2.id }
opts: { attempts: 3 }
}
]
await eventBusService.emit(events)
Chore
v1.7.12
Migrations & Upgrades
Overview
This release contains a migration to ensure that the product_variant_inventory
table is in its correct state. We mistakenly modified a column name in an already released migration, which naturally can lead to issues if the first migration has already been applied.
The issue was reported in #3379.
Actions Required
After updating your Medusa server and before running it, run the following command to run the latest migrations:
medusa migrations run
Features
Global event options
This release contains an improvement of the events system in Medusa. Until now, the core EventBusService.emit
calls have been closed for configuration. This changes in this release with the introduction of an option event_options
, which is configurable in your project config in medusa-config.js
.
Example:
module.exports = {
projectConfig: {
redis_url: REDIS_URL,
database_url: DATABASE_URL,
database_type: "postgres",
store_cors: STORE_CORS,
admin_cors: ADMIN_CORS,
event_options: {
removeOnComplete: 5
}
},
plugins,
};
The available option is in Bull's documentation.
The attempts
option on core emit calls is currently still fixed to 1
.
Important: options passed in this config will be applied globally to all EventBusService.emit
calls. You can still overwrite these options in your custom emit calls as they take precedence over the global options.
- feat(medusa): Add global job options for events (#3394) @olivermrbl
Bugs
- fix(medusa): Remove default job age option from EventBus (#3388) @olivermrbl
- fix(medusa): Create migration to ensure correct variant inventory column (#3384) @pKorsholm
v1.7.11
v1.7.10
v1.7.9
Bugs
- fix(medusa): Fix regression in job scheduler service (#3335) @pepijn-vanvlaanderen
v1.7.8
Features
Bugs
- fix(medusa-js): Export resources classes and make client public (#3271) @kasperkristensen
- fix(medusa): Received quantity on return lines (#3267) @olivermrbl
- fix(oas): patch circular references in docs (#3285) @patrick-medusajs
Chores
- chore(medusa): Revert AbstractPaymentService deprecation (#3298)
- chore(docs): manually generated API reference to fix load issue (#3286) @shahednasser
- chore: changed trigger for docs generation actions (#3304) @shahednasser
v1.7.7
Features
- feat(medusa) - delete cascade modules associations (#3190) @carlos-r-l-rodrigues
- feat(oas) - accurate model OAS representation - F to O (#3210) @patrick-medusajs
- feat(medusa): Improve addShippingMethod on store cart route (#3222) @adrien2p
- feat(medusa): Allow empty fields/expand (#3220) @adrien2p
- feat(oas) - accurate model OAS representation - PA to PU (#3223) @patrick-medusajs
- feat(oas) - accurate model OAS representation - R to U (#3250) @patrick-medusajs
Bugs
- fix(medusa): Pass query transformer config in storefront controllers (#3219) @fPolic
- fix(medusa): Missing refund amount when creating claim (#3224) @olivermrbl
- fix(medusa-plugin-sendgrid): Undefined order in method to build GiftCard data (#3238) @olivermrbl
- fix(medusa): Missing withTransaction on calculateDiscountForLineItem (#3247) @adrien2p
- fix(medusa): Discount allocation precision issues (#3244) @adrien2p
- fix(medusa): Missing withTransaction on update in get-cart.ts (#3246) @adrien2p
- fix(medusa): Add missing scoped transaction on update currency endpoint (#3254) @josetr
- fix(medusa): Default sales channel on product create (#3249) @carlos-r-l-rodrigues
- fix(medusa): Refund amount on returns in claim flow (#3237) @olivermrbl
Chores
v1.7.6
Migrations & Upgrades
Overview
In the last couple of releases, we've started to roll out Product Categories. The API layer is guarded by a feature flag, but the changes/additions to the database schema are not. This release introduces another migration for Product Categories so you are required to run migrations to ensure your server works as expected.
Actions Required
After updating your Medusa server and before running it, run the following command to run the latest migrations:
medusa migrations run
Features
- feat(medusa): Include name in session options (#3186) @pevey
- feat(medusa): Preserve custom adjustments when refreshing adjustments (#3085) @fPolic
- feat(medusa): Decorate OrderEdit LineItems with totals (#3108) @fPolic
- feat(medusa): Include rolling in session options config (#3184) @pevey
- feat(medusa-payment-stripe): Avoid unnecessary customer update if the stripe id already exists (#3046) @adrien2p
- feat(medusa): Option to override existing cron job (#2989) @olivermrbl
- feat(medusa): Expose session options (#3162) @olivermrbl
- feat(medusa): TransactionOrchestrator variant creation (#3097) @carlos-r-l-rodrigues
- feat(medusa): Run shared module migrations (#3109) @carlos-r-l-rodrigues
- feat(medusa): batch remove products from a category (#3141) @riqwan
- feat(medusa): Products can be added to categories in batch request (#3123) @riqwan
- feat(medusa): add or remove categories from products (#3114) @riqwan
- feat(medusa): Added models + repo for products in multiple categories (#3083) @riqwan
- feat(medusa): Add inventory for variants (#2970) @pKorsholm
- feat(oas): accurate model OAS representation - A to D (#3203) @patrick-medusajs
- feat(oas): sanitize circular reference for Redocly (#3198) @patrick-medusajs
- feat(oas): declare x-codegen on Store routes (#3074) @patrick-medusajs
- feat(oas): declare x-codegen on Admin routes - A to D (#3090) @patrick-medusajs
- feat(oas): Improve OAS by adding missing type object to schemas (#3177) @patrick-medusajs
- feat(oas): declare x-codegen on Admin routes - D to PRI (#3092) @patrick-medusajs
- feat(oas): declare x-codegen on Admin routes - PRO to R (#3093) @patrick-medusajs
- feat(oas): declare x-codegen on Admin routes - S to V (#3102) @patrick-medusajs
- feat(oas): declare x-codegen on Admin routes - S to V (#3102) @patrick-medusajs
- feat(medusa): Filter products by category params in store/admin (#3155) @riqwan
- feat(medusa-js): added resources for product categories (#3157) @riqwan
- feat(medusa,stock-location,inventory): Integration tests (#3149) @carlos-r-l-rodrigues
Bugs
- fix(medusa): Applying Discounts (with Conditions) on DraftOrders and Carts (#3197) @adrien2p
- fix(medusa): Allow
method.data
to be passed when creating/updating ShippingMethods in ClaimService (#3205) @kasperkristensen - fix(medusa): Deleting product prices (#3152) @kasperkristensen
- fix(medusa): Shipping profile CRUD (#3154) @kasperkristensen
- fix(medusa): fields params usage in the storefront endpoints (#2980) @fPolic
- fix(stock-location): Stock location address required (#3065) @carlos-r-l-rodrigues
- fix(medusa-payment-stripe): Resend capture event to ensure auto-capture (#3100) @olivermrbl
- fix(medusa-plugin-sendgrid): Inject GiftCardService to eliminate
undefined
error (#2941) @RegisHubelia - fix(medusa): Upsert addresses on Orders (#3153) @olivermrbl
- fix(medusa-react): Fix production.min.js causing invalid hook usage error in CJS environments (#3144) @kasperkristensen
- fix(medusa-payment-stripe): Prevent Stripe events from retrying (#3160) @olivermrbl
- fix(medusa): ShippingOption type on listAndCount (#2040) @adrien2p
Chores
- chore: chore: Patch bump all dependencies + minor bumps winston (#3185) @olivermrbl
- chore(-payment-): Cleanup PaymentProvider plugins (#3011) @adrien2p
- chore(integration-tests): Flaky tests (#3126) @adrien2p
- chore: fixed OAS using incorrect store resource (#3138) @shahednasser
- chore: fixed OAS using incorrect store resource (#3140) @shahednasser
- chore: recommended meaningful oas fixes (#3159) @riqwan
- chore(medusa): refactor service test for product categories (#3161) @riqwan
Docs
- docs: improved SEO of documentation (#3117) @shahednasser
- docs: added product category events to reference (#3118) @shahednasser
- docs: added user guide for order editing (#3120) @shahednasser
- docs: fixed mobile usability of tooltips (#3124) @shahednasser
- docs: added publish plugin documentation (#3137) @shahednasser
- docs: added information about metadata attribute (#3139) @shahednasser
- chore(docs): updated docusaurus to v2.3.0 (#3145) @shahednasser
- docs: fix type in Spaces documentation (#3150) @rafalfortunski
- docs: add and use react-tooltip (#3176) @danielbarion
- docs: updated docusaurus to the latest version 2.3.1 (#3181) @shahednasser
v1.7.5
Bugs
- fix(medusa): Allow deleting metadata fields (#3055) @kasperkristensen
- fix(medusa): Move migration to correct folder (#3067) @olivermrbl
- fix(medusa): Only add Sales Channel relation + field when enabled (#3069) @olivermrbl
Docs
- docs: added migration guide for Medusa React (#3066) @shahednasser
v1.7.4
Migrations & Upgrades
Important
This version enables Order Editing and Payment Collection by default. Migrations are required.
In your project, run:
medusa migrations run
Features
- feat(medusa): Nested Categories Admin Update Endpoint (#2986) @riqwan
- feat(medusa-react): Upgrade react-query and clean up dependencies (#2969) @kasperkristensen
- feat(medusa): Emit events on product category mutations (#3003) @riqwan
- feat(medusa): Allow custom created_by on order edits (#3007) @olivermrbl
- feat(medusa): Retrieve (service + controller) a product category (#3004) @riqwan
- feat(medusa, stock-location, inventory): Allow modules to integrate with core (#2997) @carlos-r-l-rodrigues
- feat(medusa): Validate module required properties (#3029) @carlos-r-l-rodrigues
- feat(medusa): List (service + controller) product categories #3004 (#3023) @riqwan
- feat(medusa): Transaction Orchestrator (#2861) @carlos-r-l-rodrigues
- feat(medusa, medusa-js, medusa-react): Add endpoint to retrieve product tags from the storefront (#3051) @kasperkristensen
Bugs
- fix(medusa): Rename quantity to required quantity (#2963) @pKorsholm
- fix(medusa): Draft order totals not working with custom items (#3008) @adrien2p
- fix(medusa, medusa-payment-paypal): Add missing data in Payment Collection input (#3010) @adrien2p
- fix(medusa): test, build and watch scripts (#3025) @adrien2p
- fix(medusa): Add module config to transaction base service (#3033) @olivermrbl
- fix(medusa): Legacy total service to accept custom items (#3027) @adrien2p
- fix(medusa-js, medusa-react): Fix issue with JS client bundle (#3038) @kasperkristensen
- fix(medusa): Draft order inventory management (#3040) @pKorsholm
Chores
- chore(oas): replace response with $ref to res class JSDoc OAS (A-C) (#3002) @patrick-medusajs
- chore(oas): fixed oas for product category endpoints and model (#3014) @shahednasser
- chore(oas): replace response with $ref class JSDoc (Admin O-PRI) (#3018) @patrick-medusajs
- chore(oas): replace response with $ref class JSDoc (Admin D-N) (#3015) @patrick-medusajs
- chore(oas): replace response with $ref class JSDoc (Admin SHI-V) (#3031) @patrick-medusajs
- chore(oas): replace response with $ref class JSDoc (Store A-PAY) @patrick-medusajs
- chore(feature-flags): Remove OrderEditing feature flag (#3006) @olivermrbl
Docs
- docs: added publishable API keys documentation pages (#2972) @shahednasser
- docs: Temporarily remove note on peer deps in documentation (#2988) @olivermrbl
- docs: fix note about migration script in upgrade guide (#2996) @shahednasser
- docs: updated user guide following sidebar redesign of admin (#2998) @shahednasser
- docs: fix search bar not focused when using keyboard shortcut (#2999) @shahednasser
- docs: added middleware documentation (#3000) @shahednasser
- docs: improved feedback component (#3026) @shahednasser
- docs: fixed note about custom database schema (#3049) @shahednasser
- docs: added a troubleshooting guide for updates (#3057) @shahednasser