v2.0.0-rc.4

medusajs/medusav2.0.0-rc.4Oct 14, 2024by olivermrbl

AI Summary

Release Candidate 4 cleans up deprecated APIs and commands in preparation for the final release.

Key Highlights

  • Removed deprecated commands: `seed`, `migrations [action]`, `links [action]`, and `start-cluster`.
  • Removed deprecated config options like `databaseType` and `httpCompression`.

Breaking Changes

  • Removed deprecated commands (`seed`, `migrations`, `links`, `start-cluster`)
  • Removed deprecated config options (`databaseType`, `httpCompression`, `allowedFields`, etc.)

Full Release Notes

<!-- 
![image](https://github.com/user-attachments/assets/215eb09b-3f80-444d-8813-3368d8376ade)

# Medusa v2.0 Release Candidate #4

CMS_BREAK -->

## Get started with a new project

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

```bash
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:

```json
{
  "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:

```tsx
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
* 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