Commit Graph

5888 Commits

Author SHA1 Message Date
Leonardo Benini
3852efbcff feat(admin-*,dashboard): i18n labels for menu item extensions (#13843)
* i18n menu item labels

* changeset

* changeset
2025-11-06 07:42:32 -05:00
ZeB4la
67744f4579 feat(dashboard): add pt-PT translation and register locale (#13935)
## Summary

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

*Adds a new pt-PT translation file for the Medusa Admin Dashboard and registers the Portuguese (Portugal) locale in the i18n configuration.*

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

*To provide full localization support for users in Portugal. The Admin currently includes a pt-BR translation, and this PR adds proper European Portuguese equivalents with consistent terminology and grammar.*

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

*Created a new file ptPT.json following the same structure as en.json and ptBR.json.*

*Registered the "pt-PT" locale in the i18n resources and language selector.*

*Verified placeholder consistency ({{ }}, <0></0>, etc.) and kept all keys identical to the English source.*

**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:

- [ ] 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
- [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.


---

> [!NOTE]
> Adds European Portuguese (`ptPT`) translations and registers the locale in i18n resources and the language selector.
> 
> - **i18n**:
>   - Add `ptPT` translation file `packages/admin/dashboard/src/i18n/translations/ptPT.json`.
>   - Register `ptPT` in `packages/admin/dashboard/src/i18n/translations/index.ts` resources.
>   - Register `ptPT` in `packages/admin/dashboard/src/i18n/languages.ts` with `date-fns` locale and display name "Português (Portugal)".
> - **Changeset**:
>   - Add patch changeset for `@medusajs/dashboard`.
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4cf30255609fa33d0c0362858c35e094b97d68e1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>


Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
2025-11-05 16:52:54 +00:00
Leonardo Benini
1762f73bd9 optional splat routes (#13547)
Co-authored-by: SteelRazor47 <36779933+SteelRazor47@users.noreply.github.com>
2025-11-05 11:17:09 -05:00
github-actions[bot]
645266c200 chore: Version Packages (#13923)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 12:52:44 +01:00
Carlos R. L. Rodrigues
5c6c28545c chore(modules-sdk): db migration concurrency as envvar (#13965)
## Summary

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

*Please provide answer here*

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

*Please provide answer here*

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

*Please provide answer here*

**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:

- [ ] 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**
- [ ] 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.
2025-11-05 11:08:02 +00:00
Adrien de Peretti
9d9d0397a8 fix(): Index integration tests flackyness (#13953)
* fix(): Index integration tests flackyness

* fix

* Create twenty-eels-remain.md

* fix

* fix

* fix

* fix

* finalize

* finalize

* finalize

* finalize

* finalize

* finalize

* chore: empty commit

* finalize

* finalize

* chore: empty commit

* finalize

* finalize
2025-11-05 10:40:12 +01:00
Nicolas Gorga
c6556d1256 feat(dashboard): include missing columns import template (#13958)
* Add missing sales channel and shipping profile columns to product import template

* Add changeset
2025-11-04 17:08:30 -05:00
Nicolas Gorga
018871f8cd fix(medusa): priced products region_id regression (#13961)
* Correctly destructure query result

* Add changeset
2025-11-04 16:54:30 -05:00
Nicolas Gorga
0426568569 Remove fetchPreviousPage/fetchNextPage from dependency array of useEf… (#13949)
## Summary

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

Fix to prevent InfiniteList component from falling into an infinite loop of requests.

Before:

Uploading Grabación de pantalla 2025-11-03 a la(s) 11.34.55 p. m..mov…

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

The current dependency array of the useEffect in charge of issuing the next/previous fetch calls for pagination, include the functions from `useInfiniteQuery` in its dependency array as well as its body. This causes the component to render infinitely, as the functions reference change on every render.

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

- Updated the problematic dependency array to not include these functions.
- Included a useEffect and refs for both functions to always have the latest value.

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

Tested locally that the bug that was happening before the fix was mitigated and i was able to paginate correctly.

After fix: 


https://github.com/user-attachments/assets/17d41bf9-6b3f-437b-b2ce-10e4dcbe248a

---

## 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 SUP-2620


---

> [!NOTE]
> Prevents InfiniteList from entering an infinite fetch loop by storing pagination functions in refs and removing them from the effect dependency array.
> 
> - **Dashboard**:
>   - **`packages/admin/dashboard/src/components/common/infinite-list/infinite-list.tsx`**:
>     - Store pagination callbacks in refs: `fetchNextPageRef`, `fetchPreviousPageRef`, synced via `useEffect`.
>     - Update `IntersectionObserver` callbacks to call `ref.current()` instead of the functions directly.
>     - Remove `fetchNextPage`/`fetchPreviousPage` from the `useEffect` dependency array to stabilize observer setup.
> - **Changeset**:
>   - Patch release for `@medusajs/dashboard` describing the fix.
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit e21d9998ac01ae048fa7e72713a2027d3fc8cfb6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
2025-11-04 09:02:14 +00:00
Shahed Nasser
42b270ed2d fix(types, medusa): fixes to http types and validators (#13928)
## Summary

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

- Fix validators of delete item action for exchanges and claims to not include filter fields (their routes don't use these filters, and it doesn't make sense to have them)
- Fix query parameter type argument of the create reservation route to the correct HTTP type.
- Fix the HTTP type used for listing products and shipping options in the storefront to not include the `with_deleted` (It's also not supported by their validators)

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

*Please provide answer here*

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

*Please provide answer here*

**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:

- [ ] 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**
- [ ] 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.
2025-11-04 07:39:42 +00:00
Pedro Guzman
28c3ea68f5 chore: fix opentelemetry-resources dependency typo (#13948) 2025-11-04 08:22:41 +01:00
Adrien de Peretti
afb40d437b chore(): Cleanup and organize deps (#13940)
* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* Create lucky-poets-scream.md

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* chore(): Cleanup and organize deps

* dedupe snapshot this build

* split into 4 shard

* re configure packages integration tests

* re configure packages integration tests

* re configure packages integration tests

* re configure packages integration tests

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* update scripts

* reduce shard for packages
2025-11-03 19:06:37 +01:00
juanzgc
516e217dbb fix: Update type Providers (#13927)
**What**
Update Providers type to accept both types simultaneously
2025-11-03 08:30:00 -05:00
Pedro Guzman
e4f8e3d6cc Inject config module in tests (#13937)
* add failing test

* inject configModule in module test runner

* changeset

* fix injected configModule
2025-11-03 11:22:51 +01:00
Pedro Guzman
e66f7cf59e Quote column names in indexes (#13938)
* quote column names in indexes

* quote column names in created indexes

* fix tests
2025-11-03 10:58:40 +01:00
Adrien de Peretti
37563987b8 chore(): Fix dependencies (#13932) 2025-11-02 17:46:46 +01:00
Carlos R. L. Rodrigues
990691e78a chore(medusa): do not use transaction id on cart operations (#13931) 2025-10-31 15:09:35 -03:00
Adrien de Peretti
224ab39a81 chore(): Update dependencies usage (#13910)
* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* fix for wxios 1.6

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* push scripts

* update build concurrency

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* chore(): Update dependencies usage

* fixes

* update yarn

* fixes

* fix script

* Create heavy-suns-tickle.md

* update changeset

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-10-31 16:44:14 +01:00
Shahed Nasser
0fd9f27ca5 chore: add missing since and featureFlag tags (#13926) 2025-10-31 16:17:19 +02:00
Carlos R. L. Rodrigues
13d7d15be5 chore(modules-sdk): parallel migrations (#13898) 2025-10-31 11:05:53 -03:00
Stevche Radevski
7c72e7bae9 fix: Updates to medusa payments provider (#13914) 2025-10-31 11:45:00 +01:00
github-actions[bot]
31b9ae3d28 chore: Version Packages (#13853)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-31 10:11:18 +01:00
Adrien de Peretti
66bbe39a8e chore(): Throw on migration up/down fail (#13911)
* chore(): Throw on migration up/down fail

* Create nine-ways-teach.md
2025-10-30 16:50:13 +01:00
Carlos R. L. Rodrigues
c9701c70da fix(utils): db migration big number default value (#13913)
## Summary

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

Generate db migrations with big number default values

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



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



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



---

## 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
- [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.
2025-10-30 15:37:17 +00:00
Frane Polić
d5fc46b222 feat(dashboard): variant images list thumbnail + refactor form state management (#13905)
## Summary

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

- show thumbnail on the product variant list
- refactor variant image editor state management
- await revalidation before rendering form

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

Manual testing

---

## 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
- [ ] I have linked the related issue(s) if applicable
2025-10-30 14:21:27 +00:00
Sebastian Rindom
6d6856552a fix: allow controlling hmr bind host (#13692)
trick to make it easier to control where the hmr server binds. usefuly when running medusa dev through proxies, docker containers, etc.
2025-10-30 12:16:07 +00:00
Adrien de Peretti
6d7ba778f5 chore(): Generate migrations with correct mikro orm import path (#13893)
* chore(): Generate migrations with correct mikro orm import path

* Create shy-melons-jog.md
2025-10-30 09:04:36 +01:00
Adrien de Peretti
0f79f22ebc fix(pricing): price list prices perf issues (#13899)
* update package

* fix(pricing): update price list prices perf issues

* Create lemon-clocks-sing.md

* fix(pricing): update price list prices perf issues

* fix(pricing): update price list prices perf issues

* update package

* update package

* improvements

* remove unnecessary comments

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-29 19:50:33 +01:00
Oli Juhl
01ee437926 chore(types,notification): Make template nullable on emails (#13889)
* chore: Make template nullable on emails

* Create curvy-lamps-float.md
2025-10-29 18:36:06 +01:00
Stevche Radevski
ef7b9b9375 feat: Implement medusa payments provider (#13772)
* feat: Implement medusa payments provider

* chore: Improvements after testing

* chore: Add typings to medusa payments

* fix: Final changes to complete medusa payment provider

* update package

* fix: Final changes to complete medusa payment provider

---------

Co-authored-by: adrien2p <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-29 15:07:33 +01:00
Oli Juhl
1defb3c29b chore: Inject sandbox handle in cloud config (#13879)
* chore: Inject sandbox handle in cloud config

* Create wet-seas-lie.md

* chore: rename medusaCloudOptions to cloud

* fix tests
2025-10-29 10:02:37 +01:00
Adrien de Peretti
85b1f3d43a feat(index): Add http/module api to interact with the index engine (#13869)
* feat(index): Add support to trigger sync manually

* feat(index): Add API route to interact with

* feat(index): Add API route to interact with

* feat(index): Add API route to interact with

* test(): Add http integration tests

* Create weak-elephants-reply.md
2025-10-28 20:31:39 +01:00
Leonardo Benini
0244f029aa feat(dashboard): type-safe i18n for UI extensions (#13851)
## Summary

**What** 

Exports the type of medusa's i18n keys from the dashboard package, for autocomplete support.

**Why** 

Currently i18next is not able to provide proper ts autocomplete support when adding translations to projects or plugins.   
For example when adding a data table or form, I have to go back multiple times to the source i18n files in the medusa repo and search for the exact key name(is it "actions.confirm" or "general.confirm"? etc) and I forget it right after every single time.

Even if all medusa components were provided already translated, it's still very convinient to use keys from medusa(if context appropriate) for some custom components, since they are already translated into many languages(eg "yes", "no" and other very basic strings). Hence why ts support for the base keys would be very helpful

**How** 

Modified the generateTypes script to also copy the `en.json` file to the dist folder, and export a `Resources` type with the inferred keys in index.d.ts.
This allows users to define their own i18next type definitions including the base "translation" namespace, example below.

**Testing** 

Manual testing

---

## Examples

```ts
// In src/admin/i18next.d.ts
import type enTranslation from "./i18n/en.json"         // custom keys
import type { Resources } from "@medusajs/dashboard"    // medusa keys
declare module "i18next" {
    interface CustomTypeOptions {
        fallbackNS: "translation"
        resources: {
            translation: Resources["translation"]                     
            // all custom namespaces need to merge Resources["translation"] as well
            // otherwise when falling back to "translation", strings will have type "never"
            myCustomNs: typeof enTranslation & Resources["translation"]  
        }
    }
}

```

Then, both `useTranslation()` and `useTranslation("myCustomNs")` will have proper autocomplete support

---

## 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
- [x] I have linked the related issue(s) if applicable
2025-10-28 14:52:36 +00:00
Frane Polić
1594c13962 fix(dashboard): preserve old image ids when deleting a product image (#13881) 2025-10-28 15:18:36 +01:00
Radek Napora
c1c0e1490a fix(dashboard) Standardize heading levels for consistent hierarchy (#13861)
## Summary

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

This PR standardizes heading levels across dashboard components to maintain proper semantic HTML hierarchy.

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

*Please provide answer here*

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

- Added optional `headingLevel` prop `"h1" | "h2" | "h3"` to `DataTable` component with default value of `"h1"`

- Modified `Heading` component usage to explicitly specify the appropriate level based on context

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

*Please provide answer here*

---

## 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
- [ ] I have linked the related issue(s) if applicable
2025-10-28 12:11:50 +00:00
Frane Polić
0b202cc509 feat(product): build variant images when retrieving product (#13731)
**What**
-  build variant images when retrieving product

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-28 09:35:55 +00:00
Bastien
ac6754f008 feat(admin): change admin order list default sort (#13874)
*  Change admin order list default sort

* Create hot-laws-give.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-28 10:23:16 +01:00
Bastien
47b2f7f888 fix(admin): fix admin promotion list sort (#13872)
* 🐛 Fix admin promotion list sort

* Create six-squids-vanish.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-10-28 10:23:01 +01:00
Shahed Nasser
fa93f18f7d chore: fixes to http and request types for orders (1) (#13822) 2025-10-28 11:14:43 +02:00
Frane Polić
25a20ca95f feat(medusa,types): product variant store endpoints (#13730)
* wip(medusa): product variant store endpoints

* chore: refactor types

* chore: changesets

* fix: address feedback 1

* feat: load images for variants by default

* fix: use query.graph directly instead of refetchEntity

* feat: enable cache for variants endpoint
2025-10-28 10:12:07 +01:00
Shahed Nasser
4f4ab6208d chore: fixes to http and request types for sales channes, taxes, and store (#13832) 2025-10-28 10:10:14 +01:00
Shahed Nasser
a2b6ef36d9 chore: fixes to http and request types for payment and regions (#13831) 2025-10-28 10:09:51 +01:00
Shahed Nasser
64c5019b3b chore: fixes to http and request types for payments (#13830) 2025-10-28 10:09:24 +01:00
Shahed Nasser
83f2d87fa5 chore: fixes to http and request types for users (#13828) 2025-10-28 10:08:51 +01:00
Shahed Nasser
aa34d0fe9c chore: fixes to http and request types for inventory (#13827)
* chore: fixes to http and request types for inventory

* fix type error
2025-10-28 10:08:32 +01:00
Shahed Nasser
bc87c9a0ba chore: fixes to http and request types for fulfillment (#13826)
* chore: fixes to http and request types for fulfillment

* fix type error
2025-10-28 10:08:07 +01:00
Shahed Nasser
faea42316a chore: fixes to http and request types for customers (#13825) 2025-10-28 10:07:35 +01:00
Shahed Nasser
db777dc3d5 chore: fixes to http and request types for orders (3) (#13824)
* chore: fixes to http and request types for orders (3)

* add order store routes
2025-10-28 10:07:10 +01:00
Shahed Nasser
f253b325f9 chore: fixes to http and request types for orders (2) (#13823) 2025-10-28 10:06:26 +01:00
Shahed Nasser
cc1a37f2f5 chore: fixes to HTTP and request types for carts (#13821) 2025-10-28 10:04:27 +01:00