Skip to content

Releases: medusajs/medusa

v1.7.13

13 Mar 18:16
Compare
Choose a tag to compare

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

  • chores(medusa): Improve draft order creation perf flow (#3431) @adrien2p

v1.7.12

09 Mar 08:00
Compare
Choose a tag to compare

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.

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

02 Mar 11:04
Compare
Choose a tag to compare

Bugs

  • fix(medusa): Creating Product with Sales Channels disabled (#3357) @riqwan

v1.7.10

01 Mar 17:56
Compare
Choose a tag to compare

Features

  • feat(medusa): Use Bull jobId option to identify duplicates (#3351) @olivermrbl

Bugs

  • fix(medusa): Delete all payment sessions when cart total is 0 (#3346) @adrien2p

v1.7.9

28 Feb 07:58
Compare
Choose a tag to compare

Bugs

v1.7.8

22 Feb 12:14
Compare
Choose a tag to compare

Features

  • feat(medusa): Configurable returnable_items on order decorate totals (#3276) @adrien2p

Bugs

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

14 Feb 16:31
Compare
Choose a tag to compare

Features

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

08 Feb 18:39
Compare
Choose a tag to compare

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

Bugs

Chores

Docs

v1.7.5

19 Jan 17:32
Compare
Choose a tag to compare

Bugs

Docs

v1.7.4

18 Jan 17:53
Compare
Choose a tag to compare

Migrations & Upgrades

Important
This version enables Order Editing and Payment Collection by default. Migrations are required.

In your project, run:

medusa migrations run

Features

Bugs

Chores

Docs