v1.20.2
medusajs/medusav1.20.2Feb 8, 2024by olivermrbl
AI Summary
Focuses on quality-of-life improvements, specifically error logging, and tracks progress on the Admin revamp and Medusa 2.0 modules.
Key Highlights
- Improved error messaging for missing service exports
- Configurable `jobs_batch_size` in `medusa-config.js`
- Support for `order` query param on `GET /admin/orders`
- Admin revamp progress (Domains completed: Customers, Groups, Taxes, etc.)
- Medusa 2.0 progress (Pricing, Product, Sales Channel, Customer, Workflows)
New Features
- Customer list/store addresses
- Customer group management
- Authentication provider scopes
- Cart `GET /store/carts/:id`
- Authentication module middleware
- User module init
- Region Module (basic CRUD)
Full Release Notes
<!--

# Version 1.20.2
This version ships several quality-of-life improvements, including improved error logging of service customization.
CMS_BREAK -->
## Highlights
### Improve error messaging
We have improved error messaging for missing exports of custom services. Until now, the following non-descriptive message was logged:

In 1.20.2, the same error will now log to the console:

This change landed in https://github.com/medusajs/medusa/pull/6240.
### Expose option to configure batch size of staged job polling
We have introduced an option `jobs_batch_size` in the `projectConfig` in `medusa-config.js`, allowing users to configure the batch size of staged jobs we poll from the database every 3rd second. By default, we poll 1000 jobs, which has proven to cause issues with some setups. This option aims to resolve those.
Example config:
```
module.exports = {
projectConfig: {
jobs_batch_size: 10 // poll 10 jobs every 3rd second
},
}
```
This change landed in https://github.com/medusajs/medusa/pull/6333.
### Support order by queries on `GET /admin/orders`
We have introduced an `order` query param on the `GET /admin/orders` endpoint to support ordering orders.
This change landed in https://github.com/medusajs/medusa/pull/6258.
### Admin revamp (status)
Our work on the admin revamp is progressing well. Below is an overview of completed and remaining work:
**Completed**
- Customers domain
- Customer Groups domain
- Taxes domain
- Currencies domain
- Regions domain
- Stores domain
- Sales Channels domain
- Users domain
- API keys domain
**Remaining**
- Orders domain
- Draft Orders domain
- Products domain
- Gift Cards domain
- Categories domain
- Inventory domain
- Discounts domain
- Regions domain
- Taxes domain
- Locations domain
### Medusa 2.0 (status)
We spend most of our time working on Medusa 2.0 and are seeing great improvements weekly.
You can follow our development in our [roadmap](https://github.com/orgs/medusajs/projects/7).
Here's a high-level overview of completed, WIP, and planned work:
**Completed**
- Pricing Module
- Product Module
- Sales Channel Module
- Customer Module
- Workflows / long-running workflows
**Work-in-progress**
- Payment Module
- Cart Module
- Regions Module
- Fulfillment Module
- Regions Module
- Promotions Module
- Authentication Module
- User Module
- Linked Modules
- Admin: Workflows UI
- Admin: Vite build-tooling
- Admin: UI + UX revamp
- Index Engine
- Rest API V2 (using workflows)
**Planned (non-exhaustive)**
- API keys Module
- Taxes Module
- Store Module
- Notification Module
- Order Module
## Features
* feat(customer): list customer by @srindom in https://github.com/medusajs/medusa/pull/6206
* feat(medusa): Use remote query in get cart API route by @olivermrbl in https://github.com/medusajs/medusa/pull/6285
* feat(customer): store addresses by @srindom in https://github.com/medusajs/medusa/pull/6283
* feat(customer): manage default address selection by @srindom in https://github.com/medusajs/medusa/pull/6295
* feat(modules-sdk): Module provider plugin loader by @olivermrbl in https://github.com/medusajs/medusa/pull/6286
* feat(customer): add migration file by @srindom in https://github.com/medusajs/medusa/pull/6205
* feat(authentication, types): split authenticate method into two by @pKorsholm in https://github.com/medusajs/medusa/pull/6184
* feat(customer): add customer addresses by @srindom in https://github.com/medusajs/medusa/pull/6224
* feat(cart): JoinerConfig by @olivermrbl in https://github.com/medusajs/medusa/pull/6157
* feat: sales channel module by @fPolic in https://github.com/medusajs/medusa/pull/5923
* feat(medusa, stock-location, types): Add q and order params to list-stock-locations by @pKorsholm in https://github.com/medusajs/medusa/pull/6197
* feat(authentication, types, utils): Add Authentication provider scopes by @pKorsholm in https://github.com/medusajs/medusa/pull/6228
* feat(auth): Rename authentication to auth by @pKorsholm in https://github.com/medusajs/medusa/pull/6229
* feat(cart): Migration file by @olivermrbl in https://github.com/medusajs/medusa/pull/6156
* feat(): added compute actions for buyget promotions by @riqwan in https://github.com/medusajs/medusa/pull/6255
* feat(customer): admin CRUD endpoints by @srindom in https://github.com/medusajs/medusa/pull/6232
* feat(cart): `GET /store/carts/:id` by @olivermrbl in https://github.com/medusajs/medusa/pull/6262
* feat(auth, medusa): Initial auth module middleware by @pKorsholm in https://github.com/medusajs/medusa/pull/6271
* feat(dashboard): Users domain by @kasperkristensen in https://github.com/medusajs/medusa/pull/6212
* feat(customer): add customer group management apis by @srindom in https://github.com/medusajs/medusa/pull/6233
* feat(customer): admin addresses by @srindom in https://github.com/medusajs/medusa/pull/6235
* feat(customer): add customer group customer management by @srindom in https://github.com/medusajs/medusa/pull/6276
* feat(customer): Add create and retrieve customer from store side by @srindom in https://github.com/medusajs/medusa/pull/6267
* feat(types): added computed actions for automatic promotions by @riqwan in https://github.com/medusajs/medusa/pull/6272
* feat(auth): add authentication endpoints by @pKorsholm in https://github.com/medusajs/medusa/pull/6265
* feat(): added percentage calculations for all cases by @riqwan in https://github.com/medusajs/medusa/pull/6300
* feat(dashboard): DataTable component by @kasperkristensen in https://github.com/medusajs/medusa/pull/6297
* feat(auth): Make token auth default by @pKorsholm in https://github.com/medusajs/medusa/pull/6305
* feat(medusa-react): Add `medusaClient` as an input to `MedusaProvider` by @erikengervall in https://github.com/medusajs/medusa/pull/6299
* feat(dashboard): Log in, reset password, and accept invite pages by @kasperkristensen in https://github.com/medusajs/medusa/pull/6310
* feat: event aggregator by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/6218
* feat(cart): `POST /store/carts` by @olivermrbl in https://github.com/medusajs/medusa/pull/6273
* feat: Region Module (basic CRUD) by @olivermrbl in https://github.com/medusajs/medusa/pull/6315
* feat(user): Init user module by @pKorsholm in https://github.com/medusajs/medusa/pull/6293
* Feat(auth): Remove auth provider entity by @pKorsholm in https://github.com/medusajs/medusa/pull/6314
* feat(payment): payment and session methods by @fPolic in https://github.com/medusajs/medusa/pull/6138
* feat: Fulfillment module basic structure by @adrien2p in https://github.com/medusajs/medusa/pull/6319
* feat(region): Add migration by @olivermrbl in https://github.com/medusajs/medusa/pull/6320
* feat(medusa): Allow configuring of staged job polling batch size by @olivermrbl in https://github.com/medusajs/medusa/pull/6333
## Bugs
* fix: improve error message on incorrect service export by @srindom in https://github.com/medusajs/medusa/pull/6240
* fix(authentication): remove providers loader by @pKorsholm in https://github.com/medusajs/medusa/pull/6257
* fix(medusa): add support for `order` field on GET /admin/orders by @kasperkristensen in https://github.com/medusajs/medusa/pull/6258
* fix(admin-ui) Refactor `use-copy-promotion` to map product IDs by @erikengervall in https://github.com/medusajs/medusa/pull/6306
* fix: load custom modules by path by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/6312
* fix(medusa): fix constructor container type for abstract services by @shahednasser in #6259
## Documentation
* docs: add a section on custom templates in SendGrid guide by @shahednasser in https://github.com/medusajs/medusa/pull/6215
* docs: change process for generating docblocks through actions by @shahednasser in https://github.com/medusajs/medusa/pull/6237
* docs: refactoring of docblock generator tool by @shahednasser in https://github.com/medusajs/medusa/pull/6261
* docs: fix title of the configuration page by @shahednasser in https://github.com/medusajs/medusa/pull/6268
* docs: s3 The "images.domains" configuration is deprecated by @xyzones in https://github.com/medusajs/medusa/pull/6321
* docs: Update all curl documentation examples and references with new x-medusa-access-token header by @irab in https://github.com/medusajs/medusa/pull/6326
* docs: Typo Cart -> Card by @herawais in https://github.com/medusajs/medusa/pull/6302
* docs: update link to io-redis options by @sidcool1234 in #6337
## Chores
* chore: PR team labeler by @olivermrbl in https://github.com/medusajs/medusa/pull/6249
* chore(core-flows): reorganize folder structure for promotion workflows by @riqwan in https://github.com/medusajs/medusa/pull/6243
* chore: Abstract module service by @adrien2p in https://github.com/medusajs/medusa/pull/6188
* chore: local workflow proxying methods to pass context by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/6263
* chore(cart): Clean up data models by @olivermrbl in https://github.com/medusajs/medusa/pull/6256
## New Contributors
* @herawais made their first contribution in https://github.com/medusajs/medusa/pull/6302
* @xyzones made their first contribution in https://github.com/medusajs/medusa/pull/6321
* @irab made their first contribution in https://github.com/medusajs/medusa/pull/6326
**Full Changelog**: https://github.com/medusajs/medusa/compare/v1.20.1...v1.20.2