Skip to content

Medusa 2.0 Release Candidate #4

Compare
Choose a tag to compare
@olivermrbl olivermrbl released this 14 Oct 15:17
· 183 commits to develop since this release
ebb16d6

Get started with a new project

To get started using the RC, run the following command:

npx create-medusa-app@rc

This command will create a new Medusa project with our redesigned admin and a 2.0-compatible Next.js storefront. The Medusa application and the Next.js storefront are separate projects in separate folders.

Update existing project

Ensure your Medusa dependencies in package.json are using the rc tag:

{
  "dependencies": {
    "@medusajs/admin-sdk": "rc",
    "@medusajs/framework": "rc",
    "@medusajs/medusa": "rc",
    "@medusajs/medusa-cli": "rc",
    ...
  }
}

To ensure an upgrade to a new version is completed correctly, run the following sequence of commands:

rm -rf node_modules
rm yarn.lock // or package-lock.json

yarn // If you are using yarn berry, you need to create the lock-file first

Highlights

Removed deprecated APIs

Warning

Breaking change

We are still cleaning up in preparation for v2.0 and this release removes a range of deprecated APIs.

Here is a list of everything:

Commands

  • seed: There was no implementation for the seed command in the first place.
  • migrations [action]: Removed in favor of db:migrate, db:rollback and db:generate.
  • links [action]: Removed in favor of db:sync-links.
  • start-cluster: Removed start-cluster command in favor of the --cluster flag on the start command.

Config options

  • Remove config option databaseType as it is not used anywhere.
  • Remove config option httpCompression in favor of compression property.
  • Remove allowedFields in favor of allowed property from the MedusaRequest.
  • Remove expand property in favor of allowed property from the RequestQueryFields.
  • Remove defaultFields and defaultRelations in favor of defaults property from the RequestQueryFields.
  • Remove allowedFields and allowedRelations in favor of allowed property from the RequestQueryFields.

Events build

  • Remove eventsEnum in favor of eventName property accepted by the moduleEventBuilderFactory. Also updated all the usages to use eventName.

ModelDTO

  • Remove unused properties singular and plural from ModelDTOConfig.

Models template

  • Remove unused properties create, update, singular, and plural from ModelsConfigTemplate.

Zod validator

  • Remove unused OptionalBooleanValidator in favor of booleanString.

Features

Bugs

Documentation

Chores

  • chore(framework): update TSDocs for medusa config by @shahednasser in #9559
  • chore(product): Update the events emitted from the product module by @adrien2p in #9557

Full Changelog: v2.0.0-rc.3...v2.0.0-rc.4