Skip to content

Commit

Permalink
Merge branch 'medusajs:develop' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
docloulou authored Oct 27, 2024
2 parents d579fb4 + 7c629f4 commit d449f04
Show file tree
Hide file tree
Showing 890 changed files with 158,723 additions and 147,631 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "medusajs/medusa" }],
"commit": false,
"fixed": [],
"fixed": [["@medusajs/*", "create-medusa-app", "medusa-dev-cli", "!@medusajs/ui"]],
"linked": [],
"access": "public",
"baseBranch": "develop",
Expand Down
5 changes: 0 additions & 5 deletions .changeset/early-deers-happen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/four-trees-smile.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mighty-flowers-tan.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/perfect-ravens-allow.md

This file was deleted.

28 changes: 28 additions & 0 deletions integration-tests/http/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# integration-tests-http

## 1.0.2

### Patch Changes

- Updated dependencies [[`471f7e4a10fe415064480b2a0aa5b8b23174c141`](https://github.com/medusajs/medusa/commit/471f7e4a10fe415064480b2a0aa5b8b23174c141)]:
- @medusajs/medusa@2.0.1
- @medusajs/core-flows@2.0.1
- @medusajs/modules-sdk@2.0.1
- @medusajs/utils@2.0.1
- @medusajs/test-utils@2.0.1
- @medusajs/api-key@2.0.1
- @medusajs/auth@2.0.1
- @medusajs/cache-inmemory@2.0.1
- @medusajs/customer@2.0.1
- @medusajs/event-bus-local@2.0.1
- @medusajs/fulfillment@2.0.1
- @medusajs/inventory@2.0.1
- @medusajs/pricing@2.0.1
- @medusajs/product@2.0.1
- @medusajs/promotion@2.0.1
- @medusajs/fulfillment-manual@2.0.1
- @medusajs/region@2.0.1
- @medusajs/stock-location@2.0.1
- @medusajs/store@2.0.1
- @medusajs/tax@2.0.1
- @medusajs/user@2.0.1
- @medusajs/workflow-engine-inmemory@2.0.1

## 1.0.1

### Patch Changes
Expand Down
62 changes: 62 additions & 0 deletions integration-tests/http/__tests__/customer/admin/customer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,68 @@ medusaIntegrationTestRunner({
})
})

describe("POST /admin/customers/:id/customer-groups", () => {
it("should batch add and remove customer to/from customer groups", async () => {
const group1 = (
await api.post(
"/admin/customer-groups",
{
name: "VIP 1",
},
adminHeaders
)
).data.customer_group

const group2 = (
await api.post(
"/admin/customer-groups",
{
name: "VIP 2",
},
adminHeaders
)
).data.customer_group

const group3 = (
await api.post(
"/admin/customer-groups",
{
name: "VIP 3",
},
adminHeaders
)
).data.customer_group

// Add with cg endpoint so we can test remove
await api.post(
`/admin/customer-groups/${group1.id}/customers`,
{
add: [customer1.id],
},
adminHeaders
)

const response = await api.post(
`/admin/customers/${customer1.id}/customer-groups?fields=groups.id`,
{
remove: [group1.id],
add: [group2.id, group3.id],
},
adminHeaders
)

expect(response.status).toEqual(200)

expect(response.data.customer.groups.length).toEqual(2)
expect(response.data.customer.groups).toEqual(
expect.arrayContaining([
expect.objectContaining({ id: group2.id }),
expect.objectContaining({ id: group3.id }),
])
)
})
})

describe("GET /admin/customers/:id", () => {
it("should fetch a customer", async () => {
const response = await api.get(
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "integration-tests-http",
"version": "1.0.1",
"version": "1.0.2",
"main": "index.js",
"license": "MIT",
"private": true,
Expand Down
24 changes: 23 additions & 1 deletion integration-tests/modules/__tests__/modules/remote-query.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ medusaIntegrationTestRunner({
query = appContainer.resolve(ContainerRegistrationKeys.QUERY)
})

let product
beforeEach(async () => {
await createAdminUser(dbConnection, adminHeaders, appContainer)

Expand All @@ -224,11 +225,13 @@ medusaIntegrationTestRunner({
],
}

await api
const res = await api
.post("/admin/products", payload, adminHeaders)
.catch((err) => {
console.log(err)
})

product = res.data.product
})

it(`should throw if not exists`, async () => {
Expand Down Expand Up @@ -265,6 +268,25 @@ medusaIntegrationTestRunner({
)
})

it(`should support filtering using operators on a primary column`, async () => {
const { data } = await query.graph({
entity: "product",
fields: ["id", "title"],
filters: {
id: {
$in: [product.id],
},
},
})

expect(data).toEqual([
expect.objectContaining({
id: product.id,
title: product.title,
}),
])
})

it(`should perform cross module query and apply filters correctly to the correct modules [1]`, async () => {
const { data } = await query.graph({
entity: "product",
Expand Down
9 changes: 9 additions & 0 deletions packages/admin/admin-bundler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @medusajs/admin-bundler

## 2.0.1

### Patch Changes

- Updated dependencies [[`e0870731213d353d2d718ba0b600ce8c08add14a`](https://github.com/medusajs/medusa/commit/e0870731213d353d2d718ba0b600ce8c08add14a), [`7b6793f846a36289fe8cdfd501401b1d993d9eff`](https://github.com/medusajs/medusa/commit/7b6793f846a36289fe8cdfd501401b1d993d9eff), [`59e6747800133e091d20c2c167f600981abc5c0d`](https://github.com/medusajs/medusa/commit/59e6747800133e091d20c2c167f600981abc5c0d)]:
- @medusajs/dashboard@2.0.1
- @medusajs/admin-shared@2.0.1
- @medusajs/admin-vite-plugin@2.0.1

## 2.0.0

### Major Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/admin/admin-bundler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@medusajs/admin-bundler",
"version": "2.0.0",
"version": "2.0.1",
"description": "Bundler for the Medusa admin dashboard.",
"author": "Kasper Kristensen <[email protected]>",
"scripts": {
Expand All @@ -18,17 +18,17 @@
"package.json"
],
"devDependencies": {
"@medusajs/types": "^2.0.0",
"@medusajs/types": "^2.0.1",
"@types/compression": "^1.7.5",
"copyfiles": "^2.4.1",
"express": "^4.21.0",
"tsup": "^8.0.1",
"typescript": "^5.3.3"
},
"dependencies": {
"@medusajs/admin-shared": "2.0.0",
"@medusajs/admin-vite-plugin": "2.0.0",
"@medusajs/dashboard": "2.0.0",
"@medusajs/admin-shared": "2.0.1",
"@medusajs/admin-vite-plugin": "2.0.1",
"@medusajs/dashboard": "2.0.1",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.16",
"compression": "^1.7.4",
Expand Down
7 changes: 7 additions & 0 deletions packages/admin/admin-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @medusajs/admin-sdk

## 2.0.1

### Patch Changes

- Updated dependencies []:
- @medusajs/admin-shared@2.0.1

## 2.0.0

### Major Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/admin-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@medusajs/admin-sdk",
"description": "SDK for building extension for the Medusa admin dashboard.",
"version": "2.0.0",
"version": "2.0.1",
"author": "Kasper Kristensen <[email protected]>",
"types": "dist/index.d.ts",
"main": "dist/index.js",
Expand All @@ -25,7 +25,7 @@
"zod": "^3.22"
},
"dependencies": {
"@medusajs/admin-shared": "^2.0.0"
"@medusajs/admin-shared": "^2.0.1"
},
"peerDependencies": {
"zod": "^3.22"
Expand Down
2 changes: 2 additions & 0 deletions packages/admin/admin-shared/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @medusajs/admin-shared

## 2.0.1

## 2.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/admin-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@medusajs/admin-shared",
"description": "Shared code for Medusa admin packages.",
"version": "2.0.0",
"version": "2.0.1",
"author": "Kasper Kristensen <[email protected]>",
"types": "dist/index.d.ts",
"main": "dist/index.js",
Expand Down
7 changes: 7 additions & 0 deletions packages/admin/admin-vite-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @medusajs/admin-vite-plugin

## 2.0.1

### Patch Changes

- Updated dependencies []:
- @medusajs/admin-shared@2.0.1

## 2.0.0

### Major Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/admin-vite-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@medusajs/admin-vite-plugin",
"version": "2.0.0",
"version": "2.0.1",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"@babel/parser": "7.25.6",
"@babel/traverse": "7.25.6",
"@medusajs/admin-shared": "2.0.0",
"@medusajs/admin-shared": "2.0.1",
"chokidar": "3.5.3",
"fdir": "6.1.1",
"magic-string": "0.30.5",
Expand Down
16 changes: 16 additions & 0 deletions packages/admin/dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @medusajs/dashboard

## 2.0.1

### Patch Changes

- [#9757](https://github.com/medusajs/medusa/pull/9757) [`e0870731213d353d2d718ba0b600ce8c08add14a`](https://github.com/medusajs/medusa/commit/e0870731213d353d2d718ba0b600ce8c08add14a) Thanks [@adrien2p](https://github.com/adrien2p)! - fix(dashboard): Workflow executions

- [#9725](https://github.com/medusajs/medusa/pull/9725) [`7b6793f846a36289fe8cdfd501401b1d993d9eff`](https://github.com/medusajs/medusa/commit/7b6793f846a36289fe8cdfd501401b1d993d9eff) Thanks [@kasperkristensen](https://github.com/kasperkristensen)! - fix(dashboard): Prevent nested UI Routes from re-using parent component

- [#9775](https://github.com/medusajs/medusa/pull/9775) [`59e6747800133e091d20c2c167f600981abc5c0d`](https://github.com/medusajs/medusa/commit/59e6747800133e091d20c2c167f600981abc5c0d) Thanks [@kasperkristensen](https://github.com/kasperkristensen)! - fix(dashboard,ui): DateFilter should remain open

- Updated dependencies [[`59e6747800133e091d20c2c167f600981abc5c0d`](https://github.com/medusajs/medusa/commit/59e6747800133e091d20c2c167f600981abc5c0d)]:
- @medusajs/ui@4.0.1
- @medusajs/admin-shared@2.0.1
- @medusajs/js-sdk@2.0.1
- @medusajs/icons@2.0.1

## 2.0.0

### Major Changes
Expand Down
18 changes: 9 additions & 9 deletions packages/admin/dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@medusajs/dashboard",
"version": "2.0.0",
"version": "2.0.1",
"scripts": {
"generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
"dev": "vite",
Expand Down Expand Up @@ -42,10 +42,10 @@
"@dnd-kit/sortable": "^8.0.0",
"@hookform/error-message": "^2.0.1",
"@hookform/resolvers": "3.4.2",
"@medusajs/admin-shared": "2.0.0",
"@medusajs/icons": "2.0.0",
"@medusajs/js-sdk": "2.0.0",
"@medusajs/ui": "4.0.0",
"@medusajs/admin-shared": "2.0.1",
"@medusajs/icons": "2.0.1",
"@medusajs/js-sdk": "2.0.1",
"@medusajs/ui": "4.0.1",
"@radix-ui/react-collapsible": "1.1.0",
"@tanstack/react-query": "^5.28.14",
"@tanstack/react-table": "8.20.5",
Expand All @@ -72,10 +72,10 @@
"zod": "3.22.4"
},
"devDependencies": {
"@medusajs/admin-shared": "^2.0.0",
"@medusajs/admin-vite-plugin": "2.0.0",
"@medusajs/types": "2.0.0",
"@medusajs/ui-preset": "2.0.0",
"@medusajs/admin-shared": "^2.0.1",
"@medusajs/admin-vite-plugin": "2.0.1",
"@medusajs/types": "2.0.1",
"@medusajs/ui-preset": "2.0.1",
"@types/node": "^20.11.15",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
Expand Down
4 changes: 4 additions & 0 deletions packages/admin/dashboard/src/hooks/api/categories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ export const useUpdateProductCategoryProducts = (
queryKey: productsQueryKeys.lists(),
})

queryClient.invalidateQueries({
queryKey: productsQueryKeys.details(),
})

options?.onSuccess?.(data, variables, context)
},
...options,
Expand Down
Loading

0 comments on commit d449f04

Please sign in to comment.