Commit Graph

8001 Commits

Author SHA1 Message Date
Radek Napora
d0ca0f5ce0 fix(dashboard): repair scrollbar behavior in variant inventory form (#11710) 2025-03-18 12:40:36 +01:00
Shahed Nasser
2b2b65f5f7 docs: cache revalidation in next.js storefront + storefront totals (#11887)
* initial changes

* generated sidebar
2025-03-18 12:20:09 +02:00
Harminder Virk
ff3885500c fix: hooks auto-generated types to have precise input options (#11886) 2025-03-18 15:41:01 +05:30
Shahed Nasser
3f2bdb59cb docs: improved data model docs (#11884)
* docs: improved data model docs

* fix build errors
2025-03-18 11:45:21 +02:00
Harminder Virk
aa6d5aa3cf fix: register locking provider with its unique id (#11874) 2025-03-18 15:04:47 +05:30
Frane Polić
63330668ed fix(dashboard): location injection zones (#11845)
FIXES SUP-1159
2025-03-18 08:33:07 +00:00
Shahed Nasser
cb68a9e67b docs: added how-to guides for architectural modules (#11883)
* added initial how-tos

* finished changes

* generated sidebars
2025-03-18 09:49:19 +02:00
Shahed Nasser
0099c1e2e9 chore: added / improved tsdocs to cache, event, file, and notification modules (#11879)
* chore: added / improved tsdocs to cache, event, file, and notification modules

* small fixes
2025-03-18 09:07:32 +02:00
Shahed Nasser
bc3d04dac9 docs: read-only links + other changes (#11878)
* docs: read-only links + other changes

* re-generate

* fix vale errors
2025-03-18 08:31:09 +02:00
Riqwan Thamir
c3440e5e38 feat(medusa,types): add enabled plugins route (#11876) 2025-03-17 20:11:46 +01:00
Riqwan Thamir
9dd62d93bd feat(core-flows,types,utils): make payment optional when cart balance is 0 (#11872)
what:

- make payment optional when cart balance is 0
2025-03-17 19:03:22 +00:00
Riqwan Thamir
5ab15a2988 feat(dashboard,js-sdk,admin-shared): add customer addresses + layout change (#11871)
what:

- changes customer layout from 1 layout to 2
- adds ability to create and delete customer addresses
- adds 2 customer widget locations
- adds is_giftcard=false by default to products list

<img width="1663" alt="Screenshot 2025-03-08 at 21 34 02" src="https://github.com/user-attachments/assets/e66f05da-718c-4c25-81ce-67ba0a814ca3" />
2025-03-17 16:16:27 +00:00
Kasper Fabricius Kristensen
cc4c5c86e2 chore(ui-preset,icons,dashboard) (#11734)
* update icons

* update ui-preset

* chore(ui-preset,icons): Sync with Figma 5/3/2025

* chore(ui-preset,icons): Sync with Figma
2025-03-17 16:51:57 +01:00
Shahed Nasser
1db48a4490 docs: update and improve marketplace recipe (#11870)
* docs: update and improve marketplace recipe

* fix vale error

* small fixes
2025-03-17 17:23:05 +02:00
Riqwan Thamir
cb6249320e fix(types,order,medusa): Create credit lines + hooks (#11569)
what:

- api/workflows to create credit lines
- hooks to enable extending credit lines
2025-03-17 15:20:59 +00:00
Carlos R. L. Rodrigues
0625f76cd4 chore(workflow-engine): export cancel method (#11844)
What:
  * Workflow engine exports the method `cancel` to revert a workflow.
2025-03-17 12:59:09 +00:00
Frane Polić
3db146c56e fix(dashboard): display inventory item sku (#11856)
CLOSES SUP-1171
2025-03-17 11:48:44 +00:00
Shahed Nasser
857a26ff17 docs: improve links to other modules docs (#11868) 2025-03-17 12:17:39 +02:00
Harminder Virk
cae47d9e49 feat: add check for uniqueness when creating links with isList=false (#11767) 2025-03-17 13:23:18 +05:30
AmbroziuBaban
879c623705 Update page.mdx (#11859)
Updated the starter_url description.
2025-03-17 06:46:07 +00:00
Adrien de Peretti
c73504e0ed fix(workflow-engine-inmemory): Fail trap for integration tests (#11839)
**What**
Jest is patching the event emitter meaning that sometimes it can lead to flacky behaviors and block the test execution if the done callback is never reached. To prevent that from happening, the fail trap will call the done callback after a given time and warn that the test could not be concluded because of jest blocking it
2025-03-15 12:42:38 +00:00
OttavioCas
5e892e2f05 add no_notification to shipment created event (#11836) 2025-03-14 13:05:14 -03:00
Nicklas Gellner
d24090e0bd Update page.mdx (#11841)
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2025-03-14 06:56:34 +00:00
Riqwan Thamir
67b308c8eb fix(promotion): percentage value is accounted for in buyget promotions (#11799)
what:

- allows percentage value to be considered for buy get percentage

FIXES https://github.com/medusajs/medusa/issues/11259
2025-03-13 17:09:46 +00:00
Kasper Fabricius Kristensen
3063d6e601 fix(dashboard): Include thumbnail in default product query (#11825)
RESOLVES CMRC-984
2025-03-13 16:26:39 +00:00
Adrien de Peretti
fc652ea51e fix(workflow-engine-*): scheduled jobs interval (#11800)
**What**
Currently only cron pattern are supported by scheduled jobs, this can lead to issue. for example you set the pattern to execute every hours at minute 0 and second 0 (as it is expected to execute at exactly this constraint) but due to the moment it gets executed we our out of the second 0 then the job wont get executed until the next scheduled cron table execution.

With this pr we introduce the `interval` configuration which allows you the specify a delay between execution in ms (e.g every minute -> 60 * 1000 ms) which ensure that once a job is executed another one is scheduled for a minute later.

**Usage**
```ts
// jobs/job-1.ts
const thirtySeconds = 30 * 1000

export const config = {
  name: "job-1",
  schedule: {
    interval: thirtySeconds
  },
}
```
2025-03-13 15:05:13 +00:00
Saryazdi-Saman
e05491c24f fix: preserve payment sessions during certain Stripe errors for webhook reconciliation (#11798)
* fix: preserve payment sessions during certain Stripe errors for webhook reconciliation

fix: add retry mechanism for errors that might be fixed after retry

fix: authorizePaymentSession method will update payment_session.status regardless regardless of wether or not the authorization is successful

* Refactor: improve handling structure and syntax

-Move HandledErrorType definition to the top of stripe-base

- Use timers/promises for setTimeout

- Removed data in HandledErrorType when retry is true

* refactor: improve error handling flow and logic

- Simplify return statement in initiatePayment to handle null cases

- Remove redundant if-check in handleStripeError and rely on switch

- Reorder conditional checks in executeWithRetry for clearer flow

- Update executeWithRetry to check for retry=false condition first

* clean up

* fix: improve payment error handling and traceability

- Return structured error state for StripeAPIError instead of null

- Throw error when retries are exhausted and no payment intent exists

- Update type definitions to support error state tracking

* fix formatting and naming
2025-03-13 14:46:31 +01:00
Shahed Nasser
28b0d08591 docs: add documentation for Locking Module (#11824)
* add locking docs

* fix main navbar

* added implementation example links

* generate refs

* update architecture

* fix vale error
2025-03-13 12:20:24 +02:00
Carlos R. L. Rodrigues
5cf0bf4d93 chore: admin product list transform filter (#11821) 2025-03-12 13:21:09 -03:00
Stevche Radevski
e0109540fa feat: Change customer to account_holder to be one-to-many (#11803) 2025-03-12 16:05:38 +01:00
Carlos R. L. Rodrigues
6053ec3976 chore(workflow-engine-redis): remove repeatable jobs from old queue (#11822)
What:
  * Old  deployments have repeatable jobs registered in a wrong queue. When the `server` instance picks that job, the workflow doesn't exist, it calls to remove the job, which then removes the job from the new queue.
  * This PR cleans up any repeatable job from the queue that is exclusive to handle workflows.
2025-03-12 14:54:10 +00:00
Shahed Nasser
76a0d8e1d8 chore(types): small fixes to locking TSDocs (#11823)
* chore(types): small fixes to locking TSDocs

* add missing return
2025-03-12 16:31:07 +02:00
Adrien de Peretti
72d2cf9207 fix(workflow-engines): race condition when retry interval is used (#11771) 2025-03-12 09:53:34 -03:00
Radek Napora
c97eaa0e0d Polish translations improvements (#11808)
* Polish translations improvements

* Improve Polish pluralization rules

---------

Co-authored-by: Stevche Radevski <sradevski@live.com>
2025-03-12 11:58:48 +01:00
Shahed Nasser
bed8918c31 chore(types): add tsdocs for locking module and provider (#11818) 2025-03-12 10:45:29 +02:00
Harminder Virk
375c4a5ab1 refactor: use module name as the snapshot name (#11802)
Fixes: FRMW-2930

This PR updates the MikroORM config to use the module name as the snapshot name when generating migration files. Otherwise, MikroORM defaults to the database name and every time you update the database name, it will create a new snapshot. 

Also, we migrate existing snapshot files to be same the new file name to avoid breaking changes.
2025-03-12 07:02:19 +00:00
Shahed Nasser
267af9f3f6 docs: add worker mode documentation + improvements (#11812) 2025-03-11 19:12:32 +02:00
Shahed Nasser
ef66ff8f99 docs: improvement to sidebar (#11810)
* docs: improvement to sidebar

* fix sidebar
2025-03-11 16:48:01 +02:00
Shahed Nasser
e0277e375e docs: add missing details related to links and migrations (#11809)
* docs: add missing details related to links and migrations

* reorder content

* small changes

* last changes

* improve examples

* fix lint error
2025-03-11 16:22:52 +02:00
Shahed Nasser
de213a8aa9 docs: fix restaurant-delivery recipe after latest update (#11806) 2025-03-11 15:05:54 +02:00
Shahed Nasser
06c05e54c5 Merge pull request #11793 from medusajs/docs/change-arch
docs: update sidebars and navigation bar
2025-03-11 14:00:13 +02:00
Kasper Fabricius Kristensen
ec56a8bc85 fix(medusa,utils,test-utils,types,framework,dashboard,admin-vite-plugin,admin-bundler): Fix broken plugin dependencies in development server (#11720)
**What**
- Reworks how admin extensions are loaded from plugins.
- Reworks how extensions are managed internally in the dashboard project.

**Why**
- Previously we loaded extensions from plugins the same way we do for extension found in a users application. This being scanning the source code for possible extensions in `.medusa/server/src/admin`, and including any extensions that were discovered in the final virtual modules.
- This was causing issues with how Vite optimizes dependencies, and would lead to CJS/ESM issues. Not sure of the exact cause of this, but the issue was pinpointed to Vite not being able to register correctly which dependencies to optimize when they were loaded through the virtual module from a plugin in `node_modules`.

**What changed**
- To circumvent the above issue we have changed to a different strategy for loading extensions from plugins. The changes are the following:
  - We now build plugins slightly different, if a plugin has admin extensions we now build those to `.medusa/server/src/admin/index.mjs` and `.medusa/server/src/admin/index.js` for a ESM and CJS build.
  - When determining how to load extensions from a source we follow these rules:
    - If the source has a `medusa-plugin-options.json` or is the root application we determine that it is a `local` extension source, and load extensions as previously through a virtual module.
    - If it has neither of the above, but has a `./admin` export in its package.json then we determine that it is a `package` extension, and we update the entry point for the dashboard to import the package and pass its extensions a long to the dashboard manager.

**Changes required by plugin authors**
- The change has no breaking changes, but requires plugin authors to update the `package.json` of their plugins to also include a `./admin` export. It should look like this:

```json
{
  "name": "@medusajs/plugin",
  "version": "0.0.1",
  "description": "A starter for Medusa plugins.",
  "author": "Medusa (https://medusajs.com)",
  "license": "MIT",
  "files": [
    ".medusa/server"
  ],
  "exports": {
    "./package.json": "./package.json",
    "./workflows": "./.medusa/server/src/workflows/index.js",
    "./.medusa/server/src/modules/*": "./.medusa/server/src/modules/*/index.js",
    "./modules/*": "./.medusa/server/src/modules/*/index.js",
    "./providers/*": "./.medusa/server/src/providers/*/index.js",
    "./*": "./.medusa/server/src/*.js",
    "./admin": {
      "import": "./.medusa/server/src/admin/index.mjs",
      "require": "./.medusa/server/src/admin/index.js",
      "default": "./.medusa/server/src/admin/index.js"
    }
  },
}
```
2025-03-11 11:28:33 +00:00
Shahed Nasser
6d5604f1d7 open UI sidebar items 2025-03-11 12:56:32 +02:00
Shahed Nasser
95307f9a1d remove broken link 2025-03-11 12:26:27 +02:00
Shahed Nasser
3dd8061ae6 fix incorrect dropdown link 2025-03-11 12:25:22 +02:00
Shahed Nasser
a26f48fde2 finalize changes 2025-03-11 12:18:40 +02:00
Shahed Nasser
8d23c97af9 Merge branch 'develop' into docs/change-arch 2025-03-11 11:57:45 +02:00
Shahed Nasser
c1057410d9 Merge pull request #11741 from medusajs/docs/quote-management-guide
feat: add Quote Management guide
2025-03-11 11:21:47 +02:00
Shahed Nasser
39ca808ae4 Merge branch 'develop' into docs/quote-management-guide 2025-03-11 11:00:22 +02:00
Shahed Nasser
6998c0c32d change meta image 2025-03-11 11:00:06 +02:00