MyGit

v2.0.0-rc.7

medusajs/medusa

版本发布时间: 2024-10-18 22:25:36

medusajs/medusa最新发布版本:v2.0.1(2024-10-25 23:24:21)

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

Package restructuring

[!WARNING]
Breaking change

This release comes with the final package restructuring, mainly dealing with consistent package names.

The following packages have been renamed:

This is a breaking change, and to upgrade, please update your dependencies as follows:

Standardize provider ID generation

[!WARNING]
Breaking change

We have cleaned up some inconsistencies and legacy code in the provider domain, which has led to breaking changes.

Before

const key = `pp_[PROVIDER]_[id]`

After

const key = `pp_[identifier]_[id]`

*Previously, we did not omit the id if it wasn't specified, which meant registration keys contained undefined. For example:

pp_stripe-ideal_undefined

Aside from having a new name in the dependency container, these changes will also affect the payment providers stored in the database. They are stored using the registration key described above, so consequently, they will be loaded anew the first time you boot up your application after upgrading to this version.

Let's consider an example provider configuration of Stripe with an explicit id:

{
  id: "stripe-usd",
  resolve: "@medusajs/payment-stripe",
  options: { ... }
}

If Stripe providers were enabled, they used to be stored with the following IDs in the database:

pp_stripe_stripe-usd
pp_stripe-ideal_stripe-usd
pp_stripe-bancontact_stripe-usd
...

Those IDs will now be:

pp_stripe_stripe-usd
pp_stripe-ideal_stripe-usd
pp_stripe-bancontact_stripe-usd
...

Let's consider an example provider configuration of Stripe without an explicit id:

{
  resolve: "@medusajs/payment-stripe",
  options: { ... }
}

If Stripe providers were enabled, they used to be stored with the following IDs in the database:

pp_stripe_undefined
pp_stripe-ideal_undefined
pp_stripe-bancontact_undefined
...

Those IDs will now be:

pp_stripe
pp_stripe-ideal
pp_stripe-bancontact
...

These changes will affect all created payment sessions on carts, as the provider specified upon creation no longer exists.

Form submission in Admin

Form submissions in Admin now require CMD + Enter on MacOS or CTRL + Enter on Windows. This makes for a more intentional action and prevents incorrect submissions.

Features

Bugs

Documentation

Chores

New Contributors

Full Changelog: https://github.com/medusajs/medusa/compare/v2.0.0-rc.6...v2.0.0-rc.7

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-10-18发行的版本