Skip to content

Commit

Permalink
Merge branch 'develop' into docs/build-deployment-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser committed Nov 13, 2024
2 parents c87a0d0 + f151fb3 commit 12b6234
Show file tree
Hide file tree
Showing 442 changed files with 215,376 additions and 209,028 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-chefs-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/core-flows": patch
---

Order edit quantity diff
8 changes: 8 additions & 0 deletions .changeset/spotty-cups-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@medusajs/workflow-engine-inmemory": patch
"@medusajs/workflow-engine-redis": patch
"@medusajs/orchestration": patch
"@medusajs/workflows-sdk": patch
---

Fix set step failure for async steps
6 changes: 6 additions & 0 deletions .changeset/thirty-lamps-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/core-flows": patch
"@medusajs/medusa": patch
---

Create Order before payment capture
5 changes: 0 additions & 5 deletions .changeset/wet-cows-share.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.3

### Patch Changes

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

## 1.0.2

### Patch Changes
Expand Down
27 changes: 26 additions & 1 deletion integration-tests/http/__tests__/order-edits/order-edits.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
import {
ContainerRegistrationKeys,
Modules,
OrderChangeStatus,
RuleOperator,
} from "@medusajs/utils"
import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
import {
adminHeaders,
createAdminUser,
Expand Down Expand Up @@ -418,6 +418,31 @@ medusaIntegrationTestRunner({
expect(result.summary.current_order_total).toEqual(124)
expect(result.summary.original_order_total).toEqual(60)

const updatedItem = result.items.find((i) => i.id === item.id)
expect(updatedItem.actions).toEqual([
expect.objectContaining({
details: expect.objectContaining({
quantity: 2,
unit_price: 25,
quantity_diff: 0,
}),
}),
expect.objectContaining({
details: expect.objectContaining({
quantity: 3,
unit_price: 25,
quantity_diff: 1,
}),
}),
expect.objectContaining({
details: expect.objectContaining({
quantity: 3,
unit_price: 30,
quantity_diff: 1,
}),
}),
])

// Remove the item by setting the quantity to 0
result = (
await api.post(
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.2",
"version": "1.0.3",
"main": "index.js",
"license": "MIT",
"private": true,
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.4

### Patch Changes

- Updated dependencies [[`904f0926f16737abe0a51a4fce8e5b0b8a377321`](https://github.com/medusajs/medusa/commit/904f0926f16737abe0a51a4fce8e5b0b8a377321), [`5c22c57cb8f549c9b16829ab313eb954339b1f6a`](https://github.com/medusajs/medusa/commit/5c22c57cb8f549c9b16829ab313eb954339b1f6a)]:
- @medusajs/dashboard@2.0.4
- @medusajs/admin-shared@2.0.4
- @medusajs/admin-vite-plugin@2.0.4

## 2.0.3

### Patch 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.3",
"version": "2.0.4",
"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.3",
"@medusajs/types": "^2.0.4",
"@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.3",
"@medusajs/admin-vite-plugin": "2.0.3",
"@medusajs/dashboard": "2.0.3",
"@medusajs/admin-shared": "2.0.4",
"@medusajs/admin-vite-plugin": "2.0.4",
"@medusajs/dashboard": "2.0.4",
"@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.4

### Patch Changes

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

## 2.0.3

### Patch 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.3",
"version": "2.0.4",
"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.3"
"@medusajs/admin-shared": "^2.0.4"
},
"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.4

## 2.0.3

## 2.0.2
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.3",
"version": "2.0.4",
"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.4

### Patch Changes

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

## 2.0.3

### Patch 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.3",
"version": "2.0.4",
"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.3",
"@medusajs/admin-shared": "2.0.4",
"chokidar": "3.5.3",
"fdir": "6.1.1",
"magic-string": "0.30.5",
Expand Down
13 changes: 13 additions & 0 deletions packages/admin/dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @medusajs/dashboard

## 2.0.4

### Patch Changes

- [#10029](https://github.com/medusajs/medusa/pull/10029) [`904f0926f16737abe0a51a4fce8e5b0b8a377321`](https://github.com/medusajs/medusa/commit/904f0926f16737abe0a51a4fce8e5b0b8a377321) Thanks [@kasperkristensen](https://github.com/kasperkristensen)! - fix(dashboard): Fix query key for product details and load product variant data correctly

- [#9770](https://github.com/medusajs/medusa/pull/9770) [`5c22c57cb8f549c9b16829ab313eb954339b1f6a`](https://github.com/medusajs/medusa/commit/5c22c57cb8f549c9b16829ab313eb954339b1f6a) Thanks [@nexthis](https://github.com/nexthis)! - feat(dashboard): Add Polish translation of admin dashboard

- Updated dependencies []:
- @medusajs/admin-shared@2.0.4
- @medusajs/js-sdk@2.0.4
- @medusajs/icons@2.0.4

## 2.0.3

### Patch Changes
Expand Down
16 changes: 8 additions & 8 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.3",
"version": "2.0.4",
"scripts": {
"generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
"dev": "vite",
Expand Down Expand Up @@ -45,9 +45,9 @@
"@dnd-kit/sortable": "^8.0.0",
"@hookform/error-message": "^2.0.1",
"@hookform/resolvers": "3.4.2",
"@medusajs/admin-shared": "2.0.3",
"@medusajs/icons": "2.0.3",
"@medusajs/js-sdk": "2.0.3",
"@medusajs/admin-shared": "2.0.4",
"@medusajs/icons": "2.0.4",
"@medusajs/js-sdk": "2.0.4",
"@medusajs/ui": "4.0.1",
"@radix-ui/react-collapsible": "1.1.0",
"@tanstack/react-query": "^5.28.14",
Expand Down Expand Up @@ -75,10 +75,10 @@
"zod": "3.22.4"
},
"devDependencies": {
"@medusajs/admin-shared": "^2.0.3",
"@medusajs/admin-vite-plugin": "2.0.3",
"@medusajs/types": "2.0.3",
"@medusajs/ui-preset": "2.0.3",
"@medusajs/admin-shared": "^2.0.4",
"@medusajs/admin-vite-plugin": "2.0.4",
"@medusajs/types": "2.0.4",
"@medusajs/ui-preset": "2.0.4",
"@types/node": "^20.11.15",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { Thumbnail } from "../../../../common/thumbnail"
import { HttpTypes } from "@medusajs/types"

type ProductCellProps = {
product: HttpTypes.AdminProduct
product: Pick<HttpTypes.AdminProduct, "thumbnail" | "title">
}

export const ProductCell = ({ product }: ProductCellProps) => {
return (
<div className="flex h-full w-full items-center gap-x-3 overflow-hidden max-w-[250px]">
<div className="flex h-full w-full max-w-[250px] items-center gap-x-3 overflow-hidden">
<div className="w-fit flex-shrink-0">
<Thumbnail src={product.thumbnail} />
</div>
Expand Down
13 changes: 9 additions & 4 deletions packages/admin/dashboard/src/hooks/api/products.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,21 @@ export const useDeleteProductOption = (
export const useProductVariant = (
productId: string,
variantId: string,
query?: Record<string, any>,
query?: HttpTypes.AdminProductVariantParams,
options?: Omit<
UseQueryOptions<any, FetchError, any, QueryKey>,
UseQueryOptions<
HttpTypes.AdminProductVariantResponse,
FetchError,
HttpTypes.AdminProductVariantResponse,
QueryKey
>,
"queryFn" | "queryKey"
>
) => {
const { data, ...rest } = useQuery({
queryFn: () =>
sdk.admin.product.retrieveVariant(productId, variantId, query),
queryKey: variantsQueryKeys.detail(variantId),
queryKey: variantsQueryKeys.detail(variantId, query),
...options,
})

Expand Down Expand Up @@ -238,7 +243,7 @@ export const useProduct = (
) => {
const { data, ...rest } = useQuery({
queryFn: () => sdk.admin.product.retrieve(id, query),
queryKey: productsQueryKeys.detail(id),
queryKey: productsQueryKeys.detail(id, query),
...options,
})

Expand Down
10 changes: 8 additions & 2 deletions packages/admin/dashboard/src/i18n/languages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { enUS, pl } from "date-fns/locale"
import { de, enUS, pl } from "date-fns/locale"
import { Language } from "./types"

export const languages: Language[] = [
Expand All @@ -8,9 +8,15 @@ export const languages: Language[] = [
ltr: true,
date_locale: enUS,
},
{
code: "de",
display_name: "Deutsch",
ltr: true,
date_locale: de,
},
{
code: "pl",
display_name: "Polish",
display_name: "Polski",
ltr: true,
date_locale: pl,
},
Expand Down
Loading

0 comments on commit 12b6234

Please sign in to comment.