v2.0.0-rc.5

medusajs/medusav2.0.0-rc.5Oct 15, 2024by olivermrbl

AI Summary

Release Candidate 5 removes the `outDir` configuration option from admin settings and fixes various build and validation bugs.

Key Highlights

  • Removed `outDir` from admin config; output directory is now computed internally.
  • Fixed product options validation and reservation inventory details.

Breaking Changes

  • Removed `outDir` configuration option from admin settings

New Features

  • Add `compare_at_unit_price` when price list price is retrieved

Full Release Notes

<!-- 
![image](https://github.com/user-attachments/assets/34a747a6-5ee9-4068-b3f8-38745aec646a)

# Medusa v2.0 Release Candidate #5

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

### Removing `ourDir` from admin settings
> [!WARNING]  
Breaking change

The `outDir` has been removed in favor of internally computing output directory for the admin dashboard.  

The computation follows these rules
- If admin is not `disabled` and the `build` command is run without the `--admin-only` flag, the admin output directory will be `.medusa/server/public/admin` and it will be served from that same location from the Medusa instance.
- If admin is not `disabled` and the `build` command is run with the `--admin-only` flag, then the admin output directory will be `.medusa/admin`. This commands should be used for deploying the admin dashboard separately from the Medusa instance.


```diff
// medusa-config.ts

{
  // ...
  admin: {
-    outDir: 'some/path'
  }
}
```

## Features
* chore: add compare_at_unit_price when price list price is retrieved by @riqwan in https://github.com/medusajs/medusa/pull/9564
* feat(providers): locking redis by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/9544

## Bugs
* fix(create-medusa-app): use db:migrate to run migrations by @shahednasser in https://github.com/medusajs/medusa/pull/9565
* fix(core-flows, link-module): product <> inventory delete cascades by @fPolic in https://github.com/medusajs/medusa/pull/9528
* fix: remove default value for the cluster flag by @thetutlage in https://github.com/medusajs/medusa/pull/9570
* fix(dashboard): reservation inventory details by @fPolic in https://github.com/medusajs/medusa/pull/9535
* feat(core-flows, product): options checks on product create/update by @fPolic in https://github.com/medusajs/medusa/pull/9171
* fix(utils): update medusa config resolution for consistency by @adrien2p in https://github.com/medusajs/medusa/pull/9591
* fix(utils): Reversed module package missing references by @adrien2p in https://github.com/medusajs/medusa/pull/9589
* fix(admin-vite-plugin): Normalize file paths and add tests by @kasperkristensen in https://github.com/medusajs/medusa/pull/9595

## Chores
* chore: update slack message by @riqwan in https://github.com/medusajs/medusa/pull/9290
* chore: Remove Query Filter by @adrien2p in https://github.com/medusajs/medusa/pull/9403
* chore: Update admin build/serve configuration by @adrien2p in https://github.com/medusajs/medusa/pull/9584

**Full Changelog**: https://github.com/medusajs/medusa/compare/v2.0.0-rc.4...v2.0.0-rc.5