Commit Graph
7802 Commits
Author SHA1 Message Date
Oli JuhlandGitHub dbd06fd41d fix(utils): Handle 0 correctly in build query (#11525)
**What**

Remove truthy/falsy check for `take` and `skip`

**Why**

To ensure `{ take: 0, skip: 0 }` is not converted to `{ take: undefined, skip: undefined }`
2025-02-19 19:04:48 +00:00
Adrien de PerettiandGitHub 0a95c6f6df chore(cli): Prevent swallowing error in non production env (#11534) 2025-02-19 20:02:47 +01:00
Adrien de PerettiandGitHub 0307304dc6 fix(dashboard): Prevent overfetching data (#11532)
**What**
Currently, the dashboard is fetching way more data than needed to display the products. This can lead to issues for complex catalog. this pr aim to reduce the data to be fetched to exactly what is needed.
<img width="2553" alt="Screenshot 2025-02-19 at 15 08 16" src="https://github.com/user-attachments/assets/b00e856c-e040-4f05-9f15-41fb8d299387" />
2025-02-19 14:26:22 +00:00
Shahed NasserandGitHub 508b948b9d docs: update users user guide (#11531) 2025-02-19 14:46:17 +02:00
Adrien de PerettiandGitHub 77f37c5f97 Chore(index): Sync logs management (#11522)
**What**
- Add index engine sync log information
- Ad `setTimeout(0)` to give breath to the event loop and ensuring not blocking the event loop and allow for other tasks queue execution to happen while syncing

here is an example:
**LOG_LEVEL=info**

![Screenshot 2025-02-19 at 10 09 25](https://github.com/user-attachments/assets/fc74dc32-1bc1-4123-9de3-f37817b7e783)

**LOG_LEVEL=debug**

![Screenshot 2025-02-19 at 10 10 35](https://github.com/user-attachments/assets/222a1ce1-9267-4cb0-9518-dc4c7aa2b6f4)
2025-02-19 11:54:38 +00:00
Shahed NasserandGitHub 647077057c docs: update store user guide (#11530) 2025-02-19 13:41:27 +02:00
Shahed NasserandGitHub 4faf40e916 docs: update price lists user guides (#11528) 2025-02-19 12:57:47 +02:00
Shahed NasserandGitHub 2940b0fee2 docs: update promotions user guide (#11524)
* update promotion pages

* finish update

* fix build error
2025-02-19 12:12:03 +02:00
Shahed NasserandGitHub 0da188a4ff docs: add missing details in product import user guide (#11527) 2025-02-19 12:11:43 +02:00
Stevche RadevskiandGitHub 3281613e22 fix: typings for list payment method were incorrect (#11523) 2025-02-19 09:15:42 +00:00
Frane PolićandGitHub 0c530e90c5 feat(core-flows, types): add has missing inventory flag when listing shipping options (#11493)
**What**
- add `insufficient_inventory` flag when listing shipping options for a cart
- add `enabled_in_store` flag when creating/editing pickup options
2025-02-19 08:08:25 +00:00
Harminder VirkandGitHub 0e6ffad30f fix: allow setting DB_PORT and DATABASE_URL env variables (#11519)
Fixes: FRMW-2896

Closes: https://github.com/medusajs/medusa/issues/11502
2025-02-19 08:07:15 +00:00
Riqwan ThamirandGitHub 30171f3dc4 fix(core-flows): add no_notification to fulfillment created event (#11507)
what:

- passes no notification toggle to events - fulfillment created and canceled

fixes https://github.com/medusajs/medusa/issues/11505
2025-02-19 08:05:52 +00:00
Shahed NasserandGitHub b60e1c855e fix(framework): add missing storefrontUrl from configuration type (#11511)
The `storefrontUrl` is defined in the `packages/core/types/src/common/config-module.ts` file, but for many purposes, including the documentation, we use the types defined in `packages/core/framework/src/config/types.ts`. This PR adds the `storefrontUrl` to the framework type
2025-02-18 17:29:59 +00:00
Shahed NasserandGitHub 062805d533 docs: add sections on predefined environment and global variables (#11510) 2025-02-18 19:12:38 +02:00
Shahed NasserandGitHub 7f7316c127 docs: update customers user guide (#11512) 2025-02-18 18:54:59 +02:00
Shahed NasserandGitHub 25a7826f0c docs: update inventory user guide (#11509)
* docs: update inventory user guide

* fix build error

* fix build
2025-02-18 17:30:01 +02:00
Shahed NasserandGitHub 084f76b73f docs: update products user guide (#11506)
* docs: update products user guide

* fix broken link
2025-02-18 15:55:42 +02:00
448dbcb596 feat(medusa): Rollout index engine behind feature flag (#11431)
**What**
- Add index engine feature flag
- apply it to the `store/products` end point as well as `admin/products`
- Query builder various fixes
- search capabilities on full data of every entities. The `q` search will be applied to all involved joined table for selection/where clauses

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-02-18 13:49:57 +00:00
Kasper Fabricius KristensenandGitHub 3b69f5a105 fix(dashboard): Properly delete metadata keys, and fix number parsing (#11466)
**What**
- Fixes an issue where we would parse a string like `"52 tests"` into `52` in the Metadata form
- If a row is deleted we now send off key with an empty string as its value to signify that it should be deleted. This is needed to introduce the API we had for updating metadata in V1. Adrien is implementing the BE support for this.

RESOLVES SUP-895
2025-02-18 10:28:24 +00:00
Kasper Fabricius KristensenandGitHub 06cc658246 fix(dashboard): Allow using the Enter key in product create Textarea (#11488)
Resolves SUP-911
2025-02-18 10:21:26 +00:00
Stevche RadevskiandGitHub 99a6ecc12d feat: Add support to update account holder (#11499) 2025-02-18 11:04:25 +01:00
Ranjith kumarandGitHub 32ad13813b feat(js-sdk): implement custom storage config to support react native (#11467)
* feat(js-sdk): implement custom storage config to support react native

* chore: add changeset

* feat(js-sdk): implement custom storage config to support react native

* chore: add changeset

* test:  add unit tests for custom storage
2025-02-18 08:38:23 +01:00
Frane PolićandGitHub ee848bf0f4 feat(core-flows, dashboard, medusa, types): optional shipping profile (#11434)
* feat: create product flow changes

* feat: allow unsetting SP on product update

* feat: update prepare line item helper

* test: add testcase

* wip: fix tests

* fix: update module tests

* fix: cart module test
2025-02-17 19:08:59 +01:00
Adrien de PerettiandGitHub 3b7856e8f5 feat(framework): Improve production structured logging with more valuable information as well (#11489)
* feat(framework): Improve production structured logging with more valuable information as well

* feat(framework): Improve production structured logging with more valuable information as well

* feat(framework): Improve production structured logging with more valuable information as well

* feat(framework): Improve production structured logging with more valuable information as well

* fix typo

* update trust proxy

* Create new-ligers-heal.md

* revert trust proxy
2025-02-17 18:16:33 +01:00
Stevche RadevskiandGitHub 91d3332f9e feat: Add support for idempotency key in payments (#11494) 2025-02-17 18:08:19 +01:00
Shahed NasserandGitHub 0cbe71597e docs: update orders user guide (#11498) 2025-02-17 18:16:23 +02:00
Harminder VirkandGitHub 32c5015f56 fix: generate posix paths for migrations (#11468)
Fixes: FRMW-2913

Related Github issue - https://github.com/medusajs/medusa/issues/11330
2025-02-17 09:57:00 +00:00
Kasper Fabricius KristensenandGitHub b53ea77658 feat(ui,dashboard): Move InlineTip to UI package (#11462) 2025-02-17 09:16:29 +00:00
Adrien de PerettiandGitHub 63f0774569 feat(): Backport metadata management (#11469)
FIXES FRMW-2915

**What**
Backport metadata management. all the metadata get preserved unless a specific empty string is provided for the key which in turn would remove that key from the metadata
2025-02-17 09:14:53 +00:00
Harminder VirkandGitHub a5ff1b92ce refactor: remove host from the server ready log (#11485) 2025-02-17 14:07:44 +05:30
Shahed NasserandGitHub 16b89f60e0 docs: add array filter with comma in requests (#11478) 2025-02-14 18:35:03 +02:00
Kasper Fabricius KristensenandGitHub 03b8bda1ba fix(dashboard): Fix size of buttons and use Link to navigate (#11366)
**What**
- Fixes the wrong `size` being used for the allocate items button.
- Updates the buttons that link to somewhere to use a Link and asChild instead of an onClick.
2025-02-14 15:19:31 +00:00
Shahed NasserandGitHub 483f7b556c docs: update tips in user guide (#11477)
* updated bulk editor tips

* docs: update tips in user guide
2025-02-14 17:02:49 +02:00
Shahed NasserandGitHub 10081118a5 docs: update user guide introduction page (#11474)
* docs: update user guide introduction page

* chore: run yarn prep automatically
2025-02-14 16:15:28 +02:00
Frane PolićandGitHub 5dc8a403ef feat(dashboard): Pickup option changes (#11306)
**What**
- update the create and edit shipping option flows to support pickup (shipping) option
- modify "mark as delivered" for pickup case

---

CLOSES CMRC-906 CMRC-907
2025-02-14 14:14:58 +00:00
Shahed NasserandGitHub 271337eb23 fix(types): fix shipping profile type optional in create type / method (#11453)
* fix(types): fix shipping profile type optional in create type / method

* example fix
2025-02-14 15:11:25 +01:00
Kasper Fabricius KristensenandGitHub b37010857a fix(core-flows): Fix line item ids passed to deleteReservationsByLineItemsStep (#11465) 2025-02-14 15:10:52 +01:00
Kasper Fabricius KristensenandGitHub 825b8ad260 fix(medusa): Allow filtering by handle and title as arrays (#11472)
**What**
- Allows filtering products in the Store API with an array value for both `handle` and `title`.

RESOLVES SUP-893
2025-02-14 14:10:32 +00:00
Shahed NasserGitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
9f39cd19f8 docs: document configuring request body parsing (#11463)
* docs: document configuring request body parsing

* chore: run yarn prep automatically

* chore: run yarn prep automatically

* chore: run yarn prep automatically

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-14 15:58:34 +02:00
Adrien de PerettiandGitHub ceb99d073a fix(medusa): Re throw error in instrumentation after reporting it (#11464)
FIXES FRMW-2914

**What**
Currently, when the instrumentation is enabled, some instrument catches the errors in order to set the span status and info, unfortunately, these errors are not re throw leading to swallow them and return nothing in the end leading to potential breaks in flows
2025-02-14 12:50:52 +00:00
Shahed NasserandGitHub e769c5afe3 chore: remove action to generate prep files for docs (#11475) 2025-02-14 14:47:44 +02:00
Shahed NasserandGitHub 6b7c447b29 chore: fix the generate action by passing the token (#11473) 2025-02-14 14:07:25 +02:00
Harminder VirkandGitHub bc02fde236 feat: allow all NodeSDK options via registerOtel (#11460) 2025-02-14 15:37:32 +05:30
Saransh SharmaandGitHub cbfbae42f2 Update page.mdx (#11459)
Run does not make sense unless its a script provided
2025-02-14 09:56:40 +02:00
Shahed NasserandGitHub d52b5e2d1f chore: add an action that generates documentation files in PRs (#11423)
* chore: add an action that generates documentation files in PRs

* fix
2025-02-14 09:16:36 +02:00
Harminder VirkandGitHub d1cbe4c61e fix: relationships to accept ids (#11399) 2025-02-14 05:41:36 +00:00
Kasper Fabricius KristensenandGitHub a88f6576bd feat(dashboard,admin-vite-plugin): Add support for outlet routes, loader, and handle (#11305)
**What**
- Add support for defining outlet routes using `@`, e.g. `/src/admin/routes/brands/@create/page.tsx`
- Add support for exporting a `loader` from a route file.
- Add support for exporting a `handle` from a route file.

Example usage of a loader and handle:

```tsx
// src/admin/routes/articles/[id]/page.tsx
import { Button, Container, Heading } from "@medusajs/ui";
import {
  Link,
  LoaderFunctionArgs,
  Outlet,
  UIMatch,
  useLoaderData,
} from "react-router-dom";

export async function loader({ params }: LoaderFunctionArgs) {
  const { id } = params;

  return {
    id,
  };
}

export const handle = {
  breadcrumb: (match: UIMatch<{ id: string }>) => {
    const { id } = match.params;
    return `#${id}`;
  },
};

const ProfilePage = () => {
  const { id } = useLoaderData() as Awaited<ReturnType<typeof loader>>;

  return (
    <div>
      <Container className="flex justify-between items-center">
        <Heading>Article {id}</Heading>
        <Button size="small" variant="secondary" asChild>
          <Link to="edit">Edit</Link>
        </Button>
      </Container>
      {/* This will be used for the next example of an Outlet route */}
      <Outlet />
    </div>
  );
};

export default ProfilePage;
```

In the above example we are passing data to the route from a loader, and defining a breadcrumb using the handle.

Example of a outlet route:

```tsx
// src/admin/routes/articles/[id]/@edit/page.tsx
import { Button, Container, Heading } from "@medusajs/ui";

const ProfileEditPage = () => {
  return (
    <div>
      {/* Form goes here */}
    </div>
  );
};

export default ProfileEditPage;
```
This outlet route will be rendered in the <Outlet /> in the above example when the URL is /articles/1/edit

Resolves CMRC-913, CMRC-914, CMRC-915
2025-02-13 20:37:55 +00:00
Shahed NasserandGitHub c08e6ad5cf docs: add how to upload files in tests (#11455) 2025-02-13 19:19:52 +02:00
Shahed NasserandGitHub 1077993aaa chore: improvements to provider docs (#11451) 2025-02-13 18:11:39 +02:00