v2.0.0-rc.4
版本发布时间: 2024-10-14 23:17:21
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
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 ofdb:migrate
,db:rollback
anddb:generate
. -
links [action]
: Removed in favor ofdb:sync-links
. -
start-cluster
: Removedstart-cluster
command in favor of the--cluster
flag on thestart
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 ofallowed
property from theMedusaRequest
. - Remove
expand
property in favor ofallowed
property from theRequestQueryFields
. - Remove
defaultFields
anddefaultRelations
in favor ofdefaults
property from theRequestQueryFields
. - Remove
allowedFields
andallowedRelations
in favor ofallowed
property from theRequestQueryFields
.
Events build
- Remove
eventsEnum
in favor ofeventName
property accepted by themoduleEventBuilderFactory
. Also updated all the usages to useeventName
.
ModelDTO
- Remove unused properties
singular
andplural
fromModelDTOConfig
.
Models template
- Remove unused properties
create
,update
,singular
, andplural
fromModelsConfigTemplate
.
Zod validator
- Remove unused
OptionalBooleanValidator
in favor ofbooleanString
.
Features
- breaking: remove deprecated commands and code by @thetutlage in https://github.com/medusajs/medusa/pull/9521
Bugs
- fix(dashboard): Adds routes for handling tax overrides for provinces by @kasperkristensen in https://github.com/medusajs/medusa/pull/9549
- fix(utils): Cascade soft deletion management by @adrien2p in https://github.com/medusajs/medusa/pull/9534
- fix(dashboard): Show SO name in DataGrid by @kasperkristensen in https://github.com/medusajs/medusa/pull/9554
- fix(dashboard): Hide note input on orders by @kasperkristensen in https://github.com/medusajs/medusa/pull/9555
- fix(dashboard): Show progress on tabs in create form by @kasperkristensen in https://github.com/medusajs/medusa/pull/9553
- fix: Add shipping method data validation by @olivermrbl in https://github.com/medusajs/medusa/pull/9542
- fix(dashboard): Change icon of Shipping Profiles card by @kasperkristensen in https://github.com/medusajs/medusa/pull/9563
- fix(dashboard): Prevent category names from overflowing in organize section by @kasperkristensen in https://github.com/medusajs/medusa/pull/9562
- fix: Link migration descriptor case changes and hash computation by @adrien2p in https://github.com/medusajs/medusa/pull/9560
- fix(dashboard): Translate breadcrumbs by @kasperkristensen in https://github.com/medusajs/medusa/pull/9561
Documentation
- docs: updates for breaking changes by @shahednasser in https://github.com/medusajs/medusa/pull/9558
Chores
- chore(framework): update TSDocs for medusa config by @shahednasser in https://github.com/medusajs/medusa/pull/9559
- chore(product): Update the events emitted from the product module by @adrien2p in https://github.com/medusajs/medusa/pull/9557
Full Changelog: https://github.com/medusajs/medusa/compare/v2.0.0-rc.3...v2.0.0-rc.4