v1.8.0-rc.0 #3569
Replies: 9 comments 5 replies
-
Thanks for all of the work on this release! I've seemed to stumble across an issue, with the Multi-Warehouse support in the Admin UI.
As you can see based on the URL, the The fix in this case is if no locations exist then redirect to the add location route (preferred):
|
Beta Was this translation helpful? Give feedback.
-
Creating a Location An issue I've come across when creating a Location is that there is no Country Dropdown value(s). Therefore, if you begin inputting a Location address, you're unable to create it without the If, I leave |
Beta Was this translation helpful? Give feedback.
-
Variant Stock Potentially, not allow |
Beta Was this translation helpful? Give feedback.
-
Deleting a Variant w/ Warehouse Inventory Upon deleting a Variant with available stock in a Warehouse (inventory), the In the screenshot above, the deleted variant no longer displayed an Inventory name. |
Beta Was this translation helpful? Give feedback.
-
Creating Multiple Variants with Warehouse Inventory Unable to create multiple variants without getting the following error:
Steps to reproduce:
|
Beta Was this translation helpful? Give feedback.
-
General Variant Inventory Discussion In general from my testing, there seems to be a bit of confusion between the stock associated directly on the variant vs the stock on the Inventory Item. An Admin may think that updating the Warehouse stock should update the total variant stock and therefore the total variant stock should be a sum of all the warehouse locations instead of a set value. From quickly glancing at the Location / Inventory code, there seems to be some dependency on the SKU. Potentially, we may want to require an SKU value instead of enabling it to be Another issue I've noticed is that I'm unable to Edit a Variant's SKU or let alone the stock value once created. This may be a bug presented from the changes in this release. |
Beta Was this translation helpful? Give feedback.
-
medusa-extender compatibilityWill medusa-extender be compatible with this 1.8 release? |
Beta Was this translation helpful? Give feedback.
-
The new website is great! Imagine what will happen in 1.8 |
Beta Was this translation helpful? Give feedback.
-
Is there a path to an online version of the 1.8 docs? |
Beta Was this translation helpful? Give feedback.
-
Preface
You will find that version 1.8 introduces breaking changes, which might cause you to wonder; why is this not considered a major version?
As we've mentioned in the past, we are currently not following strict semantic versioning. Instead, we use minor versions for breaking changes and patches for all else - and we will continue to do so for the time being.
We apologize in advance for the inconvenience this may cause to your setup.
Release Candidate for 1.8
We’re excited to share the Release Candidate (RC) of Medusa 1.8. By definition, release candidates are unstable, so we recommend not using this version in production. We are publishing this pre-release to gather feedback from users and the general developer community and to identify bugs and minor improvements to the stuff we've built.
Our 1.8 release comes with many new features while introducing architectural changes contributing toward making Medusa more modular and portable to new, modern environments. Now is your chance to give these changes a spin.
We welcome feedback, questions, and bug reports. Please use Issues for bug reports and the dedicated GitHub Discussion (for this RC) for all else.
In the 1.8 release notes, we will cover all new improvements and features in depth. In the following RC notes, we only briefly outline the high-level changes that are directly affecting your setup.
Get Started
To get started using Medusa 1.8.0-rc.0, the first thing you need to do is upgrade Typeorm to their latest version:
Then install the RC version of our core:
And run migrations:
Aside from upgrading the core, you will need to perform a couple of additional steps, as we’ve changed the core package to rely on our Modules API for cache and events rather than having that functionality baked in. This opens up our cache and events systems to other technologies - more on that in the 1.8 release notes.
Install the new Redis cache module with the following command:
Install the new Redis event bus module with the following command:
Both modules need configuration. In
medusa-config.js
add the following to your project configuration:You are now set up to start using 1.8.0-rc.0
Here’s a quick overview of what’s new in the RC:
This is not an exhaustive overview. Refer to the concrete changes at the bottom of the notes for a more detailed overview.
Features and Improvements
You'll find the following feature flags in 1.8:
order_editing
true
product_categories
false
publishable_api_keys
true
sales_channels
true
tax_inclusive_pricing
false
Features
Multi-warehouse
We are releasing multi-warehouse capabilities in 1.8.
Expand into multiple warehousing locations with our new Inventory and Stock Location modules.
The multi-warehouse features will be enabled by installing and configuring the two modules:
And run migrations:
After setting up the modules, a new set of settings in Medusa Admin will be available to use.
A more in-depth description will be part of 1.8.
Nested Categories
We are releasing a Product Categories API in 1.8.
Organize your products to provide customers with a better browsing experience as they navigate your catalog.
The feature is released under a feature flag. You can enable it by adding the following to your project configuration in
medusa-config.js
:And run migrations:
A more in-depth description will be part of 1.8.
Medusa Admin as a plugin
In 1.8, we will move Medusa Admin to our core repository to live as a plugin,
@medusajs/admin
. You install it directly into your Medusa project.There are two ways of using the new admin plugin; serve it on the server or use its build tooling to deploy it on a hosting platform e.g. Vercel or Netlify.
The following steps demonstrate how to start using the admin plugin on the server. Install it with the following command:
Add it to your plugins in
medusa-config.js
:Add and run the build script:
Upon starting the server after these steps, Medusa Admin will live on the path
/app
on your server URL.Event Bus module
The Redis event bus has been moved from the core into a module, allowing you to build a custom implementation using a different technology from Redis.
To install the Redis event bus, you first install the new package:
The new events system is leveraging our Module API, so you must configure it in your project configuration in
medusa-config.js
:After configuring the Event Bus module, you can start your server as if nothing has changed.
Cache module
The cache mechanism has similarly been moved from the core into a module, allowing you to build a custom implementation using a different technology from Redis.
To install the Redis cache module, you first install the new package:
Similar to the Event Bus module, you must configure it in your project configuration in
medusa-config.js
:After configuring the Cache module, you should be able to start your server as if nothing has changed.
Payment Processor API
This release thoroughly cleans up our payment plugin domain and introduces a fresh new interface for building integrations with payment providers; the Payment Processor API:
The new interface has been applied to our Stripe and PayPal payment plugins.
OAS tooling and improvements
We will introduce the first iteration of our OpenAPI Spec (OAS) tooling, including automated SDK generation, a thorough clean-up of our OAS in the API layer, and a client types package - shipped separately from the core.
The client types package is published under
@medusajs/client-types
Included in the OAS tooling, we ship a CLI allowing you to extend our SDKs and types based on custom OAS in your Medusa project.
Let's say you have the following OAS schema in your own project in file
src/simple-product.ts
:You can extend our Store API OAS output with this schema by running the following command (given that you have the CLI installed):
This will add the
SimpleProduct
to the generatedstore.oas.json
:Now that you've generated your OAS, you can create a type to live alongside all the types from our core. You do so by running the following command:
Inspect the
./src/client-types
and find yourSimpleProduct.ts
in themodels/
folder.Types and Utils packages
In the same vein, we are also introducing two new packages for utils and types that live without a dependency on the core.
The packages are published under
@medusajs/types
@medusajs/utils
Search plugins update
We are extending the capabilities of search services and updating all plugins to use the latest version of their provider-specific SDK.
Most important is the change to the configuration of search plugins. We are updating the shape of index settings. Consider the example with Meilisearch below:
As you can see, the index settings that are specific to each provider have been moved to live under the property
indexSettings
in the typeIndexSettings
.The new
transformer
function allows you to overwrite how the Medusa entities are transformed before being stored in the search provider's data store.Example:
Cosmetic improvements of Medusa Admin
This section will not cover all the new UI for the features that are included in the release. Those will be covered in each feature section in the official 1.8 notes.
Sign in: Simplified
Managing Gift Cards: Switching to use the standard Product page
Upgrade to Typeorm v0.3.11
We’ve upgraded Typeorm from 0.2.31 to ^0.3.11 to leverage a range of significant improvements added by the Typeorm team in 0.3.
This upgrade has brought with it a large amount of breaking changes. Refer to their release notes for an overview of all breaking changes.
We will only cover the changes that affected Medusa, and how you should handle them in your custom implementations.
Changes to
find
andfindOne
You can find a detailed walkthrough of the changes to these methods in Typeorm’s release notes. We’ll cover it briefly.
find()
without any arguments used to return all records of a given entity. This now throws an error. You have to pass an empty object to achieve the same behaviour as before.findOne({})
andfindOne(undefined)
used to return the first record of a given entity. These now returnnull
.findOne(id)
has been dropped. To retrieve an entity by id, you now have to usefindOneBy({ id: "some_id" })
findOne()
now requires awhere
option in its query object to filter datafindOne({ where: { ... }})
. The same goes for methodsfindOne
,findOneOrFail
,find
,count
,findAndCount
.Querying for enums now requires you to use the enum value directly. You cannot pass the string value of the enum.
Utilities
We’ve added utilities that transform data from what was previously expected to the new format to make the upgrade seamless. You can find those in the
build-query.ts
utility file.Repositories
Repositories no longer extend a base class, nor are they of type class. They are created as extensions to the
DataSource
.DataSource
Typeorm’s
Connection
has been deprecated in favor ofDataSource
.Other noteworthy changes
To be filled out
Thanks to all contributors to this release 💜
Happy hacking!
Team Medusa
Features
/admin
and/store
in paths URLs (feat(oas): include/admin
and/store
in paths URLs #3314)activeManager_
getter in TransactionBaseService (feat(medusa): Expose anactiveManager_
getter in TransactionBaseService #3256)Bugs
/ui
files #3459)expand
parameter on order page (fix(admin-ui): Fix use ofexpand
parameter on order page #3383)tailwindcss/nesting
correctly (fix(admin-ui): Resolvetailwindcss/nesting
correctly #3404)expand
parameter on order page (fix(admin-ui): Fix use ofexpand
parameter on order page #3383)tailwindcss/nesting
correctly (fix(admin-ui): Resolvetailwindcss/nesting
correctly #3404)Chores
admin-ui
in core test pipeline #3381)This discussion was created from the release v1.8.0-rc.0.
Beta Was this translation helpful? Give feedback.
All reactions