Medusa v2.0 Release Candidate #2
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
Continued restructuring
Warning
Breaking change
Since the first RC, we have continued our code restructuring, this time affecting commonly used middleware. These have been moved from @medusajs/medusa
to @medusajs/framework
to make them usable outside the context of the core commerce package.
This is a breaking change if you are using any of the following middleware in your Medusa project:
applyParamsAsFilters
clearFiltersByKey
applyDefaultFilters
setContext
getQueryConfig
httpCompression
maybeApplyLinkFilter
refetchEntities
unlessPath
validateBody
validateQuery
Importing these middleware will look as follows going forward:
import { validateBody } from "@medusajs/framework/http"
Features
- feat(orchestration): Provide hint in workflows error by @adrien2p in #9400
- feat(framework,medusa): Ensure publishable key middleware is set for all store endpoints by @riqwan in #9429
- breaking: move shared HTTP utils to the framework by @thetutlage in #9402
- feature: allow using typescript path aliases when using ts-node by @thetutlage in #9443
Bugs
- fix: Validate
identifier
payload for reset password by @olivermrbl in #9302 - fix(utils): knex import by @adrien2p in #9408
- fix(types, medusa): http types fixes by @shahednasser in #9334
- fix(medusa-oas-cli): Fix incorrect import by @shahednasser in #9404
- fix: Export all classes and types from the SDK by @sradevski in #9422
- fix(create-medusa-app): remove warnings on installation by @shahednasser in #9405
- fix(workflows-sdk): when then return value by @carlos-r-l-rodrigues in #9427
- fix(dashboard): allocation label condition by @fPolic in #9398
- fix(dashboard, fulfilment): fulfilment providers enabled check by @fPolic in #9415
- fix(dashboard): location details loader by @fPolic in #9412
- fix: Use the default admin port in create medusa app env definition by @sradevski in #9439
- fix(core-flows): Remove concurrent steps that rely on the same data update by @adrien2p in #9438
- fix: Get backend URL from environment variable if available by @sradevski in #9450
Documentation
- Update page.mdx by @arun-prasath2005 in #9366
- docs: fix imports from dist by @shahednasser in #9401
- docs: improvements + additions to module docs by @shahednasser in #9152
- chore(oas): clean up oas by @shahednasser in #9354
- docs: fix how api reference shows any type by @shahednasser in #9340
- docs: updates and fixes in utils + fulfillment provider changes by @shahednasser in #9347
- docs: fix query option in instrumentation by @shahednasser in #9395
- chore(oas): general fixes to OAS by @shahednasser in #9413
- docs: DX and performance improvements in API reference by @shahednasser in #9430
- docs: Fix typo. Use instead yuse by @zaidrashid in #9431
- chore(oas): add more details link to pagination and select fields by @shahednasser in #9414
- docs: fix infinite scroll, update next.js, other fixes by @shahednasser in #9441
- docs: add a troubleshooting guide for dist imports by @shahednasser in #9442
Chores
- chore(types, utils): update the TSDocs of AbstractFulfillmentProviderService by @shahednasser in #9349
- chore: Processing filters deeply looking at the current joiner first by @adrien2p in #9428
- chore: improve mikro orm serializer circular ref and link serialization by @adrien2p in #9411
- chore: add action to update starter dependencies + update reference actions by @shahednasser in #9385
Other Changes
- feature: Add MikroORM CLI wrapper to bypass hardcoded module system by @thetutlage in #9426
New Contributors
- @arun-prasath2005 made their first contribution in #9366
- @zaidrashid made their first contribution in #9431
Full Changelog: v2.0.0-rc...v2.0.0-rc.2