npm @medusajs/medusa 1.12.2
v1.12.2

latest releases: 1.20.6-preview-20241005030902, 1.20.6-preview-20241005002111, 1.20.6-preview-20241004210527...
15 months ago

Highlights

Simplified entity extensions

We've simplified the steps to extend an entity so you no longer need to 1) override the entity's repository (step 4 from our guide) and 2) override the models in a custom entry point file.

Our documentation on Extending an Entity has been updated to reflect these changes.

Simplified validator extensions

We've simplified the steps to extend the API payload validation so you no longer have to create a util to perform an override and include it in a loader.

Our documentation will be updated very soon to reflect these changes.

To extend a validator, import and use a new util registerOverriddenValidators.

 import { registerOverriddenValidators } from "@medusajs/medusa"
 import { AdminPostProductsReq as MedusaAdminPostProductsReq } from "@medusajs/medusa/dist/api/routes/admin/products/create-product"
 import { IsString } from "class-validator"
 
 class AdminPostProductsReq extends MedusaAdminPostProductsReq {
    @IsString()
    test: string
 }
 
 registerOverriddenValidators(AdminPostProductsReq)

Features

  • feat(create-medusa-app): support admin onboarding experience by @shahednasser in #4339
  • feat(medusa-plugin-sendgrid): Add error messages by @pevey in #4384
  • feat(medusa): Allow to register extended validators seemlesly by @adrien2p in #4397
  • feat(medusa): Improve error messaging in plugin loader by @olivermrbl in #4410
  • feat(medusa-react,medusa-js): Allow custom headers by @pevey in #4409
  • feat(medusa, types): Improve DX of model extensions (#4398) by @riqwan in #4398
  • feat: Remote Joiner by @carlos-r-l-rodrigues in #4098
  • feat(medusa, stripe, paypal): Add update payment session support to the abstract payment processor API by @adrien2p in #4442
  • feat(create-medusa-app): remove .git directory in the project by @shahednasser in #4493

Bugs

  • fix(product, types): correct path for migration files + fix types on products service module by @riqwan in #4348
  • fix(medusa, utils): fix the way selects are consumed alongside the relations by @adrien2p in #4389
  • fix(medusa-react): fix wrong admin reservations query key by @josetr in #4441

Chores

  • chore(medusa): Concurrently get the items and count instead of sequentially by @adrien2p in #4367
  • chore(gatsby-source-medusa): Cleanup plugin setup by @adrien2p in #4419
  • chore(medusa-dev-cli): Cleanup plugin setup by @adrien2p in #4421
  • chore(medusa-cli): Cleanup plugin setup by @adrien2p in #4420
  • chore(create-medusa-app): Cleanup the main script for readability and maintainability by @adrien2p in #4369

Full Changelog: v1.12.1...v1.12.2

Don't miss a new medusa release

NewReleases is sending notifications on new releases.