Commit Graph

9513 Commits

Author SHA1 Message Date
github-actions[bot]
893da93feb chore(docs): Updated UI Reference (automated) (#14469)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action


---

> [!NOTE]
> Updates Medusa UI-related dependencies to latest patch versions across the docs monorepo.
> 
> - Bumps `@medusajs/icons` to `2.12.4` in `api-reference`, `book`, `cloud`, `resources`, `user-guide`, `docs-ui`, and `types`
> - Bumps `@medusajs/ui` to `4.0.32` in `api-reference`, `ui`, and `docs-ui`
> - Bumps `@medusajs/ui-preset` to `2.12.4` in `ui` and `tailwind`
> - Refreshes `yarn.lock` to reflect new versions
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit eac21c3aa042fd700e27e762e79200d76cf48ef5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>


Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2026-01-06 16:21:11 +00:00
github-actions[bot]
7e66d94294 chore(docs): Update version in documentation (automated) (#14468)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2026-01-06 18:04:55 +02:00
github-actions[bot]
d7f4788b8c chore(docs): Generated DML JSON files (automated) (#14467)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2026-01-06 18:04:27 +02:00
Shahed Nasser
a2210ea5e7 docs: docs for next release (#14456) 2026-01-06 17:40:26 +02:00
olivermrbl
a960fb75c9 chore: Release 2026-01-06 16:29:01 +01:00
github-actions[bot]
229fc6f8fd chore: Version Packages (#14331)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-06 16:21:52 +01:00
Adrien de Peretti
d54589751c feat(translation): Improve translation alert in empty languages state (#14464)
**What**
When there is no languages configured, the translation page will show a proper alert on the page that is more visible and actionable
2026-01-06 15:04:23 +00:00
Shahed Nasser
b300a93345 fix(create-medusa-app): fix version option not working with Next.js storefront (#14462)
1. Fix error when passing `--version` and installing Next.js storefront. The error is because the UI package doesn't follow the same versioning as other Medusa packages, so this will skip updating the version of the UI package.
2. Other: added error logging for installation errors
2026-01-06 14:40:54 +00:00
Shahed Nasser
60f68ff492 chore: update TSDocs + export getTranslatedShippingOptionsStep from core-flows (#14460) 2026-01-06 15:26:23 +02:00
Shahed Nasser
ab7b04dbc9 fix(js-sdk): add metadata parameter to request body type of reset-password route (#14458)
* fix(js-sdk): add metadata parameter to request body type

* update changeset
2026-01-06 12:36:29 +01:00
Adrien de Peretti
0ffd790109 feat(translation): Add support for locale to the graph query (#14454)
* feat(translation): Add support for locale to the graph query

* feat(translation): Add support for locale to the graph query

* feat(translation): Add support for locale to the graph query

* feat(translation): fix import

* fix

* cleanup

* fix context in product routes

* Create dull-onions-punch.md
2026-01-06 12:29:27 +01:00
Adrien de Peretti
0490a1c67f feat(translation): Order translastable entities ordered alphabetically (#14451)
Order translastable entities ordered alphabetically
<img width="1178" height="759" alt="Screenshot 2026-01-06 at 08 41 43" src="https://github.com/user-attachments/assets/2eaa2f9c-07c7-46b1-b2ff-3a0660b575d8" />
2026-01-06 10:35:06 +00:00
Adrien de Peretti
d9bc2767c1 feat(translation): Update wording in translation list for translation… (#14453)
* feat(translation): Update wording in translation list for translation count

* Create great-dolls-burn.md
2026-01-06 11:27:49 +01:00
Oli Juhl
f148739f0d chore: Require manual trigger of Claude review (#14455)
* chore: Require manual trigger of Claude review

* consolidate actions

* split workflow runs
2026-01-06 11:01:26 +01:00
Nicolas Gorga
9cad05c8df chore(medusa): add missing fields and filters to product variants endpoint (#14448)
## Summary

**What** — What changes are introduced in this PR?

Add missing filters like `ean, upc, barcode` and fields like `thumbnail` to product variants endpoints.

**Why** — Why are these changes relevant or necessary?  

We had a disconnection between the allowed filters and fields for variants in the products endpoint and in the product variants endpoint.

**How** — How have these changes been implemented?

Avoid this issue in the future by removing redundant definitions for fields and filters for variants in the products and variants endpoints, consolidating them in the variants endpoint and implementing imports in the products endpoint. Add missing fields/filters to product variants endpoint.

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

*Please provide answer here*

---

## Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.  
This helps with documentation and ensures maintainers can quickly understand and verify the change.

```ts
// Example usage
```

---

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [x] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.

fixes SUP-2872
2026-01-06 09:46:38 +00:00
Shahed Nasser
a01b748217 chore: fix eslint config in root (#14444) 2026-01-06 08:17:14 +02:00
Adrien de Peretti
9d2c78db4e fix(translation): omit id from types properties (#14445)
* fix(translation): omit id from types properties

* Create dry-toes-lay.md
2026-01-05 20:24:37 +01:00
Nicolas Gorga
8055a79c52 fix(core-flows): conditionally create customer on order email update if unset (#14264)
* Find or create customer on order email update when order email is unset

* Tests

* Add changeset
2026-01-05 16:12:42 +01:00
Nicolas Gorga
a464e9d907 fix(core-flows): Avoid checking inventory items on fulfillment cancel for unmanaged inventory variants (#14177)
* Avoid checking existent inventory item on fulfillment cancellation for variants without managed inventory

* Add changeset

* Dismiss existent variant inventory links when updating to unmanaged inventory

* Update input type and step name

* Dismiss inventory when variant is updated to unmanaged inventory

* Review changes

* Fix

* Fix

* Comments

* Include Map to avoid iterating unnecessarily
2026-01-05 16:11:23 +01:00
Shahed Nasser
4bc15b4dc4 docs: fix styling of code elements in headers (#14440) 2026-01-05 12:49:58 +02:00
Oli Juhl
e63d0ca3cf chore: Add Claude Code GitHub Workflow (#14439)
* "Claude PR Assistant workflow"

* "Claude Code Review workflow"
2026-01-05 10:57:52 +01:00
Oli Juhl
747ec9fc27 chore: Add Claude Code commands (#14438)
* chore: Add Claude Code commands

* chore: Improvements based on feedback
2026-01-05 10:56:03 +01:00
Shahed Nasser
4d632e7a5d docs: added tests for components in api-reference project (#14428)
* add tests (WIP)

* added test for h2

* finished adding tests

* fixes

* fixes

* fixes
2026-01-05 10:56:56 +02:00
calebro
fb772f0f6a docs: fix PostHog API Key link (#14433)
Update PostHog API Key link in page.mdx
2026-01-05 09:43:48 +02:00
Arpit Goyal
353f4712a0 docs: fix typo in Medusa API key instructions (#14435)
* Fix typo in Medusa API key instructions

* Update www/apps/resources/app/nextjs-starter/page.mdx

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2026-01-05 09:42:52 +02:00
Riqwan Thamir
43305a562c feat(medusa,utils,core-flows): add reset password metdata (#14417)
## Summary

**What**

Adds metadata field for reset password route that allows passing data from caller that can be found in the subscriber. 

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [x] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable


---

> [!NOTE]
> Introduces optional request `metadata` for reset-password and propagates it through to event subscribers.
> 
> - Accepts `metadata` in `ResetPasswordRequest` validator and `reset-password` route; forwards it to `generateResetPasswordTokenWorkflow`
> - Workflow now accepts `metadata` and includes it in emitted `auth.password_reset` event data
> - Updates event docs to mention `metadata` field
> - Adds integration test verifying `metadata` is emitted in the password reset event
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 7f9855feabed284336e8872eebfb18fe3bd320db. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
2026-01-02 12:41:26 +00:00
Frane Polić
d06729d0d1 fix(dashboard): form reset for across allocation (#14369)
**What**
- fix an issue where switching between `across` promotion types in the create form wouldn't set `max_quantity` to null which would cause the create request to fail

---

CLOSES https://github.com/medusajs/medusa/issues/14365


---

> [!NOTE]
> Prevents invalid `max_quantity` when switching templates to an *across* allocation in the promotion creation flow.
> 
> - In `create-promotion-form.tsx`, after applying template defaults, explicitly sets `application_method.max_quantity` to `null` if `application_method.allocation` is `"across"` to avoid resetting it to `1`
> - Adds a changeset entry for `@medusajs/dashboard` patch release
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5b08c77fee741ec5de399b4f1f9e245ba69b5bee. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>


Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2026-01-02 10:46:50 +00:00
Nicolas Gorga
242f1d7d7f feat(dashboard,draft-order): Remove hardcoded strings and replace with translations in draft orders list page (#14400)
## Summary

**What** — What changes are introduced in this PR?

Add translations management to draft orders list page.

**Why** — Why are these changes relevant or necessary?  

We were using hardcoded English strings.

**How** — How have these changes been implemented?

Remove hardcoded strings and replace them with dynamic translations.

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

*Please provide answer here*

---

## Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.  
This helps with documentation and ensures maintainers can quickly understand and verify the change.

```ts
// Example usage
```

---

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [ ] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [x] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.

closes #14377
2026-01-02 10:44:42 +00:00
Nicolas Gorga
bf4cc12545 feat(core-flows,utils): Shipping options workflow events emission (#14388)
* Shipping options workflow events type

* Emit shipping options workflow events

* add changeset
2026-01-02 11:28:29 +01:00
Oli Juhl
7e3ed913a6 chore: Create publishable API key as part of the defaults (#14356)
* wip

* chore: fix tests

* Create tiny-carrots-bathe.md
2026-01-02 11:27:03 +01:00
Nicolas Gorga
11de7e3e34 feat(translation,core-flows): translate remaining core entities and sync shipping option <> method translations (#14358)
* Get translated shipping options step

* Apply translations on shipping options list methods.

* Pass shipping option naem when refreshing cart shipping methods, so if locale changed, we update the name

* Update translatable fields config

* Cart shipping method update translation tests

* Shipping options translations tests

* Add changeset

* Update order shipping method translations on update

* Remove unnecessary workflow and use step instead

* Translate shipping method on order edit

* Use new update shipping methods tranlsations step

* Draft order shipping method translation sync

* Translate shipping method on order exchange

* Translate returns shipping methods

* Translate claims shipping methods

* Remove unnecessary check

* Early return

* Fix import

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2026-01-02 11:26:06 +01:00
Oli Juhl
5f807ee657 chore: Ensure isolated order deletion (#14405)
## Summary

Ensure that address deletion during order deletion is handled correctly with respect to cascading deletes. Currently, when deleting an order that does not have a shipping or billing address, we incorrectly attempt to delete all order addresses. This happens because `undefined` address IDs are not handled properly during deletion.

More specifically, when deleting an order without addresses, the following method is called with these arguments:
```ts
await deleteOrderAddresses([undefined, undefined])
```
This triggers deletion of all order addresses.

To make matters worse, because we have a cascade delete defined from order addresses to orders, the same call also deletes all associated orders.

The root cause is the following filtering logic:
```ts
const orderAddressIds = orders
      .map((order) => [order.shipping_address_id, order.billing_address_id])
      .flat(1)
```

For orders without addresses, this produces `[undefined, undefined]` as input filter, which our delete methods interpret as:
```ts
await delete({ '$or': [ { id: undefined }, { id: undefined } ] })
```

This effectively translates to “delete all addresses.”

In this PR, we make two changes to prevent this going forward:
1. Filter out undefined address IDs before attempting deletion
2. Remove the cascade delete from address to order, as this is an aggressive constraint

The latter change is open for discussion, but cascading deletes from a child entity to a parent is slightly off IMO. Let me know your thoughts.

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [x] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [ ] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.


---

> [!NOTE]
> Strengthens order deletion to avoid unintended cascades and validates behavior with tests.
> 
> - Update FK constraints in migration to `ON DELETE SET NULL` for `order.shipping_address_id` and `order.billing_address_id` (was `CASCADE`)
> - In `order-module-service.ts` `deleteOrders`, filter falsy address IDs and conditionally batch-delete `order_address`/`order_change` via `promiseAll`
> - Add integration tests `integration-tests/__tests__/delete-order.spec.ts` covering deletion of orders and associated entities, deleting orders without addresses (no cross-order impact), and address deletion setting `NULL` on the order
> - Add changeset marking `@medusajs/order` patch
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8e4ab59af407ec865f73fbf286ec93e710915c8e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
2026-01-02 10:16:29 +00:00
Pedro Guzman
001923da2b feat: add Medusa Cloud OAuth provider (#14395)
* feat: add Medusa Cloud OAuth provider

* add Cloud login button

* fetch whether cloud auth is enabled through api

* allow unregistered to get session

* handle existing users

* address PR comments

* prevent double execution

* a few more fixes

* fix callback url

* fix spelling

* refresh session

* 200 instead of 201

* only allow cloud identities to create user

* fix condition
2025-12-30 17:30:10 +01:00
Shahed Nasser
499dec6d31 docs: added callouts in search and AI assistant (#14421)
* docs: added callouts in search and AI assistant

* added more suggestions

* fix search tests

* add mock for links
2025-12-30 16:57:18 +02:00
Shahed Nasser
1ed6e6b308 docs: add examples for migrations (#14420) 2025-12-30 15:42:34 +02:00
Shahed Nasser
40db4c22d3 docs: added support for tests in www workspace (#14415)
* tests for components (WIP)

* finished adding tests to components

* added tests for providers

* add test command to doc tests

* fix imports

* exclude test files

* remove import

* add vitest as dev dependency

* fix build error

* ignore test files from eslint

* fix test from docs-ui
2025-12-30 13:19:57 +02:00
Shahed Nasser
e110c08970 docs: add how-to guide for removing country code in storefront prefix (#14419) 2025-12-30 13:01:55 +02:00
Shahed Nasser
1de4d1e700 docs: use 200 for routes response across docs (#14418) 2025-12-30 09:36:10 +02:00
Shahed Nasser
4ac7b72d10 fix(dashboard): fix customer details page crashing when their order is refunded (#14413)
1. Fix the customer details page crashing when a customer's order is fully refunded. The error was originating from the payment collections of the order not being retrieved, since they're being used to calculate the refunded total.
2. Other: fix country not showing as well due to incorrectly trying to retrieving and access the shipping address's country

Closes #14409
2025-12-29 09:38:21 +00:00
Shahed Nasser
89a0adc612 fix(types): add missing completed_at property for carts (#14412) 2025-12-29 11:08:37 +02:00
Carlos R. L. Rodrigues
d347e369ce fix(medusa,framework): HMR file watch (#14390) 2025-12-27 15:52:38 +01:00
Nicolas Gorga
caa561badf feat(dashboard): Add first and last name inputs to update order shipping and billing address forms (#14394)
* Add first_name and last_name to order edit addresses forms

* Add changeset
2025-12-27 15:49:50 +01:00
Shahed Nasser
ba3a572a89 docs: various improvements to introduction guides (#14398) 2025-12-24 15:37:37 +02:00
Shahed Nasser
10dab3a47a docs: allow stop answer generation in AI assistant (#14387) 2025-12-23 08:58:16 +02:00
Shahed Nasser
662ec7430b docs: resolve example tag in DML properties (#14383) 2025-12-22 17:52:24 +02:00
Shahed Nasser
04a6343951 docs-utils: performance improvements for the clean OAS script (#14386) 2025-12-22 17:06:55 +02:00
Shahed Nasser
dc52dfd1dd docs: small fixes and improvements to text (#14385) 2025-12-22 17:06:25 +02:00
Shahed Nasser
b221e882d4 docs-utils: add operator map to docs generator knowledge base (#14382) 2025-12-22 14:41:01 +02:00
Shahed Nasser
cb33388202 docs: add line highlight validation (#14380)
* docs: add line highlight validation

* add to all projects

* fixes

* fixes

* fix

* fixes
2025-12-22 14:10:39 +02:00
Shahed Nasser
6380c1fdf4 fix(medusa): allow passing null to cart API routes (#14381)
Allow passing `null` as the locale for cart API route, as `optional` only allow passing `undefined`.
2025-12-22 08:51:01 +00:00