Merge branch 'develop' into docs/change-arch

This commit is contained in:
Shahed Nasser committed 2025-03-11 11:57:45 +02:00
commit 8d23c97af9
574 files changed
+286699 -279483

No files matched your search

-7
View File
@@ -1,7 +0,0 @@
---
"@medusajs/product": patch
"@medusajs/framework": patch
"@medusajs/medusa": patch
---
chore(product): Improve product normalization
-62
View File
@@ -1,62 +0,0 @@
---
"@medusajs/notification-sendgrid": patch
"@medusajs/fulfillment-manual": patch
"@medusajs/notification-local": patch
"@medusajs/locking-postgres": patch
"@medusajs/auth-emailpass": patch
"@medusajs/payment-stripe": patch
"@medusajs/workflow-engine-inmemory": patch
"@medusajs/locking-redis": patch
"@medusajs/auth-github": patch
"@medusajs/auth-google": patch
"@medusajs/workflow-engine-redis": patch
"@medusajs/file-local": patch
"@medusajs/file-s3": patch
"@medusajs/ui-preset": patch
"@medusajs/event-bus-local": patch
"@medusajs/event-bus-redis": patch
"@medusajs/medusa-oas-cli": patch
"@medusajs/cache-inmemory": patch
"@medusajs/stock-location": patch
"create-medusa-app": patch
"@medusajs/sales-channel": patch
"@medusajs/link-modules": patch
"@medusajs/notification": patch
"@medusajs/admin-bundler": patch
"@medusajs/icons": patch
"@medusajs/cache-redis": patch
"@medusajs/fulfillment": patch
"@medusajs/orchestration": patch
"@medusajs/workflows-sdk": patch
"@medusajs/test-utils": patch
"@medusajs/inventory": patch
"@medusajs/promotion": patch
"@medusajs/modules-sdk": patch
"@medusajs/ui": patch
"@medusajs/currency": patch
"@medusajs/customer": patch
"@medusajs/admin-sdk": patch
"@medusajs/dashboard": patch
"@medusajs/core-flows": patch
"@medusajs/api-key": patch
"@medusajs/locking": patch
"@medusajs/payment": patch
"@medusajs/pricing": patch
"@medusajs/product": patch
"@medusajs/cli": patch
"@medusajs/framework": patch
"@medusajs/region": patch
"@medusajs/index": patch
"@medusajs/order": patch
"@medusajs/store": patch
"@medusajs/auth": patch
"@medusajs/cart": patch
"@medusajs/file": patch
"@medusajs/user": patch
"@medusajs/js-sdk": patch
"@medusajs/tax": patch
"@medusajs/utils": patch
"@medusajs/medusa": patch
---
chore: Remove ranges on Medusa packages
-5
View File
@@ -1,5 +0,0 @@
---
"@medusajs/framework": patch
---
Fix(framework): http cors middleware order and options
-6
View File
@@ -1,6 +0,0 @@
---
"@medusajs/core-flows": patch
"@medusajs/workflows-sdk": patch
---
feat(workflows-sdk): Allow when then in parallelize
-5
View File
@@ -1,5 +0,0 @@
---
"@medusajs/medusa": patch
---
chore: pin swc to 1.5.7
-5
View File
@@ -1,5 +0,0 @@
---
"@medusajs/pricing": patch
---
fix(pricing): emit events
-5
View File
@@ -1,5 +0,0 @@
---
"@medusajs/workflow-engine-redis": patch
---
fix(workflow-engine-redis): Split the queues and respect worker mode for job executions
@@ -331,6 +331,17 @@ medusaIntegrationTestRunner({
}, },
]) ])
// create reservation for inventory item that is initially on the order
const inventoryModule = container.resolve(Modules.INVENTORY)
await inventoryModule.createReservationItems([
{
inventory_item_id: inventoryItem.id,
location_id: location.id,
quantity: 2,
line_item_id: order.items[0].id,
},
])
const shippingOptionPayload = { const shippingOptionPayload = {
name: "Return shipping", name: "Return shipping",
service_zone_id: fulfillmentSet.service_zones[0].id, service_zone_id: fulfillmentSet.service_zones[0].id,
@@ -325,6 +325,17 @@ medusaIntegrationTestRunner({
}, },
]) ])
// create reservation for inventory item that is initially on the order
const inventoryModule = container.resolve(Modules.INVENTORY)
await inventoryModule.createReservationItems([
{
inventory_item_id: inventoryItem.id,
location_id: location.id,
quantity: 2,
line_item_id: order.items[0].id,
},
])
const shippingOptionPayload = { const shippingOptionPayload = {
name: "Return shipping", name: "Return shipping",
service_zone_id: fulfillmentSet.service_zones[0].id, service_zone_id: fulfillmentSet.service_zones[0].id,
@@ -17,6 +17,7 @@ medusaIntegrationTestRunner({
let location let location
let item let item
let returnShippingOption let returnShippingOption
let outboundShippingOption
const shippingProviderId = "manual_test-provider" const shippingProviderId = "manual_test-provider"
beforeEach(async () => { beforeEach(async () => {
@@ -135,7 +136,7 @@ medusaIntegrationTestRunner({
prices: [ prices: [
{ {
currency_code: "usd", currency_code: "usd",
amount: 20, amount: 0, // Free shipping
}, },
], ],
rules: [ rules: [
@@ -160,7 +161,7 @@ medusaIntegrationTestRunner({
) )
).data.shipping_option ).data.shipping_option
const outboundShippingOption = ( outboundShippingOption = (
await api.post( await api.post(
"/admin/shipping-options", "/admin/shipping-options",
outboundShippingOptionPayload, outboundShippingOptionPayload,
@@ -289,6 +290,15 @@ medusaIntegrationTestRunner({
adminHeaders adminHeaders
) )
// If claim has outbound items, we need to set the outbound shipping method for reservation to be created
// TODO: change condition in confirm workfow to crate reservation depending on shipping since we can have
// reservations for inventory items that don't require shipping
await api.post(
`/admin/claims/${singleOutboundClaim.id}/outbound/shipping-method`,
{ shipping_option_id: outboundShippingOption.id },
adminHeaders
)
await api.post( await api.post(
`/admin/claims/${singleOutboundClaim.id}/request`, `/admin/claims/${singleOutboundClaim.id}/request`,
{}, {},
@@ -239,6 +239,17 @@ medusaIntegrationTestRunner({
}, },
]) ])
// create reservation for inventory item that is initially on the order
const inventoryModule = container.resolve(Modules.INVENTORY)
await inventoryModule.createReservationItems([
{
inventory_item_id: inventoryItem.id,
location_id: location.id,
quantity: 2,
line_item_id: order.items[0].id,
},
])
const shippingOptionPayload = { const shippingOptionPayload = {
name: "Return shipping", name: "Return shipping",
service_zone_id: fulfillmentSet.service_zones[0].id, service_zone_id: fulfillmentSet.service_zones[0].id,
@@ -866,7 +877,9 @@ medusaIntegrationTestRunner({
adminHeaders adminHeaders
) )
).data.inventory_levels ).data.inventory_levels
expect(inventoryLevel[0].stocked_quantity).toEqual(2)
// we had 2 items in stock that were reserved for the order and then fulfilled
expect(inventoryLevel[0].stocked_quantity).toEqual(0)
let result = await api.post( let result = await api.post(
`/admin/returns/${returnId}/receive`, `/admin/returns/${returnId}/receive`,
@@ -987,7 +1000,7 @@ medusaIntegrationTestRunner({
adminHeaders adminHeaders
) )
).data.inventory_levels ).data.inventory_levels
expect(inventoryLevel[0].stocked_quantity).toEqual(3) expect(inventoryLevel[0].stocked_quantity).toEqual(1)
}) })
}) })
@@ -486,6 +486,9 @@ medusaIntegrationTestRunner({
it("should revert an order fulfillment when it fails and recreate it when tried again", async () => { it("should revert an order fulfillment when it fails and recreate it when tried again", async () => {
const order = await createOrderFixture({ container, product, location }) const order = await createOrderFixture({ container, product, location })
const itemId = order.items?.find((i) => i.title === "Custom Item 2")!
.id as string
// Create a fulfillment // Create a fulfillment
const createOrderFulfillmentData: OrderWorkflow.CreateOrderFulfillmentWorkflowInput = const createOrderFulfillmentData: OrderWorkflow.CreateOrderFulfillmentWorkflowInput =
{ {
@@ -493,7 +496,7 @@ medusaIntegrationTestRunner({
created_by: "user_1", created_by: "user_1",
items: [ items: [
{ {
id: order.items![0].id, id: itemId,
quantity: 1, quantity: 1,
}, },
], ],
@@ -540,12 +543,14 @@ medusaIntegrationTestRunner({
const [orderFulfill] = await remoteQuery(remoteQueryObject) const [orderFulfill] = await remoteQuery(remoteQueryObject)
const fulfilledItem = orderFulfill.items?.find((i) => i.id === itemId)
expect(orderFulfill.fulfillments).toHaveLength(1) expect(orderFulfill.fulfillments).toHaveLength(1)
expect(orderFulfill.items[0].detail.fulfilled_quantity).toEqual(1) expect(fulfilledItem?.detail.fulfilled_quantity).toEqual(1)
const inventoryModule = container.resolve(Modules.INVENTORY) const inventoryModule = container.resolve(Modules.INVENTORY)
const reservation = await inventoryModule.listReservationItems({ const reservation = await inventoryModule.listReservationItems({
line_item_id: order.items![0].id, line_item_id: itemId,
}) })
expect(reservation).toHaveLength(0) expect(reservation).toHaveLength(0)
+11
View File
@@ -1,5 +1,16 @@
# @medusajs/admin-bundler # @medusajs/admin-bundler
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`4c28efaadc01fd0782721924c3c2eff0f6f9ba7a`](https://github.com/medusajs/medusa/commit/4c28efaadc01fd0782721924c3c2eff0f6f9ba7a), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/dashboard@2.6.1
- @medusajs/admin-shared@2.6.1
- @medusajs/admin-vite-plugin@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/admin-bundler", "name": "@medusajs/admin-bundler",
"version": "2.6.0", "version": "2.6.1",
"description": "Bundler for the Medusa admin dashboard.", "description": "Bundler for the Medusa admin dashboard.",
"author": "Kasper Kristensen <kasper@medusajs.com>", "author": "Kasper Kristensen <kasper@medusajs.com>",
"scripts": { "scripts": {
@@ -18,7 +18,7 @@
"package.json" "package.json"
], ],
"devDependencies": { "devDependencies": {
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@types/compression": "^1.7.5", "@types/compression": "^1.7.5",
"copyfiles": "^2.4.1", "copyfiles": "^2.4.1",
"express": "^4.21.0", "express": "^4.21.0",
@@ -26,9 +26,9 @@
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"dependencies": { "dependencies": {
"@medusajs/admin-shared": "2.6.0", "@medusajs/admin-shared": "2.6.1",
"@medusajs/admin-vite-plugin": "2.6.0", "@medusajs/admin-vite-plugin": "2.6.1",
"@medusajs/dashboard": "2.6.0", "@medusajs/dashboard": "2.6.1",
"@rollup/plugin-node-resolve": "^16.0.0", "@rollup/plugin-node-resolve": "^16.0.0",
"@vitejs/plugin-react": "^4.2.1", "@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/admin-sdk # @medusajs/admin-sdk
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies []:
- @medusajs/admin-shared@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"name": "@medusajs/admin-sdk", "name": "@medusajs/admin-sdk",
"description": "SDK for building extension for the Medusa admin dashboard.", "description": "SDK for building extension for the Medusa admin dashboard.",
"version": "2.6.0", "version": "2.6.1",
"author": "Kasper Kristensen <kasper@medusajs.com>", "author": "Kasper Kristensen <kasper@medusajs.com>",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"main": "dist/index.js", "main": "dist/index.js",
@@ -24,7 +24,7 @@
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"dependencies": { "dependencies": {
"@medusajs/admin-shared": "2.6.0", "@medusajs/admin-shared": "2.6.1",
"zod": "3.22.4" "zod": "3.22.4"
}, },
"packageManager": "yarn@3.2.1" "packageManager": "yarn@3.2.1"
+2
View File
@@ -1,5 +1,7 @@
# @medusajs/admin-shared # @medusajs/admin-shared
## 2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@medusajs/admin-shared", "name": "@medusajs/admin-shared",
"description": "Shared code for Medusa admin packages.", "description": "Shared code for Medusa admin packages.",
"version": "2.6.0", "version": "2.6.1",
"author": "Kasper Kristensen <kasper@medusajs.com>", "author": "Kasper Kristensen <kasper@medusajs.com>",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"main": "dist/index.js", "main": "dist/index.js",
@@ -1,5 +1,12 @@
# @medusajs/admin-vite-plugin # @medusajs/admin-vite-plugin
## 2.6.1
### Patch Changes
- Updated dependencies []:
- @medusajs/admin-shared@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/admin-vite-plugin", "name": "@medusajs/admin-vite-plugin",
"version": "2.6.0", "version": "2.6.1",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.mjs", "module": "dist/index.mjs",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -40,7 +40,7 @@
"@babel/parser": "7.25.6", "@babel/parser": "7.25.6",
"@babel/traverse": "7.25.6", "@babel/traverse": "7.25.6",
"@babel/types": "7.25.6", "@babel/types": "7.25.6",
"@medusajs/admin-shared": "2.6.0", "@medusajs/admin-shared": "2.6.1",
"chokidar": "3.5.3", "chokidar": "3.5.3",
"fdir": "6.1.1", "fdir": "6.1.1",
"magic-string": "0.30.5", "magic-string": "0.30.5",
+14
View File
@@ -1,5 +1,19 @@
# @medusajs/dashboard # @medusajs/dashboard
## 2.6.1
### Patch Changes
- [#11731](https://github.com/medusajs/medusa/pull/11731) [`4c28efaadc01fd0782721924c3c2eff0f6f9ba7a`](https://github.com/medusajs/medusa/commit/4c28efaadc01fd0782721924c3c2eff0f6f9ba7a) Thanks [@fPolic](https://github.com/fPolic)! - fix(dashboard): correctly format date cell time
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/icons@2.6.1
- @medusajs/ui@4.0.7
- @medusajs/js-sdk@2.6.1
- @medusajs/admin-shared@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+9 -9
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/dashboard", "name": "@medusajs/dashboard",
"version": "2.6.0", "version": "2.6.1",
"scripts": { "scripts": {
"generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts", "generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
"dev": "vite", "dev": "vite",
@@ -45,10 +45,10 @@
"@dnd-kit/sortable": "^8.0.0", "@dnd-kit/sortable": "^8.0.0",
"@hookform/error-message": "^2.0.1", "@hookform/error-message": "^2.0.1",
"@hookform/resolvers": "3.4.2", "@hookform/resolvers": "3.4.2",
"@medusajs/admin-shared": "2.6.0", "@medusajs/admin-shared": "2.6.1",
"@medusajs/icons": "2.6.0", "@medusajs/icons": "2.6.1",
"@medusajs/js-sdk": "2.6.0", "@medusajs/js-sdk": "2.6.1",
"@medusajs/ui": "4.0.6", "@medusajs/ui": "4.0.7",
"@tanstack/react-query": "5.64.2", "@tanstack/react-query": "5.64.2",
"@tanstack/react-table": "8.20.5", "@tanstack/react-table": "8.20.5",
"@tanstack/react-virtual": "^3.8.3", "@tanstack/react-virtual": "^3.8.3",
@@ -75,10 +75,10 @@
"zod": "3.22.4" "zod": "3.22.4"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/admin-shared": "2.6.0", "@medusajs/admin-shared": "2.6.1",
"@medusajs/admin-vite-plugin": "2.6.0", "@medusajs/admin-vite-plugin": "2.6.1",
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@medusajs/ui-preset": "2.6.0", "@medusajs/ui-preset": "2.6.1",
"@types/node": "^20.11.15", "@types/node": "^20.11.15",
"@types/react": "^18.2.79", "@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25", "@types/react-dom": "^18.2.25",
@@ -1,35 +1,33 @@
import { Tooltip } from "@medusajs/ui" import { Tooltip } from "@medusajs/ui"
import { format } from "date-fns/format"
import { useTranslation } from "react-i18next" import { useTranslation } from "react-i18next"
import { PlaceholderCell } from "../placeholder-cell" import { PlaceholderCell } from "../placeholder-cell"
import { useDate } from "../../../../../hooks/use-date"
type DateCellProps = { type DateCellProps = {
date?: Date | string | null date?: Date | string | null
} }
export const DateCell = ({ date }: DateCellProps) => { export const DateCell = ({ date }: DateCellProps) => {
const { getFullDate } = useDate()
if (!date) { if (!date) {
return <PlaceholderCell /> return <PlaceholderCell />
} }
const value = new Date(date)
value.setMinutes(value.getMinutes() - value.getTimezoneOffset())
const hour12 = Intl.DateTimeFormat().resolvedOptions().hour12
const timestampFormat = hour12 ? "dd MMM yyyy hh:MM a" : "dd MMM yyyy HH:MM"
return ( return (
<div className="flex h-full w-full items-center overflow-hidden"> <div className="flex h-full w-full items-center overflow-hidden">
<Tooltip <Tooltip
className="z-10" className="z-10"
content={ content={
<span className="text-pretty">{`${format( <span className="text-pretty">{`${getFullDate({
value, date,
timestampFormat includeTime: true,
)}`}</span> })}`}</span>
} }
> >
<span className="truncate">{format(value, "dd MMM yyyy")}</span> <span className="truncate">
{getFullDate({ date, includeTime: false })}
</span>
</Tooltip> </Tooltip>
</div> </div>
) )
@@ -111,30 +111,28 @@ export function OrderCreateFulfillmentForm({
return return
} }
const selectedShippingProfileId = let items = Object.entries(data.quantity)
selectedShippingOption?.shipping_profile_id
const itemShippingProfileMap = order.items.reduce(
(acc, item) => {
acc[item.id] = item.variant?.product?.shipping_profile?.id
return acc
},
{} as Record<string, string | null>
)
const items = Object.entries(data.quantity)
.filter(
([id, value]) =>
!!value && itemShippingProfileMap[id] === selectedShippingProfileId
)
.map(([id, quantity]) => ({ .map(([id, quantity]) => ({
id, id,
quantity, quantity,
})) }))
.filter(({ quantity }) => !!quantity)
if (!items.length) { /**
toast.error(t("orders.fulfillment.error.noItems")) * If items require shipping fulfill only items with matching shipping profile.
return */
if (requiresShipping) {
const selectedShippingProfileId =
selectedShippingOption?.shipping_profile_id
const itemShippingProfileMap = order.items.reduce((acc, item) => {
acc[item.id] = item.variant?.product?.shipping_profile?.id
return acc
}, {} as any)
items = items.filter(
({ id }) => itemShippingProfileMap[id] === selectedShippingProfileId
)
} }
const payload: HttpTypes.AdminCreateOrderFulfillment = { const payload: HttpTypes.AdminCreateOrderFulfillment = {
@@ -357,7 +355,9 @@ export function OrderCreateFulfillmentForm({
form={form} form={form}
item={item} item={item}
locationId={selectedLocationId} locationId={selectedLocationId}
disabled={!isShippingProfileMatching} disabled={
requiresShipping && !isShippingProfileMatching
}
itemReservedQuantitiesMap={ itemReservedQuantitiesMap={
itemReservedQuantitiesMap itemReservedQuantitiesMap
} }
@@ -1,5 +1,14 @@
# Change Log # Change Log
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies []:
- @medusajs/telemetry@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "create-medusa-app", "name": "create-medusa-app",
"version": "2.6.0", "version": "2.6.1",
"description": "Create a Medusa project using a single command.", "description": "Create a Medusa project using a single command.",
"type": "module", "type": "module",
"exports": "./dist/index.js", "exports": "./dist/index.js",
@@ -13,7 +13,7 @@
"watch": "tsc --watch" "watch": "tsc --watch"
}, },
"dependencies": { "dependencies": {
"@medusajs/telemetry": "2.6.0", "@medusajs/telemetry": "2.6.1",
"boxen": "^5", "boxen": "^5",
"chalk": "^5.2.0", "chalk": "^5.2.0",
"commander": "^10.0.1", "commander": "^10.0.1",
+10
View File
@@ -1,5 +1,15 @@
# Change Log # Change Log
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/utils@2.6.1
- @medusajs/telemetry@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/cli", "name": "@medusajs/cli",
"version": "2.6.0", "version": "2.6.1",
"description": "Command Line interface for Medusa Commerce", "description": "Command Line interface for Medusa Commerce",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
@@ -46,8 +46,8 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"dependencies": { "dependencies": {
"@medusajs/telemetry": "2.6.0", "@medusajs/telemetry": "2.6.1",
"@medusajs/utils": "2.6.0", "@medusajs/utils": "2.6.1",
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"chalk": "^4.0.0", "chalk": "^4.0.0",
"configstore": "5.0.1", "configstore": "5.0.1",
+2
View File
@@ -1,5 +1,7 @@
# Change Log # Change Log
## 2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "medusa-dev-cli", "name": "medusa-dev-cli",
"description": "CLI helpers for contributors working on Medusa", "description": "CLI helpers for contributors working on Medusa",
"version": "2.6.0", "version": "2.6.1",
"author": "Sebastian Rindom <skrindom@gmail.com>", "author": "Sebastian Rindom <skrindom@gmail.com>",
"bin": { "bin": {
"medusa-dev": "./dist/index.js" "medusa-dev": "./dist/index.js"
@@ -1,5 +1,15 @@
# @medusajs/oas-cli # @medusajs/oas-cli
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`62e429178f3abe0a528f7a574eb6a09ac525bf9c`](https://github.com/medusajs/medusa/commit/62e429178f3abe0a528f7a574eb6a09ac525bf9c), [`90964a404edbb079d7de332a11ab97c4f5643d67`](https://github.com/medusajs/medusa/commit/90964a404edbb079d7de332a11ab97c4f5643d67), [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`2a0bd86204c9dd51a012763016f2de822d3c45b6`](https://github.com/medusajs/medusa/commit/2a0bd86204c9dd51a012763016f2de822d3c45b6)]:
- @medusajs/medusa@2.6.1
- @medusajs/utils@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/medusa-oas-cli", "name": "@medusajs/medusa-oas-cli",
"version": "2.6.0", "version": "2.6.1",
"description": "OAS CLI", "description": "OAS CLI",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
@@ -21,7 +21,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"jest": "^29.1.0", "jest": "^29.1.0",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
@@ -35,8 +35,8 @@
"medusa-oas": "ts-node src/index.ts" "medusa-oas": "ts-node src/index.ts"
}, },
"dependencies": { "dependencies": {
"@medusajs/medusa": "2.6.0", "@medusajs/medusa": "2.6.1",
"@medusajs/utils": "2.6.0", "@medusajs/utils": "2.6.1",
"@readme/json-schema-ref-parser": "^1.2.0", "@readme/json-schema-ref-parser": "^1.2.0",
"@readme/openapi-parser": "^2.4.0", "@readme/openapi-parser": "^2.4.0",
"@redocly/cli": "^1.7.0", "@redocly/cli": "^1.7.0",
@@ -1,5 +1,12 @@
# @medusajs/oas-github-ci # @medusajs/oas-github-ci
## 2.6.1
### Patch Changes
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/medusa-oas-cli@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/oas-github-ci", "name": "@medusajs/oas-github-ci",
"version": "2.6.0", "version": "2.6.1",
"description": "OAS Github CI", "description": "OAS Github CI",
"main": "scripts/build-openapi.js", "main": "scripts/build-openapi.js",
"files": [ "files": [
@@ -21,7 +21,7 @@
"test": "jest --passWithNoTests" "test": "jest --passWithNoTests"
}, },
"dependencies": { "dependencies": {
"@medusajs/medusa-oas-cli": "2.6.0", "@medusajs/medusa-oas-cli": "2.6.1",
"execa": "^5.1.1" "execa": "^5.1.1"
} }
} }
+15
View File
@@ -1,5 +1,20 @@
# @medusajs/core-flows # @medusajs/core-flows
## 2.6.1
### Patch Changes
- [#11715](https://github.com/medusajs/medusa/pull/11715) [`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - chore: improve tax lines
- [#11735](https://github.com/medusajs/medusa/pull/11735) [`70eaaa91965dbe3a641dc634b4e81069d73846ed`](https://github.com/medusajs/medusa/commit/70eaaa91965dbe3a641dc634b4e81069d73846ed) Thanks [@fPolic](https://github.com/fPolic)! - fix(core-flows): fulfillment reservation check
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- [#11756](https://github.com/medusajs/medusa/pull/11756) [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(workflows-sdk): Allow when then in parallelize
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/core-flows", "name": "@medusajs/core-flows",
"version": "2.6.0", "version": "2.6.1",
"description": "Set of workflow definitions for Medusa", "description": "Set of workflow definitions for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"exports": { "exports": {
@@ -26,7 +26,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/knex": "6.4.3", "@mikro-orm/knex": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -44,7 +44,7 @@
"json-2-csv": "^5.5.4" "json-2-csv": "^5.5.4"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"awilix": "^8.0.1" "awilix": "^8.0.1"
}, },
"scripts": { "scripts": {
@@ -6,7 +6,7 @@ import {
ItemTaxLineDTO, ItemTaxLineDTO,
ShippingTaxLineDTO, ShippingTaxLineDTO,
} from "@medusajs/framework/types" } from "@medusajs/framework/types"
import { Modules } from "@medusajs/framework/utils" import { Modules, promiseAll } from "@medusajs/framework/utils"
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk" import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
/** /**
@@ -30,13 +30,13 @@ export interface SetTaxLinesForItemsStepInput {
export const setTaxLinesForItemsStepId = "set-tax-lines-for-items" export const setTaxLinesForItemsStepId = "set-tax-lines-for-items"
/** /**
* This step sets the tax lines of shipping methods and line items in a cart. * This step sets the tax lines of shipping methods and line items in a cart.
* *
* :::tip * :::tip
* *
* You can use the {@link retrieveCartStep} to retrieve a cart's details. * You can use the {@link retrieveCartStep} to retrieve a cart's details.
* *
* ::: * :::
* *
* @example * @example
* const data = setTaxLinesForItemsStep({ * const data = setTaxLinesForItemsStep({
* // retrieve the details of the cart from another workflow * // retrieve the details of the cart from another workflow
@@ -64,21 +64,31 @@ export const setTaxLinesForItemsStep = createStep(
const { cart, item_tax_lines, shipping_tax_lines } = data const { cart, item_tax_lines, shipping_tax_lines } = data
const cartService = container.resolve<ICartModuleService>(Modules.CART) const cartService = container.resolve<ICartModuleService>(Modules.CART)
const existingShippingMethodTaxLines = const [existingShippingMethodTaxLines, existingLineItemTaxLines] =
await cartService.listShippingMethodTaxLines({ await promiseAll([
shipping_method_id: shipping_tax_lines.map((t) => t.shipping_line_id), shipping_tax_lines.length
}) ? cartService.listShippingMethodTaxLines({
shipping_method_id: shipping_tax_lines.map(
(t) => t.shipping_line_id
),
})
: [],
const existingLineItemTaxLines = await cartService.listLineItemTaxLines({ item_tax_lines.length
item_id: item_tax_lines.map((t) => t.line_item_id), ? cartService.listLineItemTaxLines({
}) item_id: item_tax_lines.map((t) => t.line_item_id),
})
: [],
])
const itemsTaxLinesData = normalizeItemTaxLinesForCart(item_tax_lines) const itemsTaxLinesData = normalizeItemTaxLinesForCart(item_tax_lines)
await cartService.setLineItemTaxLines(cart.id, itemsTaxLinesData)
const shippingTaxLinesData = const shippingTaxLinesData =
normalizeShippingTaxLinesForCart(shipping_tax_lines) normalizeShippingTaxLinesForCart(shipping_tax_lines)
await cartService.setShippingMethodTaxLines(cart.id, shippingTaxLinesData)
await promiseAll([
cartService.setLineItemTaxLines(cart.id, itemsTaxLinesData),
cartService.setShippingMethodTaxLines(cart.id, shippingTaxLinesData),
])
return new StepResponse(null, { return new StepResponse(null, {
cart, cart,
@@ -0,0 +1,176 @@
import {
CartWorkflowDTO,
CreateLineItemTaxLineDTO,
CreateShippingMethodTaxLineDTO,
ICartModuleService,
ItemTaxLineDTO,
LineItemTaxLineDTO,
ShippingMethodTaxLineDTO,
ShippingTaxLineDTO,
} from "@medusajs/framework/types"
import { Modules, promiseAll } from "@medusajs/framework/utils"
import { StepResponse, createStep } from "@medusajs/framework/workflows-sdk"
/**
* The details of the tax lines to set in a cart.
*/
export interface SetTaxLinesForItemsStepInput {
/**
* The cart's details.
*/
cart: CartWorkflowDTO
/**
* The tax lines to set for line items.
*/
item_tax_lines: ItemTaxLineDTO[]
/**
* The tax lines to set for shipping methods.
*/
shipping_tax_lines: ShippingTaxLineDTO[]
}
export const upsertTaxLinesForItemsStepId = "set-tax-lines-for-items"
/**
* This step sets the tax lines of shipping methods and line items in a cart.
*
* :::tip
*
* You can use the {@link retrieveCartStep} to retrieve a cart's details.
*
* :::
*
* @example
* const data = upsertTaxLinesForItemsStep({
* // retrieve the details of the cart from another workflow
* // or in another step using the Cart Module's service
* cart,
* "item_tax_lines": [{
* "rate": 48,
* "code": "CODE123",
* "name": "Tax rate 2",
* "provider_id": "provider_1",
* "line_item_id": "litem_123"
* }],
* "shipping_tax_lines": [{
* "rate": 49,
* "code": "CODE456",
* "name": "Tax rate 1",
* "provider_id": "provider_1",
* "shipping_line_id": "sm_123"
* }]
* })
*/
export const upsertTaxLinesForItemsStep = createStep(
upsertTaxLinesForItemsStepId,
async (data: SetTaxLinesForItemsStepInput, { container }) => {
const { cart, item_tax_lines, shipping_tax_lines } = data
const cartService = container.resolve<ICartModuleService>(Modules.CART)
const [existingShippingMethodTaxLines, existingLineItemTaxLines] =
await promiseAll([
shipping_tax_lines.length
? cartService.listShippingMethodTaxLines({
shipping_method_id: shipping_tax_lines.map(
(t) => t.shipping_line_id
),
})
: [],
item_tax_lines.length
? cartService.listLineItemTaxLines({
item_id: item_tax_lines.map((t) => t.line_item_id),
})
: [],
])
const itemsTaxLinesData = normalizeItemTaxLinesForCart(
item_tax_lines,
existingLineItemTaxLines
)
const shippingTaxLinesData = normalizeShippingTaxLinesForCart(
shipping_tax_lines,
existingShippingMethodTaxLines
)
await promiseAll([
itemsTaxLinesData.length
? cartService.upsertLineItemTaxLines(itemsTaxLinesData)
: [],
shippingTaxLinesData.length
? cartService.upsertShippingMethodTaxLines(shippingTaxLinesData)
: [],
])
return new StepResponse(null, {
cart,
existingLineItemTaxLines,
existingShippingMethodTaxLines,
})
},
async (revertData, { container }) => {
if (!revertData) {
return
}
const { existingLineItemTaxLines, existingShippingMethodTaxLines } =
revertData
const cartService = container.resolve<ICartModuleService>(Modules.CART)
if (existingLineItemTaxLines) {
await cartService.upsertLineItemTaxLines(
existingLineItemTaxLines.map((taxLine) => ({
description: taxLine.description,
tax_rate_id: taxLine.tax_rate_id,
code: taxLine.code,
rate: taxLine.rate,
provider_id: taxLine.provider_id,
item_id: taxLine.item_id,
}))
)
}
await cartService.upsertShippingMethodTaxLines(
existingShippingMethodTaxLines.map((taxLine) => ({
description: taxLine.description,
tax_rate_id: taxLine.tax_rate_id,
code: taxLine.code,
rate: taxLine.rate,
provider_id: taxLine.provider_id,
shipping_method_id: taxLine.shipping_method_id,
}))
)
}
)
function normalizeItemTaxLinesForCart(
taxLines: ItemTaxLineDTO[],
existingTaxLines: LineItemTaxLineDTO[]
): CreateLineItemTaxLineDTO[] {
return taxLines.map((taxLine: ItemTaxLineDTO & { id?: string }) => ({
id: existingTaxLines.find((t) => t.item_id === taxLine.line_item_id)?.id,
description: taxLine.name,
tax_rate_id: taxLine.rate_id,
code: taxLine.code!,
rate: taxLine.rate!,
provider_id: taxLine.provider_id,
item_id: taxLine.line_item_id,
}))
}
function normalizeShippingTaxLinesForCart(
taxLines: ShippingTaxLineDTO[],
existingTaxLines: ShippingMethodTaxLineDTO[]
): CreateShippingMethodTaxLineDTO[] {
return taxLines.map((taxLine: ShippingTaxLineDTO & { id?: string }) => ({
id: existingTaxLines.find(
(t) => t.shipping_method_id === taxLine.shipping_line_id
)?.id,
description: taxLine.name,
tax_rate_id: taxLine.rate_id,
code: taxLine.code!,
rate: taxLine.rate!,
provider_id: taxLine.provider_id,
shipping_method_id: taxLine.shipping_line_id,
}))
}
@@ -39,7 +39,7 @@ export interface AddShippingMethodToCartWorkflowInput {
id: string id: string
/** /**
* Custom data useful for the fulfillment provider processing the shipping option or method. * Custom data useful for the fulfillment provider processing the shipping option or method.
* *
* Learn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property). * Learn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property).
*/ */
data?: Record<string, unknown> data?: Record<string, unknown>
@@ -48,11 +48,11 @@ export interface AddShippingMethodToCartWorkflowInput {
export const addShippingMethodToCartWorkflowId = "add-shipping-method-to-cart" export const addShippingMethodToCartWorkflowId = "add-shipping-method-to-cart"
/** /**
* This workflow adds a shipping method to a cart. It's executed by the * This workflow adds a shipping method to a cart. It's executed by the
* [Add Shipping Method Store API Route](https://docs.medusajs.com/api/store#carts_postcartsidshippingmethods). * [Add Shipping Method Store API Route](https://docs.medusajs.com/api/store#carts_postcartsidshippingmethods).
* *
* You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around adding a shipping method to the cart. * You can use this workflow within your own customizations or custom workflows, allowing you to wrap custom logic around adding a shipping method to the cart.
* *
* @example * @example
* const { result } = await addShippingMethodToCartWorkflow(container) * const { result } = await addShippingMethodToCartWorkflow(container)
* .run({ * .run({
@@ -71,11 +71,11 @@ export const addShippingMethodToCartWorkflowId = "add-shipping-method-to-cart"
* ] * ]
* } * }
* }) * })
* *
* @summary * @summary
* *
* Add a shipping method to a cart. * Add a shipping method to a cart.
* *
* @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution. * @property hooks.validate - This hook is executed before all operations. You can consume this hook to perform any custom validation. If validation fails, you can throw an error to stop the workflow execution.
*/ */
export const addShippingMethodToCartWorkflow = createWorkflow( export const addShippingMethodToCartWorkflow = createWorkflow(
@@ -186,7 +186,7 @@ export const addShippingMethodToCartWorkflow = createWorkflow(
cart.shipping_methods.map((sm) => sm.id) cart.shipping_methods.map((sm) => sm.id)
) )
parallelize( const [, createdShippingMethods] = parallelize(
removeShippingMethodFromCartStep({ removeShippingMethodFromCartStep({
shipping_method_ids: currentShippingMethods, shipping_method_ids: currentShippingMethods,
}), }),
@@ -200,7 +200,7 @@ export const addShippingMethodToCartWorkflow = createWorkflow(
) )
refreshCartItemsWorkflow.runAsStep({ refreshCartItemsWorkflow.runAsStep({
input: { cart_id: cart.id }, input: { cart_id: cart.id, shipping_methods: createdShippingMethods },
}) })
return new WorkflowResponse(void 0, { return new WorkflowResponse(void 0, {
@@ -173,7 +173,7 @@ export const addToCartWorkflow = createWorkflow(
}, },
}) })
parallelize( const [createdLineItems, updatedLineItems] = parallelize(
createLineItemsStep({ createLineItemsStep({
id: cart.id, id: cart.id,
items: itemsToCreate, items: itemsToCreate,
@@ -184,8 +184,15 @@ export const addToCartWorkflow = createWorkflow(
}) })
) )
const allItems = transform(
{ createdLineItems, updatedLineItems },
({ createdLineItems = [], updatedLineItems = [] }) => {
return createdLineItems.concat(updatedLineItems)
}
)
refreshCartItemsWorkflow.runAsStep({ refreshCartItemsWorkflow.runAsStep({
input: { cart_id: cart.id }, input: { cart_id: cart.id, items: allItems },
}) })
emitEventStep({ emitEventStep({
@@ -26,6 +26,7 @@ import { refreshCartShippingMethodsWorkflow } from "./refresh-cart-shipping-meth
import { refreshPaymentCollectionForCartWorkflow } from "./refresh-payment-collection" import { refreshPaymentCollectionForCartWorkflow } from "./refresh-payment-collection"
import { updateCartPromotionsWorkflow } from "./update-cart-promotions" import { updateCartPromotionsWorkflow } from "./update-cart-promotions"
import { updateTaxLinesWorkflow } from "./update-tax-lines" import { updateTaxLinesWorkflow } from "./update-tax-lines"
import { upsertTaxLinesWorkflow } from "./upsert-tax-lines"
/** /**
* The details of the cart to refresh. * The details of the cart to refresh.
@@ -44,6 +45,23 @@ export type RefreshCartItemsWorkflowInput = {
* Force refresh the cart items * Force refresh the cart items
*/ */
force_refresh?: boolean force_refresh?: boolean
/**
* The items to refresh.
*/
items?: any[]
/**
* The shipping methods to refresh.
*/
shipping_methods?: any[]
/**
* Whether to force re-calculating tax amounts, which
* may include sending requests to a third-part tax provider, depending
* on the configurations of the cart's tax region.
*/
force_tax_calculation?: boolean
} }
export const refreshCartItemsWorkflowId = "refresh-cart-items" export const refreshCartItemsWorkflowId = "refresh-cart-items"
@@ -162,8 +180,33 @@ export const refreshCartItemsWorkflow = createWorkflow(
input: refreshCartInput, input: refreshCartInput,
}) })
updateTaxLinesWorkflow.runAsStep({ when({ input }, ({ input }) => {
input: refreshCartInput, return !!input.force_refresh
}).then(() => {
updateTaxLinesWorkflow.runAsStep({
input: refreshCartInput,
})
})
when({ input }, ({ input }) => {
return (
!input.force_refresh &&
(!!input.items?.length || !!input.shipping_methods?.length)
)
}).then(() => {
upsertTaxLinesWorkflow.runAsStep({
input: transform(
{ refetchedCart, input },
({ refetchedCart, input }) => {
return {
cart: refetchedCart,
items: input.items ?? [],
shipping_methods: input.shipping_methods ?? [],
force_tax_calculation: input.force_tax_calculation,
}
}
),
})
}) })
const cartPromoCodes = transform( const cartPromoCodes = transform(
@@ -0,0 +1,154 @@
import {
CartLineItemDTO,
CartShippingMethodDTO,
} from "@medusajs/framework/types"
import {
WorkflowData,
createWorkflow,
transform,
when,
} from "@medusajs/framework/workflows-sdk"
import { useRemoteQueryStep } from "../../common"
import { getItemTaxLinesStep } from "../../tax/steps/get-item-tax-lines"
import { upsertTaxLinesForItemsStep } from "../steps/upsert-tax-lines-for-items"
const cartFields = [
"id",
"currency_code",
"email",
"region.id",
"region.automatic_taxes",
"items.id",
"items.variant_id",
"items.product_id",
"items.product_title",
"items.product_description",
"items.product_subtitle",
"items.product_type",
"items.product_type_id",
"items.product_collection",
"items.product_handle",
"items.variant_sku",
"items.variant_barcode",
"items.variant_title",
"items.title",
"items.quantity",
"items.unit_price",
"items.tax_lines.id",
"items.tax_lines.description",
"items.tax_lines.code",
"items.tax_lines.rate",
"items.tax_lines.provider_id",
"shipping_methods.tax_lines.id",
"shipping_methods.tax_lines.description",
"shipping_methods.tax_lines.code",
"shipping_methods.tax_lines.rate",
"shipping_methods.tax_lines.provider_id",
"shipping_methods.shipping_option_id",
"shipping_methods.amount",
"customer.id",
"customer.email",
"customer.metadata",
"customer.groups.id",
"shipping_address.id",
"shipping_address.address_1",
"shipping_address.address_2",
"shipping_address.city",
"shipping_address.postal_code",
"shipping_address.country_code",
"shipping_address.region_code",
"shipping_address.province",
"shipping_address.metadata",
]
/**
* The details of the cart to upsert tax lines for.
*/
export type UpsertTaxLinesWorkflowInput = {
/**
* The cart's ID.
*/
cart_id?: string
/**
* The Cart reference.
*/
cart?: any
/**
* The items to upsert their tax lines.
* If not specified, taxes are upsertd for all of the cart's
* line items.
*/
items: CartLineItemDTO[]
/**
* The shipping methods to upsert their tax lines.
* If not specified, taxes are upsertd for all of the cart's
* shipping methods.
*/
shipping_methods: CartShippingMethodDTO[]
/**
* Whether to force re-calculating tax amounts, which
* may include sending requests to a third-part tax provider, depending
* on the configurations of the cart's tax region.
*
* @defaultValue false
*/
force_tax_calculation?: boolean
}
export const upsertTaxLinesWorkflowId = "upsert-tax-lines"
/**
* This workflow upserts a cart's tax lines that are applied on line items and shipping methods. You can upsert the line item's quantity, unit price, and more. This workflow is executed
* by the [Calculate Taxes Store API Route](https://docs.medusajs.com/api/store#carts_postcartsidtaxes).
*
* You can use this workflow within your own customizations or custom workflows, allowing you to upsert a cart's tax lines in your custom flows.
*
* @example
* const { result } = await upsertTaxLinesWorkflow(container)
* .run({
* input: {
* cart_id: "cart_123",
* items: [],
* shipping_methods: [],
* }
* })
*
* @summary
*
* Update a cart's tax lines.
*/
export const upsertTaxLinesWorkflow = createWorkflow(
upsertTaxLinesWorkflowId,
(input: WorkflowData<UpsertTaxLinesWorkflowInput>): WorkflowData<void> => {
const fetchCart = when({ input }, ({ input }) => {
return !input.cart
}).then(() => {
return useRemoteQueryStep({
entry_point: "cart",
fields: cartFields,
variables: { id: input.cart_id },
throw_if_key_not_found: true,
list: false,
})
})
const cart = transform({ fetchCart, input }, ({ fetchCart, input }) => {
return input.cart ?? fetchCart
})
const taxLineItems = getItemTaxLinesStep(
transform({ input, cart }, (data) => ({
orderOrCart: data.cart,
items: data.input.items ?? [],
shipping_methods: data.input.shipping_methods ?? [],
force_tax_calculation: data.input.force_tax_calculation,
}))
)
upsertTaxLinesForItemsStep({
cart,
item_tax_lines: taxLineItems.lineItemTaxLines,
shipping_tax_lines: taxLineItems.shippingMethodsTaxLines,
})
}
)
@@ -42,16 +42,16 @@ export type OrderClaimAddNewItemValidationStepInput = {
} }
/** /**
* This step validates that new items can be added to the claim. If the * This step validates that new items can be added to the claim. If the
* order or claim is canceled, or the order change is not active, the step will throw an error. * order or claim is canceled, or the order change is not active, the step will throw an error.
* *
* :::note * :::note
* *
* You can retrieve an order, order claim, and order change details using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query), * You can retrieve an order, order claim, and order change details using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query),
* or [useQueryGraphStep](https://docs.medusajs.com/resources/references/medusa-workflows/steps/useQueryGraphStep). * or [useQueryGraphStep](https://docs.medusajs.com/resources/references/medusa-workflows/steps/useQueryGraphStep).
* *
* ::: * :::
* *
* @example * @example
* const data = orderClaimAddNewItemValidationStep({ * const data = orderClaimAddNewItemValidationStep({
* order: { * order: {
@@ -85,10 +85,10 @@ export const orderClaimAddNewItemWorkflowId = "claim-add-new-item"
/** /**
* This workflow adds outbound (or new) items to a claim. It's used by the * This workflow adds outbound (or new) items to a claim. It's used by the
* [Add Outbound Items Admin API Route](https://docs.medusajs.com/api/admin#claims_postclaimsidoutbounditems). * [Add Outbound Items Admin API Route](https://docs.medusajs.com/api/admin#claims_postclaimsidoutbounditems).
* *
* You can use this workflow within your customizations or your own custom workflows, allowing you to add outbound items to a claim * You can use this workflow within your customizations or your own custom workflows, allowing you to add outbound items to a claim
* in your custom flows. * in your custom flows.
* *
* @example * @example
* const { result } = await orderClaimAddNewItemWorkflow(container) * const { result } = await orderClaimAddNewItemWorkflow(container)
* .run({ * .run({
@@ -102,9 +102,9 @@ export const orderClaimAddNewItemWorkflowId = "claim-add-new-item"
* ] * ]
* } * }
* }) * })
* *
* @summary * @summary
* *
* Add outbound or new items to a claim. * Add outbound or new items to a claim.
*/ */
export const orderClaimAddNewItemWorkflow = createWorkflow( export const orderClaimAddNewItemWorkflow = createWorkflow(
@@ -239,7 +239,7 @@ function extractShippingOption({ orderPreview, orderClaim, returnId }) {
for (const action of modifiedShippingMethod_.actions) { for (const action of modifiedShippingMethod_.actions) {
if (action.action === ChangeActionType.SHIPPING_ADD) { if (action.action === ChangeActionType.SHIPPING_ADD) {
if (action.return?.id === returnId) { if (!!action.return_id && action.return_id === returnId) {
returnShippingMethod = shippingMethod returnShippingMethod = shippingMethod
} else if (action.claim_id === orderClaim.id) { } else if (action.claim_id === orderClaim.id) {
claimShippingMethod = shippingMethod claimShippingMethod = shippingMethod
@@ -241,10 +241,14 @@ function prepareInventoryUpdate({
}[] = [] }[] = []
const allItems = itemsList ?? order.items const allItems = itemsList ?? order.items
for (const item of allItems) { const itemsToFulfill = allItems.filter((i) => i.id in inputItemsMap)
// iterate over items that are being fulfilled
for (const item of itemsToFulfill) {
const reservation = reservationMap[item.id] const reservation = reservationMap[item.id]
if (!reservation) { if (!reservation) {
if (item.manage_inventory) { if (item.variant?.manage_inventory) {
throw new Error( throw new Error(
`No stock reservation found for item ${item.id} - ${item.title} (${item.variant_title})` `No stock reservation found for item ${item.id} - ${item.title} (${item.variant_title})`
) )
@@ -345,6 +349,7 @@ export const createOrderFulfillmentWorkflow = createWorkflow(
"items.variant.height", "items.variant.height",
"items.variant.width", "items.variant.width",
"items.variant.material", "items.variant.material",
"items.variant_title",
"shipping_address.*", "shipping_address.*",
"shipping_methods.id", "shipping_methods.id",
"shipping_methods.shipping_option_id", "shipping_methods.shipping_option_id",
@@ -394,9 +399,11 @@ export const createOrderFulfillmentWorkflow = createWorkflow(
}).config({ name: "get-shipping-option" }) }).config({ name: "get-shipping-option" })
const lineItemIds = transform( const lineItemIds = transform(
{ order, itemsList: input.items_list }, { order, itemsList: input.items_list, inputItemsMap },
({ order, itemsList }) => { ({ order, itemsList, inputItemsMap }) => {
return (itemsList ?? order.items)!.map((i) => i.id) return (itemsList ?? order.items)!
.map((i) => i.id)
.filter((i) => i in inputItemsMap)
} }
) )
const reservations = useRemoteQueryStep({ const reservations = useRemoteQueryStep({
@@ -129,14 +129,14 @@ function normalizeLineItemsForShipping(
export const getItemTaxLinesStepId = "get-item-tax-lines" export const getItemTaxLinesStepId = "get-item-tax-lines"
/** /**
* This step retrieves the tax lines for an order or cart's line items and shipping methods. * This step retrieves the tax lines for an order or cart's line items and shipping methods.
* *
* :::note * :::note
* *
* You can retrieve an order, cart, item, shipping method, and address details using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query), * You can retrieve an order, cart, item, shipping method, and address details using [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query),
* or [useQueryGraphStep](https://docs.medusajs.com/resources/references/medusa-workflows/steps/useQueryGraphStep). * or [useQueryGraphStep](https://docs.medusajs.com/resources/references/medusa-workflows/steps/useQueryGraphStep).
* *
* ::: * :::
* *
* @example * @example
* const data = getItemTaxLinesStep({ * const data = getItemTaxLinesStep({
* orderOrCart: { * orderOrCart: {
+19
View File
@@ -1,5 +1,24 @@
# @medusajs/framework # @medusajs/framework
## 2.6.1
### Patch Changes
- [#11724](https://github.com/medusajs/medusa/pull/11724) [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e) Thanks [@adrien2p](https://github.com/adrien2p)! - chore(product): Improve product normalization
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- [#11765](https://github.com/medusajs/medusa/pull/11765) [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf) Thanks [@adrien2p](https://github.com/adrien2p)! - Fix(framework): http cors middleware order and options
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a)]:
- @medusajs/types@2.6.1
- @medusajs/orchestration@2.6.1
- @medusajs/workflows-sdk@2.6.1
- @medusajs/modules-sdk@2.6.1
- @medusajs/cli@2.6.1
- @medusajs/utils@2.6.1
- @medusajs/telemetry@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+9 -9
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/framework", "name": "@medusajs/framework",
"version": "2.6.0", "version": "2.6.1",
"description": "Framework", "description": "Framework",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -54,7 +54,7 @@
"test": "jest --runInBand --bail --forceExit -- src/**/__tests__/**/*.ts" "test": "jest --runInBand --bail --forceExit -- src/**/__tests__/**/*.ts"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/cli": "2.6.0", "@medusajs/cli": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/knex": "6.4.3", "@mikro-orm/knex": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -74,12 +74,12 @@
}, },
"dependencies": { "dependencies": {
"@jercle/yargonaut": "^1.1.5", "@jercle/yargonaut": "^1.1.5",
"@medusajs/modules-sdk": "2.6.0", "@medusajs/modules-sdk": "2.6.1",
"@medusajs/orchestration": "2.6.0", "@medusajs/orchestration": "2.6.1",
"@medusajs/telemetry": "2.6.0", "@medusajs/telemetry": "2.6.1",
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@medusajs/utils": "2.6.0", "@medusajs/utils": "2.6.1",
"@medusajs/workflows-sdk": "2.6.0", "@medusajs/workflows-sdk": "2.6.1",
"@opentelemetry/api": "^1.9.0", "@opentelemetry/api": "^1.9.0",
"@types/express": "^4.17.17", "@types/express": "^4.17.17",
"chokidar": "^3.4.2", "chokidar": "^3.4.2",
@@ -98,7 +98,7 @@
"zod": "3.22.4" "zod": "3.22.4"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/cli": "2.6.0", "@medusajs/cli": "2.6.1",
"@mikro-orm/cli": "6.4.3", "@mikro-orm/cli": "6.4.3",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/knex": "6.4.3", "@mikro-orm/knex": "6.4.3",
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/js-sdk # @medusajs/js-sdk
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7)]:
- @medusajs/types@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/js-sdk", "name": "@medusajs/js-sdk",
"version": "2.6.0", "version": "2.6.1",
"description": "SDK for the Medusa API", "description": "SDK for the Medusa API",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/esm/index.js", "module": "dist/esm/index.js",
@@ -35,7 +35,7 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"dependencies": { "dependencies": {
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"fetch-event-stream": "^0.1.5", "fetch-event-stream": "^0.1.5",
"qs": "^6.12.1" "qs": "^6.12.1"
}, },
+11
View File
@@ -1,5 +1,16 @@
# @medusajs/modules-sdk # @medusajs/modules-sdk
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/types@2.6.1
- @medusajs/orchestration@2.6.1
- @medusajs/utils@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/modules-sdk", "name": "@medusajs/modules-sdk",
"version": "2.6.0", "version": "2.6.1",
"description": "SDK for medusa modules", "description": "SDK for medusa modules",
"main": "dist/index.js", "main": "dist/index.js",
"export": { "export": {
@@ -45,9 +45,9 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"dependencies": { "dependencies": {
"@medusajs/orchestration": "2.6.0", "@medusajs/orchestration": "2.6.1",
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@medusajs/utils": "2.6.0" "@medusajs/utils": "2.6.1"
}, },
"peerDependencies": { "peerDependencies": {
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
+10
View File
@@ -1,5 +1,15 @@
# @medusajs/orchestration # @medusajs/orchestration
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/types@2.6.1
- @medusajs/utils@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/orchestration", "name": "@medusajs/orchestration",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa utilities to orchestrate modules", "description": "Medusa utilities to orchestrate modules",
"main": "dist/index.js", "main": "dist/index.js",
"exports": { "exports": {
@@ -39,8 +39,8 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"dependencies": { "dependencies": {
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@medusajs/utils": "2.6.0" "@medusajs/utils": "2.6.1"
}, },
"peerDependencies": { "peerDependencies": {
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
+6
View File
@@ -1,5 +1,11 @@
# @medusajs/types # @medusajs/types
## 2.6.1
### Patch Changes
- [#11715](https://github.com/medusajs/medusa/pull/11715) [`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - chore: improve tax lines
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/types", "name": "@medusajs/types",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa Types definition", "description": "Medusa Types definition",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
+14 -2
View File
@@ -430,12 +430,24 @@ export interface UpdateTaxLineDTO {
/** /**
* The shipping method tax line to be created. * The shipping method tax line to be created.
*/ */
export interface CreateShippingMethodTaxLineDTO extends CreateTaxLineDTO {} export interface CreateShippingMethodTaxLineDTO
extends Omit<CreateTaxLineDTO, "item_id"> {
/**
* The associated shipping method's ID.
*/
shipping_method_id: string
}
/** /**
* The attributes to update in the shipping method tax line. * The attributes to update in the shipping method tax line.
*/ */
export interface UpdateShippingMethodTaxLineDTO extends UpdateTaxLineDTO {} export interface UpdateShippingMethodTaxLineDTO
extends Omit<UpdateTaxLineDTO, "item_id"> {
/**
* The associated shipping method's ID.
*/
shipping_method_id?: string
}
/** /**
* The line item tax line to be created. * The line item tax line to be created.
+119
View File
@@ -2075,4 +2075,123 @@ export interface ICartModuleService extends IModuleService {
config?: RestoreReturn<TReturnableLinkableKeys>, config?: RestoreReturn<TReturnableLinkableKeys>,
sharedContext?: Context sharedContext?: Context
): Promise<Record<TReturnableLinkableKeys, string[]> | void> ): Promise<Record<TReturnableLinkableKeys, string[]> | void>
/**
* This method upserts line item adjustments.
*
* @param {UpsertLineItemAdjustmentDTO[]} data - The line item adjustments to create or update. If the `id` property is provided
* in an object, it means an existing line item adjustment will be updated. Otherwise, a new one is created.
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
* @returns {Promise<LineItemAdjustmentDTO[]>} The line item adjustments.
*
* @example
* const lineItemAdjustments = await orderModuleService.upsertLineItemAdjustments(
* [
* {
* item_id: "1234",
* amount: 10
* },
* {
* id: "123",
* item_id: "4321",
* amount: 20
* }
* ]
* )
*
*/
upsertLineItemAdjustments(
data: UpsertLineItemAdjustmentDTO[],
sharedContext?: Context
): Promise<LineItemAdjustmentDTO[]>
/**
* This method upserts shipping method adjustments.
*
* @param {(CreateShippingMethodAdjustmentDTO | UpdateShippingMethodAdjustmentDTO)[]} data - The shipping method adjustments to be created
* or updated. If an adjustment object has an `id` property, it's updated. Otherwise, a new adjustment is created.
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
* @returns {Promise<ShippingMethodAdjustmentDTO[]>} The shipping method adjustments.
*
* @example
* const shippingMethodAdjustments = await orderModuleService
* .upsertShippingMethodAdjustments(
* [
* {
* shipping_method_id: "123",
* code: "50OFF",
* amount: 5
* },
* {
* id: "321",
* amount: 5
* }
* ]
* )
*
*/
upsertShippingMethodAdjustments(
data: (
| CreateShippingMethodAdjustmentDTO
| UpdateShippingMethodAdjustmentDTO
)[],
sharedContext?: Context
): Promise<ShippingMethodAdjustmentDTO[]>
/**
* This method upserts line item tax lines.
*
* @param {(CreateLineItemTaxLineDTO | UpdateLineItemTaxLineDTO)[]} taxLines - The line item tax lines to create or update. If the
* tax line object has an `id` property, it'll be updated. Otherwise, a tax line is created.
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
* @returns {Promise<LineItemTaxLineDTO[]>} The line item tax lines.
*
* @example
* const lineItemTaxLines = await orderModuleService
* .upsertLineItemTaxLines(
* [
* {
* code: "123",
* rate: 2
* }
* ]
* )
*
*/
upsertLineItemTaxLines(
taxLines: (CreateLineItemTaxLineDTO | UpdateLineItemTaxLineDTO)[],
sharedContext?: Context
): Promise<LineItemTaxLineDTO[]>
/**
* This method upsert shipping method tax lines.
*
* @param {(CreateShippingMethodTaxLineDTO | UpdateShippingMethodTaxLineDTO)[]} taxLines - The shipping method tax lines to create or update.
* If a tax line object has an `id` property, it's updated. Otherwise, a tax line is created.
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
* @returns {Promise<ShippingMethodTaxLineDTO[]>} The shipping method tax lines.
*
* @example
* const shippingMethodTaxLines = await orderModuleService
* .upsertShippingMethodTaxLines(
* [
* {
* code: "123",
* rate: 2
* },
* {
* id: "321",
* rate: 2
* }
* ]
* )
*
*/
upsertShippingMethodTaxLines(
taxLines: (
| CreateShippingMethodTaxLineDTO
| UpdateShippingMethodTaxLineDTO
)[],
sharedContext?: Context
): Promise<ShippingMethodTaxLineDTO[]>
} }
+10
View File
@@ -552,6 +552,16 @@ export interface PaymentSessionDTO {
*/ */
authorized_at?: Date authorized_at?: Date
/**
* When the payment session was created
*/
created_at: Date | string
/**
* When the payment session was updated
*/
updated_at: Date | string
/** /**
* The ID of the associated payment collection. * The ID of the associated payment collection.
*/ */
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/utils # @medusajs/utils
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7)]:
- @medusajs/types@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/utils", "name": "@medusajs/utils",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa utilities functions shared by Medusa core and Modules", "description": "Medusa utilities functions shared by Medusa core and Modules",
"main": "dist/index.js", "main": "dist/index.js",
"exports": { "exports": {
@@ -47,7 +47,7 @@
"@graphql-codegen/typescript": "^4.0.9", "@graphql-codegen/typescript": "^4.0.9",
"@graphql-tools/merge": "^9.0.7", "@graphql-tools/merge": "^9.0.7",
"@graphql-tools/schema": "^10.0.6", "@graphql-tools/schema": "^10.0.6",
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@types/pluralize": "^0.0.33", "@types/pluralize": "^0.0.33",
"bignumber.js": "^9.1.2", "bignumber.js": "^9.1.2",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
+14
View File
@@ -1,5 +1,19 @@
# @medusajs/workflows-sdk # @medusajs/workflows-sdk
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- [#11756](https://github.com/medusajs/medusa/pull/11756) [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a) Thanks [@adrien2p](https://github.com/adrien2p)! - feat(workflows-sdk): Allow when then in parallelize
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/types@2.6.1
- @medusajs/orchestration@2.6.1
- @medusajs/modules-sdk@2.6.1
- @medusajs/utils@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/workflows-sdk", "name": "@medusajs/workflows-sdk",
"version": "2.6.0", "version": "2.6.1",
"description": "Set of workflows tooling for Medusa", "description": "Set of workflows tooling for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"exports": { "exports": {
@@ -40,10 +40,10 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"dependencies": { "dependencies": {
"@medusajs/modules-sdk": "2.6.0", "@medusajs/modules-sdk": "2.6.1",
"@medusajs/orchestration": "2.6.0", "@medusajs/orchestration": "2.6.1",
"@medusajs/types": "2.6.0", "@medusajs/types": "2.6.1",
"@medusajs/utils": "2.6.0", "@medusajs/utils": "2.6.1",
"ulid": "^2.3.0" "ulid": "^2.3.0"
}, },
"peerDependencies": { "peerDependencies": {
@@ -1,5 +1,11 @@
# @medusajs/icons # @medusajs/icons
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/icons", "name": "@medusajs/icons",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa UI React icon library", "description": "Medusa UI React icon library",
"author": "Kasper Kristensen <kasper@medusajs.com>", "author": "Kasper Kristensen <kasper@medusajs.com>",
"license": "MIT", "license": "MIT",
@@ -29,7 +29,7 @@
}, },
"devDependencies": { "devDependencies": {
"@atomico/rollup-plugin-sizes": "^1.1.4", "@atomico/rollup-plugin-sizes": "^1.1.4",
"@medusajs/toolbox": "2.6.0", "@medusajs/toolbox": "2.6.1",
"@rollup/plugin-node-resolve": "^15.1.0", "@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2", "@rollup/plugin-replace": "^5.0.2",
"@testing-library/dom": "^9.3.1", "@testing-library/dom": "^9.3.1",
@@ -1,5 +1,7 @@
# @medusajs/toolbox # @medusajs/toolbox
## 2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@medusajs/toolbox", "name": "@medusajs/toolbox",
"private": true, "private": true,
"version": "2.6.0", "version": "2.6.1",
"description": "CLI tool for importing Figma designs for Medusa UI", "description": "CLI tool for importing Figma designs for Medusa UI",
"license": "MIT", "license": "MIT",
"author": "Kasper Kristensen <kasper@medusajs.com>", "author": "Kasper Kristensen <kasper@medusajs.com>",
@@ -1,5 +1,11 @@
# @medusajs/ui-preset # @medusajs/ui-preset
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/ui-preset", "name": "@medusajs/ui-preset",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa UI preset", "description": "Medusa UI preset",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
@@ -30,7 +30,7 @@
"tailwindcss": ">=3.0.0" "tailwindcss": ">=3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/toolbox": "2.6.0", "@medusajs/toolbox": "2.6.1",
"tailwindcss": "^3.4.1", "tailwindcss": "^3.4.1",
"tsup": "^7.1.0", "tsup": "^7.1.0",
"typescript": "^5.1.6" "typescript": "^5.1.6"
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/ui # @medusajs/ui
## 4.0.7
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861)]:
- @medusajs/icons@2.6.1
## 4.0.6 ## 4.0.6
### Patch Changes ### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/ui", "name": "@medusajs/ui",
"version": "4.0.6", "version": "4.0.7",
"author": "Kasper Kristensen <kasper@medusajs.com>", "author": "Kasper Kristensen <kasper@medusajs.com>",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
@@ -43,7 +43,7 @@
}, },
"devDependencies": { "devDependencies": {
"@faker-js/faker": "^9.2.0", "@faker-js/faker": "^9.2.0",
"@medusajs/ui-preset": "2.6.0", "@medusajs/ui-preset": "2.6.1",
"@storybook/addon-essentials": "^8.3.5", "@storybook/addon-essentials": "^8.3.5",
"@storybook/addon-interactions": "^8.3.5", "@storybook/addon-interactions": "^8.3.5",
"@storybook/addon-links": "^8.3.5", "@storybook/addon-links": "^8.3.5",
@@ -81,7 +81,7 @@
"vitest": "^3.0.5" "vitest": "^3.0.5"
}, },
"dependencies": { "dependencies": {
"@medusajs/icons": "2.6.0", "@medusajs/icons": "2.6.1",
"@tanstack/react-table": "8.20.5", "@tanstack/react-table": "8.20.5",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"copy-to-clipboard": "^3.3.3", "copy-to-clipboard": "^3.3.3",
+2
View File
@@ -1,5 +1,7 @@
# Change Log # Change Log
## 2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/telemetry", "name": "@medusajs/telemetry",
"version": "2.6.0", "version": "2.6.1",
"description": "Telemetry for Medusa", "description": "Telemetry for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"repository": { "repository": {
+10
View File
@@ -1,5 +1,15 @@
# Change Log # Change Log
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`62e429178f3abe0a528f7a574eb6a09ac525bf9c`](https://github.com/medusajs/medusa/commit/62e429178f3abe0a528f7a574eb6a09ac525bf9c), [`90964a404edbb079d7de332a11ab97c4f5643d67`](https://github.com/medusajs/medusa/commit/90964a404edbb079d7de332a11ab97c4f5643d67), [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf), [`2a0bd86204c9dd51a012763016f2de822d3c45b6`](https://github.com/medusajs/medusa/commit/2a0bd86204c9dd51a012763016f2de822d3c45b6)]:
- @medusajs/medusa@2.6.1
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/test-utils", "name": "@medusajs/test-utils",
"version": "2.6.0", "version": "2.6.1",
"description": "Test utils for Medusa", "description": "Test utils for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"repository": { "repository": {
@@ -25,7 +25,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/knex": "6.4.3", "@mikro-orm/knex": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -45,8 +45,8 @@
"randomatic": "^3.1.1" "randomatic": "^3.1.1"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@medusajs/medusa": "2.6.0", "@medusajs/medusa": "2.6.1",
"@mikro-orm/postgresql": "6.4.3", "@mikro-orm/postgresql": "6.4.3",
"awilix": "^8.0.1" "awilix": "^8.0.1"
}, },
+60
View File
@@ -1,5 +1,65 @@
# Change Log # Change Log
## 2.6.1
### Patch Changes
- [#11789](https://github.com/medusajs/medusa/pull/11789) [`62e429178f3abe0a528f7a574eb6a09ac525bf9c`](https://github.com/medusajs/medusa/commit/62e429178f3abe0a528f7a574eb6a09ac525bf9c) Thanks [@kasperkristensen](https://github.com/kasperkristensen)! - fix(medusa): Use correct query config for customer address
- [#11788](https://github.com/medusajs/medusa/pull/11788) [`90964a404edbb079d7de332a11ab97c4f5643d67`](https://github.com/medusajs/medusa/commit/90964a404edbb079d7de332a11ab97c4f5643d67) Thanks [@kasperkristensen](https://github.com/kasperkristensen)! - fix(medusa): Apply middleware to GET customers/:id/addresses/:address_id
- [#11724](https://github.com/medusajs/medusa/pull/11724) [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e) Thanks [@adrien2p](https://github.com/adrien2p)! - chore(product): Improve product normalization
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- [#11759](https://github.com/medusajs/medusa/pull/11759) [`2a0bd86204c9dd51a012763016f2de822d3c45b6`](https://github.com/medusajs/medusa/commit/2a0bd86204c9dd51a012763016f2de822d3c45b6) Thanks [@thetutlage](https://github.com/thetutlage)! - chore: pin swc to 1.5.7
- Updated dependencies [[`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7), [`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`70eaaa91965dbe3a641dc634b4e81069d73846ed`](https://github.com/medusajs/medusa/commit/70eaaa91965dbe3a641dc634b4e81069d73846ed), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf), [`84f991192ec288f90af36c5352448b2785901d1a`](https://github.com/medusajs/medusa/commit/84f991192ec288f90af36c5352448b2785901d1a), [`16d7294de805e314f36b302c7b3bbdb126ae5c96`](https://github.com/medusajs/medusa/commit/16d7294de805e314f36b302c7b3bbdb126ae5c96), [`cc8422d3a163d18492e1bd6de50e0796ca34a41f`](https://github.com/medusajs/medusa/commit/cc8422d3a163d18492e1bd6de50e0796ca34a41f)]:
- @medusajs/core-flows@2.6.1
- @medusajs/cart@2.6.1
- @medusajs/product@2.6.1
- @medusajs/framework@2.6.1
- @medusajs/notification-sendgrid@2.6.1
- @medusajs/fulfillment-manual@2.6.1
- @medusajs/notification-local@2.6.1
- @medusajs/locking-postgres@2.6.1
- @medusajs/auth-emailpass@2.6.1
- @medusajs/payment-stripe@2.6.1
- @medusajs/workflow-engine-inmemory@2.6.1
- @medusajs/locking-redis@2.6.1
- @medusajs/auth-github@2.6.1
- @medusajs/auth-google@2.6.1
- @medusajs/workflow-engine-redis@2.6.1
- @medusajs/file-local@2.6.1
- @medusajs/file-s3@2.6.1
- @medusajs/event-bus-local@2.6.1
- @medusajs/event-bus-redis@2.6.1
- @medusajs/cache-inmemory@2.6.1
- @medusajs/stock-location@2.6.1
- @medusajs/sales-channel@2.6.1
- @medusajs/link-modules@2.6.1
- @medusajs/notification@2.6.1
- @medusajs/admin-bundler@2.6.1
- @medusajs/cache-redis@2.6.1
- @medusajs/fulfillment@2.6.1
- @medusajs/inventory@2.6.1
- @medusajs/promotion@2.6.1
- @medusajs/currency@2.6.1
- @medusajs/customer@2.6.1
- @medusajs/api-key@2.6.1
- @medusajs/locking@2.6.1
- @medusajs/payment@2.6.1
- @medusajs/pricing@2.6.1
- @medusajs/region@2.6.1
- @medusajs/index@2.6.1
- @medusajs/order@2.6.1
- @medusajs/store@2.6.1
- @medusajs/auth@2.6.1
- @medusajs/file@2.6.1
- @medusajs/user@2.6.1
- @medusajs/tax@2.6.1
- @medusajs/telemetry@2.6.1
## 2.6.0 ## 2.6.0
### Minor Changes ### Minor Changes
+46 -46
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/medusa", "name": "@medusajs/medusa",
"version": "2.6.0", "version": "2.6.1",
"description": "Building blocks for digital commerce", "description": "Building blocks for digital commerce",
"main": "dist/index.js", "main": "dist/index.js",
"exports": { "exports": {
@@ -44,7 +44,7 @@
"test:integration": "jest --forceExit -- src/**/integration-tests/**/__tests__/**/*.ts" "test:integration": "jest --forceExit -- src/**/integration-tests/**/__tests__/**/*.ts"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@opentelemetry/api": "^1.9.0", "@opentelemetry/api": "^1.9.0",
"@opentelemetry/instrumentation": "^0.53.0", "@opentelemetry/instrumentation": "^0.53.0",
"@opentelemetry/instrumentation-pg": "^0.44.0", "@opentelemetry/instrumentation-pg": "^0.44.0",
@@ -67,49 +67,49 @@
"dependencies": { "dependencies": {
"@inquirer/checkbox": "^2.3.11", "@inquirer/checkbox": "^2.3.11",
"@inquirer/input": "^2.2.9", "@inquirer/input": "^2.2.9",
"@medusajs/admin-bundler": "2.6.0", "@medusajs/admin-bundler": "2.6.1",
"@medusajs/api-key": "2.6.0", "@medusajs/api-key": "2.6.1",
"@medusajs/auth": "2.6.0", "@medusajs/auth": "2.6.1",
"@medusajs/auth-emailpass": "2.6.0", "@medusajs/auth-emailpass": "2.6.1",
"@medusajs/auth-github": "2.6.0", "@medusajs/auth-github": "2.6.1",
"@medusajs/auth-google": "2.6.0", "@medusajs/auth-google": "2.6.1",
"@medusajs/cache-inmemory": "2.6.0", "@medusajs/cache-inmemory": "2.6.1",
"@medusajs/cache-redis": "2.6.0", "@medusajs/cache-redis": "2.6.1",
"@medusajs/cart": "2.6.0", "@medusajs/cart": "2.6.1",
"@medusajs/core-flows": "2.6.0", "@medusajs/core-flows": "2.6.1",
"@medusajs/currency": "2.6.0", "@medusajs/currency": "2.6.1",
"@medusajs/customer": "2.6.0", "@medusajs/customer": "2.6.1",
"@medusajs/event-bus-local": "2.6.0", "@medusajs/event-bus-local": "2.6.1",
"@medusajs/event-bus-redis": "2.6.0", "@medusajs/event-bus-redis": "2.6.1",
"@medusajs/file": "2.6.0", "@medusajs/file": "2.6.1",
"@medusajs/file-local": "2.6.0", "@medusajs/file-local": "2.6.1",
"@medusajs/file-s3": "2.6.0", "@medusajs/file-s3": "2.6.1",
"@medusajs/fulfillment": "2.6.0", "@medusajs/fulfillment": "2.6.1",
"@medusajs/fulfillment-manual": "2.6.0", "@medusajs/fulfillment-manual": "2.6.1",
"@medusajs/index": "2.6.0", "@medusajs/index": "2.6.1",
"@medusajs/inventory": "2.6.0", "@medusajs/inventory": "2.6.1",
"@medusajs/link-modules": "2.6.0", "@medusajs/link-modules": "2.6.1",
"@medusajs/locking": "2.6.0", "@medusajs/locking": "2.6.1",
"@medusajs/locking-postgres": "2.6.0", "@medusajs/locking-postgres": "2.6.1",
"@medusajs/locking-redis": "2.6.0", "@medusajs/locking-redis": "2.6.1",
"@medusajs/notification": "2.6.0", "@medusajs/notification": "2.6.1",
"@medusajs/notification-local": "2.6.0", "@medusajs/notification-local": "2.6.1",
"@medusajs/notification-sendgrid": "2.6.0", "@medusajs/notification-sendgrid": "2.6.1",
"@medusajs/order": "2.6.0", "@medusajs/order": "2.6.1",
"@medusajs/payment": "2.6.0", "@medusajs/payment": "2.6.1",
"@medusajs/payment-stripe": "2.6.0", "@medusajs/payment-stripe": "2.6.1",
"@medusajs/pricing": "2.6.0", "@medusajs/pricing": "2.6.1",
"@medusajs/product": "2.6.0", "@medusajs/product": "2.6.1",
"@medusajs/promotion": "2.6.0", "@medusajs/promotion": "2.6.1",
"@medusajs/region": "2.6.0", "@medusajs/region": "2.6.1",
"@medusajs/sales-channel": "2.6.0", "@medusajs/sales-channel": "2.6.1",
"@medusajs/stock-location": "2.6.0", "@medusajs/stock-location": "2.6.1",
"@medusajs/store": "2.6.0", "@medusajs/store": "2.6.1",
"@medusajs/tax": "2.6.0", "@medusajs/tax": "2.6.1",
"@medusajs/telemetry": "2.6.0", "@medusajs/telemetry": "2.6.1",
"@medusajs/user": "2.6.0", "@medusajs/user": "2.6.1",
"@medusajs/workflow-engine-inmemory": "2.6.0", "@medusajs/workflow-engine-inmemory": "2.6.1",
"@medusajs/workflow-engine-redis": "2.6.0", "@medusajs/workflow-engine-redis": "2.6.1",
"boxen": "^5.0.1", "boxen": "^5.0.1",
"chalk": "^4.0.0", "chalk": "^4.0.0",
"chokidar": "^3.4.2", "chokidar": "^3.4.2",
@@ -127,7 +127,7 @@
"zod": "3.22.4" "zod": "3.22.4"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/knex": "6.4.3", "@mikro-orm/knex": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -4,17 +4,18 @@ import {
AdminCreateCustomer, AdminCreateCustomer,
AdminCreateCustomerAddress, AdminCreateCustomerAddress,
AdminCustomerAddressesParams, AdminCustomerAddressesParams,
AdminCustomerAddressParams,
AdminCustomerParams, AdminCustomerParams,
AdminCustomersParams, AdminCustomersParams,
AdminUpdateCustomer, AdminUpdateCustomer,
AdminUpdateCustomerAddress, AdminUpdateCustomerAddress,
} from "./validators" } from "./validators"
import { MiddlewareRoute } from "@medusajs/framework/http"
import { import {
validateAndTransformBody, validateAndTransformBody,
validateAndTransformQuery, validateAndTransformQuery,
} from "@medusajs/framework" } from "@medusajs/framework"
import { MiddlewareRoute } from "@medusajs/framework/http"
import { createLinkBody } from "../../utils/validators" import { createLinkBody } from "../../utils/validators"
export const adminCustomerRoutesMiddlewares: MiddlewareRoute[] = [ export const adminCustomerRoutesMiddlewares: MiddlewareRoute[] = [
@@ -71,6 +72,16 @@ export const adminCustomerRoutesMiddlewares: MiddlewareRoute[] = [
), ),
], ],
}, },
{
method: ["GET"],
matcher: "/admin/customers/:id/addresses/:address_id",
middlewares: [
validateAndTransformQuery(
AdminCustomerAddressParams,
QueryConfig.retrieveTransformQueryConfig
),
],
},
{ {
method: ["POST"], method: ["POST"],
matcher: "/admin/customers/:id/addresses/:address_id", matcher: "/admin/customers/:id/addresses/:address_id",
@@ -78,7 +89,7 @@ export const adminCustomerRoutesMiddlewares: MiddlewareRoute[] = [
validateAndTransformBody(AdminUpdateCustomerAddress), validateAndTransformBody(AdminUpdateCustomerAddress),
validateAndTransformQuery( validateAndTransformQuery(
AdminCustomerParams, AdminCustomerParams,
QueryConfig.retrieveTransformQueryConfig QueryConfig.retrieveAddressTransformQueryConfig
), ),
], ],
}, },
@@ -90,6 +90,8 @@ export const AdminCreateCustomerAddress = WithAdditionalData(
export const AdminUpdateCustomerAddress = AdminCreateCustomerAddress export const AdminUpdateCustomerAddress = AdminCreateCustomerAddress
export const AdminCustomerAddressParams = createSelectParams()
export const AdminCustomerAddressesParams = createFindParams({ export const AdminCustomerAddressesParams = createFindParams({
offset: 0, offset: 0,
limit: 50, limit: 50,
@@ -108,6 +110,9 @@ export type AdminCustomerParamsType = z.infer<typeof AdminCustomerParams>
export type AdminCustomersParamsType = z.infer<typeof AdminCustomersParams> export type AdminCustomersParamsType = z.infer<typeof AdminCustomersParams>
export type AdminCreateCustomerType = z.infer<typeof CreateCustomer> export type AdminCreateCustomerType = z.infer<typeof CreateCustomer>
export type AdminUpdateCustomerType = z.infer<typeof UpdateCustomer> export type AdminUpdateCustomerType = z.infer<typeof UpdateCustomer>
export type AdminCustomerAddressParamsType = z.infer<
typeof AdminCustomerAddressParams
>
export type AdminCreateCustomerAddressType = z.infer< export type AdminCreateCustomerAddressType = z.infer<
typeof CreateCustomerAddress typeof CreateCustomerAddress
> >
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/api-key # @medusajs/api-key
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/api-key", "name": "@medusajs/api-key",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa API Key module", "description": "Medusa API Key module",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -36,8 +36,8 @@
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@medusajs/test-utils": "2.6.0", "@medusajs/test-utils": "2.6.1",
"@mikro-orm/cli": "6.4.3", "@mikro-orm/cli": "6.4.3",
"@swc/core": "^1.7.28", "@swc/core": "^1.7.28",
"@swc/jest": "^0.2.36", "@swc/jest": "^0.2.36",
@@ -47,7 +47,7 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
"@mikro-orm/postgresql": "6.4.3", "@mikro-orm/postgresql": "6.4.3",
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/auth # @medusajs/auth
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/auth", "name": "@medusajs/auth",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa Auth module", "description": "Medusa Auth module",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -36,8 +36,8 @@
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@medusajs/test-utils": "2.6.0", "@medusajs/test-utils": "2.6.1",
"@mikro-orm/cli": "6.4.3", "@mikro-orm/cli": "6.4.3",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -50,7 +50,7 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
"@mikro-orm/postgresql": "6.4.3", "@mikro-orm/postgresql": "6.4.3",
@@ -1,5 +1,14 @@
# @medusajs/cache-inmemory # @medusajs/cache-inmemory
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/cache-inmemory", "name": "@medusajs/cache-inmemory",
"version": "2.6.0", "version": "2.6.1",
"description": "In-memory Cache Module for Medusa", "description": "In-memory Cache Module for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"repository": { "repository": {
@@ -23,7 +23,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@swc/core": "^1.7.28", "@swc/core": "^1.7.28",
"@swc/jest": "^0.2.36", "@swc/jest": "^0.2.36",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -36,6 +36,6 @@
"test": "jest --passWithNoTests" "test": "jest --passWithNoTests"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0" "@medusajs/framework": "2.6.1"
} }
} }
@@ -1,5 +1,14 @@
# @medusajs/cache-redis # @medusajs/cache-redis
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/cache-redis", "name": "@medusajs/cache-redis",
"version": "2.6.0", "version": "2.6.1",
"description": "Redis Cache Module for Medusa", "description": "Redis Cache Module for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"repository": { "repository": {
@@ -23,7 +23,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@swc/core": "^1.7.28", "@swc/core": "^1.7.28",
"@swc/jest": "^0.2.36", "@swc/jest": "^0.2.36",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -39,7 +39,7 @@
"ioredis": "^5.4.1" "ioredis": "^5.4.1"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"awilix": "^8.0.1" "awilix": "^8.0.1"
} }
} }
+11
View File
@@ -1,5 +1,16 @@
# @medusajs/cart # @medusajs/cart
## 2.6.1
### Patch Changes
- [#11715](https://github.com/medusajs/medusa/pull/11715) [`b7678983a9b3e5c4d88282054b37b6c517329bd7`](https://github.com/medusajs/medusa/commit/b7678983a9b3e5c4d88282054b37b6c517329bd7) Thanks [@carlos-r-l-rodrigues](https://github.com/carlos-r-l-rodrigues)! - chore: improve tax lines
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
@@ -2272,6 +2272,343 @@ moduleIntegrationTestRunner<ICartModuleService>({
}) })
}) })
describe("setShippingMethodTaxLines", () => {
it("should set shipping item tax lines for a cart", async () => {
const [createdCart] = await service.createCarts([
{
currency_code: "eur",
},
])
const [itemOne] = await service.addShippingMethods(createdCart.id, [
{
name: "test",
amount: 100,
},
])
const [itemTwo] = await service.addShippingMethods(createdCart.id, [
{
name: "test-2",
amount: 200,
},
])
const taxLines = await service.setShippingMethodTaxLines(
createdCart.id,
[
{
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
},
{
shipping_method_id: itemTwo.id,
rate: 20,
code: "TX",
},
]
)
expect(taxLines).toEqual(
expect.arrayContaining([
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
}),
expect.objectContaining({
shipping_method_id: itemTwo.id,
rate: 20,
code: "TX",
}),
])
)
})
it("should replace shipping item tax lines for a cart", async () => {
const [createdCart] = await service.createCarts([
{
currency_code: "eur",
},
])
const [itemOne] = await service.addShippingMethods(createdCart.id, [
{
name: "test",
amount: 100,
},
])
const taxLines = await service.setShippingMethodTaxLines(
createdCart.id,
[
{
shipping_method_id: itemOne.id,
rate: 20.753,
code: "TX",
},
]
)
expect(taxLines).toEqual(
expect.arrayContaining([
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 20.753,
code: "TX",
}),
])
)
await service.setShippingMethodTaxLines(createdCart.id, [
{
shipping_method_id: itemOne.id,
rate: 25.14789,
code: "TX-2",
},
])
const cart = await service.retrieveCart(createdCart.id, {
relations: ["shipping_methods.tax_lines"],
})
expect(cart.shipping_methods).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: itemOne.id,
tax_lines: expect.arrayContaining([
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 25.14789,
code: "TX-2",
}),
]),
}),
])
)
expect(cart.shipping_methods?.length).toBe(1)
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(1)
})
it("should remove all shipping item tax lines for a cart", async () => {
const [createdCart] = await service.createCarts([
{
currency_code: "eur",
},
])
const [itemOne] = await service.addShippingMethods(createdCart.id, [
{
name: "test",
amount: 100,
},
])
const taxLines = await service.setShippingMethodTaxLines(
createdCart.id,
[
{
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
},
]
)
expect(taxLines).toEqual(
expect.arrayContaining([
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
}),
])
)
await service.setShippingMethodTaxLines(createdCart.id, [])
const cart = await service.retrieveCart(createdCart.id, {
relations: ["shipping_methods.tax_lines"],
})
expect(cart.shipping_methods).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: itemOne.id,
tax_lines: [],
}),
])
)
expect(cart.shipping_methods?.length).toBe(1)
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(0)
})
it("should update shipping item tax lines for a cart", async () => {
const [createdCart] = await service.createCarts([
{
currency_code: "eur",
},
])
const [itemOne] = await service.addShippingMethods(createdCart.id, [
{
name: "test",
amount: 100,
},
])
const taxLines = await service.setShippingMethodTaxLines(
createdCart.id,
[
{
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
},
]
)
expect(taxLines).toEqual(
expect.arrayContaining([
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
}),
])
)
await service.setShippingMethodTaxLines(createdCart.id, [
{
id: taxLines[0].id,
shipping_method_id: itemOne.id,
rate: 25,
code: "TX",
},
])
const cart = await service.retrieveCart(createdCart.id, {
relations: ["shipping_methods.tax_lines"],
})
expect(cart.shipping_methods).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: itemOne.id,
tax_lines: [
expect.objectContaining({
id: taxLines[0].id,
shipping_method_id: itemOne.id,
rate: 25,
code: "TX",
}),
],
}),
])
)
expect(cart.shipping_methods?.length).toBe(1)
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(1)
})
it("should remove, update, and create shipping item tax lines for a cart", async () => {
const [createdCart] = await service.createCarts([
{
currency_code: "eur",
},
])
const [itemOne] = await service.addShippingMethods(createdCart.id, [
{
name: "test",
amount: 100,
},
])
const taxLines = await service.setShippingMethodTaxLines(
createdCart.id,
[
{
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
},
{
shipping_method_id: itemOne.id,
rate: 25,
code: "TX",
},
]
)
expect(taxLines).toEqual(
expect.arrayContaining([
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 20,
code: "TX",
}),
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 25,
code: "TX",
}),
])
)
const taxLine = taxLines.find(
(tx) => tx.shipping_method_id === itemOne.id
)
await service.setShippingMethodTaxLines(createdCart.id, [
// update
{
id: taxLine.id,
rate: 40,
code: "TX",
},
// create
{
shipping_method_id: itemOne.id,
rate: 25,
code: "TX-2",
},
// remove: should remove the initial tax line for itemOne
])
const cart = await service.retrieveCart(createdCart.id, {
relations: ["shipping_methods.tax_lines"],
})
expect(cart.shipping_methods).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: itemOne.id,
tax_lines: [
expect.objectContaining({
id: taxLine!.id,
shipping_method_id: itemOne.id,
rate: 40,
code: "TX",
}),
expect.objectContaining({
shipping_method_id: itemOne.id,
rate: 25,
code: "TX-2",
}),
],
}),
])
)
expect(cart.shipping_methods?.length).toBe(1)
expect(cart.shipping_methods?.[0].tax_lines?.length).toBe(2)
})
})
describe("addLineItemAdjustments", () => { describe("addLineItemAdjustments", () => {
it("should add line item tax lines for items in a cart", async () => { it("should add line item tax lines for items in a cart", async () => {
const [createdCart] = await service.createCarts([ const [createdCart] = await service.createCarts([
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/cart", "name": "@medusajs/cart",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa Cart module", "description": "Medusa Cart module",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -36,8 +36,8 @@
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@medusajs/test-utils": "2.6.0", "@medusajs/test-utils": "2.6.1",
"@mikro-orm/cli": "6.4.3", "@mikro-orm/cli": "6.4.3",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -50,7 +50,7 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
"@mikro-orm/postgresql": "6.4.3", "@mikro-orm/postgresql": "6.4.3",
+152 -110
View File
@@ -13,6 +13,7 @@ import {
createRawPropertiesFromBigNumber, createRawPropertiesFromBigNumber,
decorateCartTotals, decorateCartTotals,
deduplicate, deduplicate,
generateEntityId,
InjectManager, InjectManager,
InjectTransactionManager, InjectTransactionManager,
isObject, isObject,
@@ -20,6 +21,7 @@ import {
MedusaContext, MedusaContext,
MedusaError, MedusaError,
ModulesSdkUtils, ModulesSdkUtils,
promiseAll,
} from "@medusajs/framework/utils" } from "@medusajs/framework/utils"
import { import {
Address, Address,
@@ -357,9 +359,7 @@ export default class CartModuleService
const serializedResult = await this.baseRepository_.serialize< const serializedResult = await this.baseRepository_.serialize<
CartTypes.CartDTO[] CartTypes.CartDTO[]
>(result, { >(result)
populate: true,
})
return isString(dataOrIdOrSelector) ? serializedResult[0] : serializedResult return isString(dataOrIdOrSelector) ? serializedResult[0] : serializedResult
} }
@@ -448,10 +448,7 @@ export default class CartModuleService
} }
return await this.baseRepository_.serialize<CartTypes.CartLineItemDTO[]>( return await this.baseRepository_.serialize<CartTypes.CartLineItemDTO[]>(
items, items
{
populate: true,
}
) )
} }
@@ -557,10 +554,7 @@ export default class CartModuleService
) )
return await this.baseRepository_.serialize<CartTypes.CartLineItemDTO[]>( return await this.baseRepository_.serialize<CartTypes.CartLineItemDTO[]>(
items, items
{
populate: true,
}
) )
} }
@@ -718,7 +712,7 @@ export default class CartModuleService
return await this.baseRepository_.serialize< return await this.baseRepository_.serialize<
CartTypes.CartShippingMethodDTO[] CartTypes.CartShippingMethodDTO[]
>(methods, { populate: true }) >(methods)
} }
@InjectTransactionManager() @InjectTransactionManager()
@@ -809,9 +803,79 @@ export default class CartModuleService
return await this.baseRepository_.serialize< return await this.baseRepository_.serialize<
CartTypes.LineItemAdjustmentDTO[] CartTypes.LineItemAdjustmentDTO[]
>(addedAdjustments, { >(addedAdjustments)
populate: true, }
})
@InjectTransactionManager()
async upsertLineItemTaxLines(
taxLines: (
| CartTypes.CreateLineItemTaxLineDTO
| CartTypes.UpdateLineItemTaxLineDTO
)[],
@MedusaContext() sharedContext: Context = {}
): Promise<CartTypes.LineItemTaxLineDTO[]> {
const result = await this.lineItemTaxLineService_.upsert(
taxLines as CartTypes.UpdateLineItemTaxLineDTO[],
sharedContext
)
return await this.baseRepository_.serialize<CartTypes.LineItemTaxLineDTO[]>(
result
)
}
@InjectTransactionManager()
async upsertLineItemAdjustments(
adjustments: (
| CartTypes.CreateLineItemAdjustmentDTO
| CartTypes.UpdateLineItemAdjustmentDTO
)[],
@MedusaContext() sharedContext: Context = {}
): Promise<CartTypes.LineItemAdjustmentDTO[]> {
let result = await this.lineItemAdjustmentService_.upsert(
adjustments,
sharedContext
)
return await this.baseRepository_.serialize<
CartTypes.LineItemAdjustmentDTO[]
>(result)
}
@InjectTransactionManager()
async upsertShippingMethodTaxLines(
taxLines: (
| CartTypes.CreateShippingMethodTaxLineDTO
| CartTypes.UpdateShippingMethodTaxLineDTO
)[],
@MedusaContext() sharedContext: Context = {}
): Promise<CartTypes.ShippingMethodTaxLineDTO[]> {
const result = await this.shippingMethodTaxLineService_.upsert(
taxLines as UpdateShippingMethodTaxLineDTO[],
sharedContext
)
return await this.baseRepository_.serialize<
CartTypes.ShippingMethodTaxLineDTO[]
>(result)
}
@InjectTransactionManager()
async upsertShippingMethodAdjustments(
adjustments: (
| CartTypes.CreateShippingMethodAdjustmentDTO
| CartTypes.UpdateShippingMethodAdjustmentDTO
)[],
@MedusaContext() sharedContext: Context = {}
): Promise<CartTypes.ShippingMethodAdjustmentDTO[]> {
const result = await this.shippingMethodAdjustmentService_.upsert(
adjustments,
sharedContext
)
return await this.baseRepository_.serialize<
CartTypes.ShippingMethodAdjustmentDTO[]
>(result)
} }
@InjectTransactionManager() @InjectTransactionManager()
@@ -864,9 +928,7 @@ export default class CartModuleService
return await this.baseRepository_.serialize< return await this.baseRepository_.serialize<
CartTypes.LineItemAdjustmentDTO[] CartTypes.LineItemAdjustmentDTO[]
>(result, { >(result)
populate: true,
})
} }
@InjectTransactionManager() @InjectTransactionManager()
@@ -921,9 +983,7 @@ export default class CartModuleService
return await this.baseRepository_.serialize< return await this.baseRepository_.serialize<
CartTypes.ShippingMethodAdjustmentDTO[] CartTypes.ShippingMethodAdjustmentDTO[]
>(result, { >(result)
populate: true,
})
} }
async addShippingMethodAdjustments( async addShippingMethodAdjustments(
@@ -986,17 +1046,13 @@ export default class CartModuleService
if (isObject(cartIdOrData)) { if (isObject(cartIdOrData)) {
return await this.baseRepository_.serialize<CartTypes.ShippingMethodAdjustmentDTO>( return await this.baseRepository_.serialize<CartTypes.ShippingMethodAdjustmentDTO>(
addedAdjustments[0], addedAdjustments[0],
{ {}
populate: true,
}
) )
} }
return await this.baseRepository_.serialize< return await this.baseRepository_.serialize<
CartTypes.ShippingMethodAdjustmentDTO[] CartTypes.ShippingMethodAdjustmentDTO[]
>(addedAdjustments, { >(addedAdjustments)
populate: true,
})
} }
addLineItemTaxLines( addLineItemTaxLines(
@@ -1046,9 +1102,7 @@ export default class CartModuleService
const serialized = await this.baseRepository_.serialize< const serialized = await this.baseRepository_.serialize<
CartTypes.LineItemTaxLineDTO[] CartTypes.LineItemTaxLineDTO[]
>(addedTaxLines, { >(addedTaxLines)
populate: true,
})
if (isObject(cartIdOrData)) { if (isObject(cartIdOrData)) {
return serialized[0] return serialized[0]
@@ -1066,49 +1120,44 @@ export default class CartModuleService
)[], )[],
@MedusaContext() sharedContext: Context = {} @MedusaContext() sharedContext: Context = {}
): Promise<CartTypes.LineItemTaxLineDTO[]> { ): Promise<CartTypes.LineItemTaxLineDTO[]> {
const cart = await this.retrieveCart( const normalizedTaxLines = (
cartId, taxLines as CartTypes.UpdateLineItemTaxLineDTO[]
{ select: ["id"], relations: ["items.tax_lines"] }, ).map((taxLine) => {
sharedContext // Pre generate the id so that we can optimized the actions below
) taxLine.id = generateEntityId(taxLine.id, "calitxl")
return taxLine
const existingTaxLines = await this.listLineItemTaxLines(
{ item: { cart_id: cart.id } },
{ select: ["id"] },
sharedContext
)
const taxLinesSet = new Set(
taxLines
.map((taxLine) => (taxLine as CartTypes.UpdateLineItemTaxLineDTO)?.id)
.filter(Boolean)
)
const toDelete: CartTypes.LineItemTaxLineDTO[] = []
// From the existing tax lines, find the ones that are not passed in taxLines
existingTaxLines.forEach((taxLine: CartTypes.LineItemTaxLineDTO) => {
if (!taxLinesSet.has(taxLine.id)) {
toDelete.push(taxLine)
}
}) })
if (toDelete.length) { const taxLineIdsSet = new Set<string>(
await this.lineItemTaxLineService_.softDelete( normalizedTaxLines.map(
toDelete.map((taxLine) => taxLine!.id), (taxLine) => (taxLine as CartTypes.UpdateLineItemTaxLineDTO)?.id
sharedContext
) )
)
const deleteConstraints: {
id?: {
$nin: string[]
}
item: { cart_id: string }
} = {
item: { cart_id: cartId },
} }
const result = taxLines.length if (taxLineIdsSet.size) {
? await this.lineItemTaxLineService_.upsert(taxLines, sharedContext) deleteConstraints.id = {
: [] $nin: Array.from(taxLineIdsSet),
}
}
const [result] = await promiseAll([
normalizedTaxLines.length
? this.lineItemTaxLineService_.upsert(normalizedTaxLines, sharedContext)
: [],
this.lineItemTaxLineService_.softDelete(deleteConstraints, sharedContext),
])
return await this.baseRepository_.serialize<CartTypes.LineItemTaxLineDTO[]>( return await this.baseRepository_.serialize<CartTypes.LineItemTaxLineDTO[]>(
result, result
{
populate: true,
}
) )
} }
@@ -1159,10 +1208,7 @@ export default class CartModuleService
const serialized = const serialized =
await this.baseRepository_.serialize<CartTypes.ShippingMethodTaxLineDTO>( await this.baseRepository_.serialize<CartTypes.ShippingMethodTaxLineDTO>(
addedTaxLines[0], addedTaxLines[0]
{
populate: true,
}
) )
if (isObject(cartIdOrData)) { if (isObject(cartIdOrData)) {
@@ -1181,53 +1227,49 @@ export default class CartModuleService
)[], )[],
@MedusaContext() sharedContext: Context = {} @MedusaContext() sharedContext: Context = {}
): Promise<CartTypes.ShippingMethodTaxLineDTO[]> { ): Promise<CartTypes.ShippingMethodTaxLineDTO[]> {
const cart = await this.retrieveCart( const normalizedTaxLines = (
cartId, taxLines as CartTypes.UpdateShippingMethodTaxLineDTO[]
{ select: ["id"], relations: ["shipping_methods.tax_lines"] }, ).map((taxLine) => {
sharedContext taxLine.id = generateEntityId(taxLine.id, "casmtxl")
) return taxLine
const existingTaxLines = await this.listShippingMethodTaxLines(
{ shipping_method: { cart_id: cart.id } },
{ select: ["id"] },
sharedContext
)
const taxLinesSet = new Set(
taxLines
.map(
(taxLine) => (taxLine as CartTypes.UpdateShippingMethodTaxLineDTO)?.id
)
.filter(Boolean)
)
const toDelete: CartTypes.ShippingMethodTaxLineDTO[] = []
// From the existing tax lines, find the ones that are not passed in taxLines
existingTaxLines.forEach((taxLine: CartTypes.ShippingMethodTaxLineDTO) => {
if (!taxLinesSet.has(taxLine.id)) {
toDelete.push(taxLine)
}
}) })
if (toDelete.length) { const taxLineIdsSet = new Set(
await this.shippingMethodTaxLineService_.softDelete( normalizedTaxLines.map(
toDelete.map((taxLine) => taxLine!.id), (taxLine) => (taxLine as CartTypes.UpdateShippingMethodTaxLineDTO)?.id
sharedContext
) )
)
const deleteConstraints: {
id?: {
$nin: string[]
}
shipping_method: { cart_id: string }
} = {
shipping_method: { cart_id: cartId },
} }
const result = taxLines.length if (taxLineIdsSet.size) {
? await this.shippingMethodTaxLineService_.upsert( deleteConstraints.id = {
taxLines as UpdateShippingMethodTaxLineDTO[], $nin: Array.from(taxLineIdsSet),
sharedContext }
) }
: []
const [result] = await promiseAll([
taxLines.length
? this.shippingMethodTaxLineService_.upsert(
taxLines as UpdateShippingMethodTaxLineDTO[],
sharedContext
)
: [],
this.shippingMethodTaxLineService_.softDelete(
deleteConstraints,
sharedContext
),
])
return await this.baseRepository_.serialize< return await this.baseRepository_.serialize<
CartTypes.ShippingMethodTaxLineDTO[] CartTypes.ShippingMethodTaxLineDTO[]
>(result, { >(result)
populate: true,
})
} }
} }
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/currency # @medusajs/currency
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/currency", "name": "@medusajs/currency",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa Currency module", "description": "Medusa Currency module",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -36,8 +36,8 @@
"orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear" "orm:cache:clear": " MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@medusajs/test-utils": "2.6.0", "@medusajs/test-utils": "2.6.1",
"@mikro-orm/cli": "6.4.3", "@mikro-orm/cli": "6.4.3",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -50,7 +50,7 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
"@mikro-orm/postgresql": "6.4.3", "@mikro-orm/postgresql": "6.4.3",
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/customer # @medusajs/customer
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/customer", "name": "@medusajs/customer",
"version": "2.6.0", "version": "2.6.1",
"description": "Medusa Customer module", "description": "Medusa Customer module",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@@ -37,8 +37,8 @@
"orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear" "orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
}, },
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@medusajs/test-utils": "2.6.0", "@medusajs/test-utils": "2.6.1",
"@mikro-orm/cli": "6.4.3", "@mikro-orm/cli": "6.4.3",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
@@ -51,7 +51,7 @@
"typescript": "^5.6.2" "typescript": "^5.6.2"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@mikro-orm/core": "6.4.3", "@mikro-orm/core": "6.4.3",
"@mikro-orm/migrations": "6.4.3", "@mikro-orm/migrations": "6.4.3",
"@mikro-orm/postgresql": "6.4.3", "@mikro-orm/postgresql": "6.4.3",
@@ -1,5 +1,14 @@
# @medusajs/event-bus-local # @medusajs/event-bus-local
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/event-bus-local", "name": "@medusajs/event-bus-local",
"version": "2.6.0", "version": "2.6.1",
"description": "Local Event Bus Module for Medusa", "description": "Local Event Bus Module for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"files": [ "files": [
@@ -23,7 +23,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@swc/core": "^1.7.28", "@swc/core": "^1.7.28",
"@swc/jest": "^0.2.36", "@swc/jest": "^0.2.36",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -39,6 +39,6 @@
"ulid": "^2.3.0" "ulid": "^2.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0" "@medusajs/framework": "2.6.1"
} }
} }
@@ -1,5 +1,14 @@
# @medusajs/event-bus-redis # @medusajs/event-bus-redis
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
### Patch Changes ### Patch Changes
@@ -1,6 +1,6 @@
{ {
"name": "@medusajs/event-bus-redis", "name": "@medusajs/event-bus-redis",
"version": "2.6.0", "version": "2.6.1",
"description": "Redis Event Bus Module for Medusa", "description": "Redis Event Bus Module for Medusa",
"main": "dist/index.js", "main": "dist/index.js",
"files": [ "files": [
@@ -23,7 +23,7 @@
"author": "Medusa", "author": "Medusa",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"@swc/core": "^1.7.28", "@swc/core": "^1.7.28",
"@swc/jest": "^0.2.36", "@swc/jest": "^0.2.36",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -40,7 +40,7 @@
"ioredis": "^5.4.1" "ioredis": "^5.4.1"
}, },
"peerDependencies": { "peerDependencies": {
"@medusajs/framework": "2.6.0", "@medusajs/framework": "2.6.1",
"awilix": "^8.0.1" "awilix": "^8.0.1"
} }
} }
+9
View File
@@ -1,5 +1,14 @@
# @medusajs/product # @medusajs/product
## 2.6.1
### Patch Changes
- [#11738](https://github.com/medusajs/medusa/pull/11738) [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861) Thanks [@olivermrbl](https://github.com/olivermrbl)! - chore: Remove ranges on Medusa packages
- Updated dependencies [[`cc1309d3709b251683a0cda0ced448f8bf9f514e`](https://github.com/medusajs/medusa/commit/cc1309d3709b251683a0cda0ced448f8bf9f514e), [`3b470f41427e487c68f89b8ee8155de716ffe861`](https://github.com/medusajs/medusa/commit/3b470f41427e487c68f89b8ee8155de716ffe861), [`20cd59e622463fbd46506275648ce681869adcdf`](https://github.com/medusajs/medusa/commit/20cd59e622463fbd46506275648ce681869adcdf)]:
- @medusajs/framework@2.6.1
## 2.6.0 ## 2.6.0
## 2.5.1 ## 2.5.1
Loaded 100 of 574 files, more files were not shown because too many files have changed in this diff. Show more