Commit Graph

9553 Commits

Author SHA1 Message Date
Adrien de Peretti
8890f28470 feat(medusa): Prevent build command from throwing on missing config (#14540)
**What**
Prevent the build command from failing on mising config
2026-01-15 09:00:15 +00:00
Shahed Nasser
250b6fdf22 chore: add claude skills for docs (#14533) 2026-01-15 10:26:37 +02:00
Shahed Nasser
41e1d5e506 fix(utils): fix import of caching and translation modules to be from @medusajs/medusa (#14519)
* fix(utils): fix import of caching and translation modules to be from @medusajs/medusa

* fix tests
2026-01-14 18:48:54 +01:00
Adrien de Peretti
1347698876 feat(): improve module typings in medusa config (#14478)
* feat(events): Allow priority configuration

* feat(events): Allow priority configuration

* wip

* wip

* wip

* fix typings

* Create cold-lamps-search.md

* implement priority config usage

* comment out #1

* fixes

* fixes
2026-01-14 18:39:57 +01:00
Nicolas Gorga
cbc9f3d059 chore(core-flows): Emit cart updated event on deleteLineItemsWorkflow (#14466)
* Emit cart updated event upon item deletion

* Add changeset
2026-01-14 18:38:37 +01:00
Shahed Nasser
73631604cc docs: document incompatibility for Next.js storefront + Node v25 (#14538) 2026-01-14 15:26:26 +02:00
Nicolas Gorga
d60ea7268a feat(translation,fulfillment,customer,product,region,tax,core-flows,medusa,types): Implement dynamic translation settings management (#14536)
* Add is_active field to translation_settings model

* Types

* Workflows

* Api layer

* Tests

* Add changeset

* Add comment

* Hook to create or deactivate translatable entities on startup

* Cleanup old code

* Configure translatable option for core entities

* Validation step and snake case correction

* Cleanup

* Tests

* Comment in PR

* Update changeset

* Mock DmlEntity.getTranslatableEntities

* Move validation to module service layer

* Remove validation from remaining workflow

* Return object directly

* Type improvements

* Remove .only from tests

* Apply snakeCase

* Fix tests

* Fix tests

* Remove unnecessary map and use set instead

* Fix tests

* Comments

* Include translatable product properties

* Avoid race condition in translations tests

* Update test
2026-01-14 07:09:49 -03:00
Shahed Nasser
42235825ee feat(medusa-cli): add codemod command + codemod for replacing zod imports (#14520)
* feat(medusa-cli): add codemod command + codemod for replacing zod imports

* fixes
2026-01-14 08:48:04 +02:00
Carlos R. L. Rodrigues
8426fca710 chore(medusa): middleware policies (#14521) 2026-01-13 16:46:53 -03:00
Nicolas Gorga
cec8b8e428 feat(core-flows,types,utils,medusa): Translate tax lines (#14359)
* Include locale field for traslations on tax line workflows

* Translate tax lines in getItemTaxLinesStep with new util

* Update tax calculation context, so that we pass locale to third party tax providers if they want to return translated tax rates

* Apply translations to tax lines on product and variant tax middlewares

* Cart management translations tests

* Update tax lines when order locale gets updated

* Add changeset

* Get tranlsated tax lines step

* Fix wording

* Mutate ref directly

* Update order tax lines translations upon order locale change

* Claims translations tests

* Update tax lines upon draft order locale update

* Exchange tests for tax lines translations

* Order edits test for tax line translation

* Add tests for shipping methods tax line translations on various order flows

* Returns shipping method translations tests

* Execute update in parallel

* Use TranslationFeatureFlag.key

* Fix feature flag import

* Add @medusajs/medusa dependency for feature flag usage

* Revert "Add @medusajs/medusa dependency for feature flag usage"

This reverts commit e8897aed0a88f83c1034ac73e817e4222250a2c9.

* Use feature flag string directly

* Fix test

* Parallelize tax line translations application
2026-01-13 15:12:42 -03:00
Nicolas Gorga
28fae96cee fix(core-flows): Avoid throwing if no prices found for variant when adding to cart custom price item (#14528)
* Avoid throwing prices not found error when line item is custom unit price

* Add changeset

* Avoid throwing upo variant price validation for custom priced item variants
2026-01-13 14:58:41 -03:00
420coupe
d4173478f4 docs: digital product media content binary -> base64 as of v2.11.0 (#14497) 2026-01-13 18:53:42 +02:00
Shahed Nasser
00fc32bc37 docs: paypal integration tutorial (#14253) 2026-01-13 15:39:49 +02:00
Omar Fetooh
803ebb4ac7 Fix small typo in file name import (#14529)
## Summary

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

Fix small typo in file import in the Meta product feed tutorial

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

The typo in the import path causes confusion when following the Meta product feed tutorial and can lead to runtime or build errors for developers implementing the feature.
Fixing it ensures the documentation matches the actual file structure and improves the developer experience.

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

The incorrect import path in the tutorial was corrected to reference the proper file name.
No logic or behavior was changed—only the documentation example was updated.

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

This change affects documentation only.

---

## Examples

Not applicable. This PR only corrects a typo in the documentation.


## 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**
- [x] I have verified the code works as intended locally
- [x] I have linked the related issue(s) if applicable

---

## Additional Context
Resolves #14522



---

> [!NOTE]
> Updates the product feed tutorial to correct a typo in an import path.
> 
> - In `src/workflows/generate-product-feed.ts` snippet within `page.mdx`, change `./steps/build-product-field-xml` to `./steps/build-product-feed-xml`. Documentation-only; no runtime code modified.
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 560f3a356f696be1d05fca9931593daff3217059. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
2026-01-13 10:45:14 +00:00
Adrien de Peretti
55d2a70470 feat(config): Default event worker concurrency to 3 on cloud (#14477)
* feat(config): Default event worker concurrency to 3 on cloud

* Create dirty-pears-smell.md

* fix test
2026-01-13 09:26:02 +01:00
Adrien de Peretti
7307a5e63f feat(events): Implement default priority-based event processing (#14476)
* feat(events): Set internal events default priority to lowest, default events to 100 and order placed to 10

* Create swift-months-rush.md

* improvements

* improvements

* improvements

* fix condition

* doc

* fix tests

* fix tests

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2026-01-12 16:05:42 +01:00
Shahed Nasser
43951ce60e docs: add npx2yarn component (#14512)
* initial

* initial

* update tests

* remove unused import

* allow passing with no tests

* vale fixes
2026-01-12 13:42:30 +02:00
Shahed Nasser
5f90cd0650 feat(create-medusa-app): add support for pnpm and specifying package manager (#14443)
* feat(create-medusa-app): add support for pnpm and specifying package manager

* fixes

* add medusa command method

* add tests for package manager

* fix duplicate messages

* throw if chosen package manager is not available

* better package manager and version detector

* add debug message

* fix version detection

* fix for yarn v3

* fix migration command

* yarn v3 fix

* remove .yarn directory for non-yarn package managers

* run npm ci to validate npm installation

* fixes

* fixes

* remove corepack line

* remove if condition
2026-01-12 12:55:26 +02:00
Frane Polić
747d1393ae fix: refactor graph query argument in a test (#14513) 2026-01-12 09:14:53 +01:00
erbold-bu
514cc329f8 feat: added mn-MN to the default list of locales (#14487)
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
2026-01-12 09:14:17 +01:00
Lukas Krisikaitis
e91ce2ee4b feat(locales): add lt-LT to the default list of locales (#14518) 2026-01-12 09:07:00 +01:00
Nicolas Gorga
6cbbd033e4 chore(order): Add missing OrderItem GraphQL schema fields (#14459)
* Add missing grapqhl schema fields to order item

* Add changeset
2026-01-10 13:22:24 -03:00
Shahed Nasser
1ca3516a5c feat(deps,framework): add zod as framework dependency (#14441)
## Summary

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

Export Zod as a dependency of `@medusajs/framework`.

Closes DX-2414

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

Zod is an essential part of Medusa development. We use it in the core and developers use it in their customizations.

Developers using pnpm won't have access to Zod, as it's not a top-level dependency. While they can install any version, since Zod is an essential aspect of our framework, it's more convenient that we export it and make it accessible to developers.

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

1. Add Zod as a dependency in `@medusajs/deps` and export it in `@medusajs/framework`
2. Change imports of Zod across projects to import from `@medusajs/framework` and remove the Zod dependency.

> Note: this change doesn't cover admin extensions (and our related packages), as they're not related to the Medusa framework and using Zod in them isn't part of the conventions we document.

Developers can import Zod like this now:

```ts
import { z } from "@medusajs/framework/zod"
```

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

Use the following import in a Medusa project to create an validate zod schemas:

```bash
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http";
import { z } from "@medusajs/framework/zod"

export const PostCustomSchema = z.object({
  name: z.string(),
})

type PostCustomSchema = z.infer<typeof PostCustomSchema>

export async function POST(
  req: MedusaRequest<PostCustomSchema>,
  res: MedusaResponse
) {
  res.json({
    message: `Hello, ${req.validatedBody.name}`
  })
}

// in middleware
import { defineMiddlewares, validateAndTransformBody } from "@medusajs/framework/http"
import { PostCustomSchema } from "./admin/custom/route"

export default defineMiddlewares({
  routes: [
    {
      matcher: "/custom",
      middlewares: [validateAndTransformBody(PostCustomSchema)],
    },
  ],
})
```

---

## Examples

-

---

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

-
2026-01-09 13:20:01 +00:00
github-actions[bot]
673627044b chore(docs): Updated UI Reference (automated) (#14507)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action


---

> [!NOTE]
> Applies patch updates to the Medusa UI stack across the monorepo.
> 
> - Bumps `@medusajs/icons` to `2.12.5`, `@medusajs/ui` to `4.0.33`, and `@medusajs/ui-preset` to `2.12.5`
> - Updates affected apps/packages: `api-reference`, `book`, `cloud`, `resources`, `ui`, `user-guide`, `docs-ui`, `tailwind`, and `types`
> - Refreshes `yarn.lock` accordingly
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 756527915a20240054463bd83b93888d5dc0f5da. 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-09 13:19:10 +00:00
Pedro Guzman
19f274523c add cloud auto-login (#14488) 2026-01-09 13:26:25 +01:00
github-actions[bot]
04b92a2f1a chore(docs): Update version in documentation (automated) (#14505)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2026-01-09 14:11:59 +02:00
olivermrbl
0d071850f1 chore: Release 2026-01-09 12:59:04 +01:00
github-actions[bot]
8fee89d622 chore: Version Packages (#14483)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-09 12:52:13 +01:00
Adrien de Peretti
233ec261be fix: Add schema only flag on Medusa app loader (#14502)
* fix(build): Introduce a schema only flag for more heavy light weight loading

* fix(build): cleanup and tests

* Create shy-snails-raise.md

* fix(build): cleanup
2026-01-09 12:21:28 +01:00
Shahed Nasser
66f8fe084c chore: add missing packages to eslint configurations (#14463) 2026-01-09 13:03:27 +02:00
Adrien de Peretti
08c55e7035 feat(DML): Add a new translatable property modifier applicable on text (#14494)
* feat(DML): Add a new translatable property modifier applicable on text

* feat(DML): Add a new translatable property modifier applicable on text

* feat(DML): Add a new translatable property modifier applicable on text

* Create gold-bobcats-decide.md

* feat(DML): Add a new translatable property modifier applicable on text

* feat(DML): Add a new translatable property modifier applicable on text

* simplification
2026-01-09 10:13:25 +01:00
Shahed Nasser
baaee11114 docs: updates for storefront in cloud (#14491)
* docs: updates for storefront in cloud

* comment-out pnpm

* fix broken link

* npm prerequisites

* Update www/apps/cloud/app/storefront/page.mdx

Co-authored-by: Stevche Radevski <sradevski@live.com>

* remove global cdn

---------

Co-authored-by: Stevche Radevski <sradevski@live.com>
2026-01-08 17:39:19 +02:00
Adrien de Peretti
bb599a26de feat(medusa-app): Link initialization should respect migrationOnly flag (#14493)
* feat(medusa-app): Link initialization should respect migrationOnly flag

* Create cyan-taxis-behave.md
2026-01-08 15:13:32 +01:00
Adrien de Peretti
568742826f feat(): Add modules options autocomplete to medusa config (#14465)
* feat(): Add modules options autocomplete to medusa config

* feat(): Add modules options autocomplete to medusa config

* Create great-lies-decide.md

* feat(): Add modules options autocomplete to medusa config
2026-01-07 21:24:35 +01:00
Carlos R. L. Rodrigues
b2245cc672 chore(rbac): user link and utils (#14320) 2026-01-07 10:40:15 -03:00
Shahed Nasser
7161cf1903 docs: auth in cloud + restructure deployment guides (#14457)
* docs: auth in cloud + restructure deployment guides

* added details about enabling cloud auth

* fix vale errors
2026-01-07 13:51:23 +02:00
Carlos R. L. Rodrigues
1bfde8dc57 feat(rbac): role-based access control module (#14310) 2026-01-07 05:36:39 -03:00
github-actions[bot]
d6d7d14a6a chore(docs): Generated References (automated) (#14471)
Generated the following references:
- `analytics`
- `analytics_provider`
- `api_key`
- `api_key_models`
- `auth`
- `auth_models`
- `cart`
- `cart_models`
- `core_flows`
- `currency`
- `currency_models`
- `customer`
- `customer_models`
- `event`
- `events`
- `file_service`
- `fulfillment`
- `fulfillment_models`
- `fulfillment_provider`
- `inventory_next`
- `inventory_next_models`
- `js_sdk`
- `medusa`
- `module_events`
- `modules`
- `modules_sdk`
- `order`
- `order_models`
- `payment`
- `payment_models`
- `pricing`
- `pricing_models`
- `product`
- `product_models`
- `promotion`
- `promotion_models`
- `region`
- `region_models`
- `sales_channel`
- `sales_channel_models`
- `stock_location_next`
- `stock_location_next_models`
- `store`
- `store_models`
- `tax`
- `tax_models`
- `tax_provider`
- `translation`
- `translation_models`
- `types`
- `user`
- `user_models`
- `utils`
- `workflows`


---

> [!NOTE]
> No changes to summarize — the provided diff was empty.
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fe58b669976b04475e6d0f16eb185976cb527d3b. 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 17:30:16 +00:00
github-actions[bot]
1af99f8d5c chore(docs): Updated API Reference (automated) (#14470)
* chore(docs): Generated API Reference (automated)

* fixes

* fix locale header

---------

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2026-01-06 19:00:02 +02:00
Shahed Nasser
76ff8dcca8 docs: fix locale option passed to query (#14472) 2026-01-06 18:59:44 +02:00
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