diff --git a/integration-tests/api/__tests__/store/cart.js b/integration-tests/api/__tests__/store/cart.js index 9b5ceeb22b..71c036b72d 100644 --- a/integration-tests/api/__tests__/store/cart.js +++ b/integration-tests/api/__tests__/store/cart.js @@ -5,8 +5,10 @@ const { Region } = require("@medusajs/medusa"); const setupServer = require("../../../helpers/setup-server"); const { useApi } = require("../../../helpers/use-api"); const { initDb } = require("../../../helpers/use-db"); +const { expectRelations } = require("../../helpers/expect-relations"); const cartSeeder = require("../../helpers/cart-seeder"); +const productSeeder = require("../../helpers/product-seeder"); jest.setTimeout(30000); @@ -330,4 +332,56 @@ describe("/store/carts", () => { expect(response.status).toEqual(200); }); }); + + describe("get-cart returns expected relations", () => { + beforeEach(async () => { + try { + await productSeeder(dbConnection); + await cartSeeder(dbConnection); + } catch (err) { + console.log(err); + throw err; + } + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await doAfterEach(manager); + }); + + + it("returns default relations", async () => { + const api = useApi(); + + const expectedRelations = [ + "gift_cards", + "region", + "items.variant.prices", + "payment", + "shipping_address", + "billing_address", + "region.countries", + "region.payment_providers", + "payment_sessions", + "shipping_methods.shipping_option", + "discounts", + ] + + await api.post("/store/carts/test-cart/line-items", { + quantity: 1, + variant_id: "test-variant", + }) + + // await api.post("/store/carts/test-cart/shipping-methods", { + // option_id: "test-option" + // }) + + + const response = await api.get("/store/carts/test-cart") + + console.log(response.data.cart) + expectRelations(expectedRelations, response.data.cart) + + }); + }); }); diff --git a/integration-tests/api/helpers/expect-relations.js b/integration-tests/api/helpers/expect-relations.js new file mode 100644 index 0000000000..6d9a8850dc --- /dev/null +++ b/integration-tests/api/helpers/expect-relations.js @@ -0,0 +1,20 @@ +const { expect } = require("@jest/globals") + +export function expectRelations(expected, actual){ + expected.forEach(a => expectRelations_(a, actual)) +} + +function expectRelations_(expected, actual){ + const items = expected.split("."); + let data_ = actual; + + for(const i in items){ + data_ = data_[items[i]]; + + if(data_ instanceof Array && data_.length > 0) { + data_ = data_[0]; + } + + expect(data_).toBeDefined(); + } +} diff --git a/integration-tests/api/helpers/product-seeder.js b/integration-tests/api/helpers/product-seeder.js index 79e6f4eb97..e2cfda35a2 100644 --- a/integration-tests/api/helpers/product-seeder.js +++ b/integration-tests/api/helpers/product-seeder.js @@ -6,6 +6,7 @@ const { Product, ShippingProfile, ProductVariant, + MoneyAmount, Image, } = require("@medusajs/medusa"); @@ -74,7 +75,14 @@ module.exports = async (connection, data = {}) => { inventory_quantity: 10, title: "Test variant", product_id: "test-product", - prices: [{ id: "test-price", currency_code: "usd", amount: 100 }], + prices: [], options: [{ id: "test-variant-option", value: "Default variant" }], }); + + await manager.insert(MoneyAmount, { + variant_id: "test-variant", + id: "test-price", + currency_code: "usd", + amount: 100, + }); }; diff --git a/integration-tests/helpers/use-db.js b/integration-tests/helpers/use-db.js index c9be67e7ae..74e420ec24 100644 --- a/integration-tests/helpers/use-db.js +++ b/integration-tests/helpers/use-db.js @@ -36,8 +36,10 @@ module.exports = { ); const databaseName = "medusa-integration"; - await createDatabase({ databaseName }); + await createDatabase({ databaseName }); + + const connection = await createConnection({ type: "postgres", url: "postgres://localhost/medusa-integration", @@ -66,6 +68,7 @@ module.exports = { instance.setDb(dbConnection); return dbConnection; + }, useDb: function () { return instance; diff --git a/packages/babel-preset-medusa-package/CHANGELOG.md b/packages/babel-preset-medusa-package/CHANGELOG.md index dbe30dd940..03b163462e 100644 --- a/packages/babel-preset-medusa-package/CHANGELOG.md +++ b/packages/babel-preset-medusa-package/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.9](https://github.com/medusajs/medusa/compare/babel-preset-medusa-package@1.1.8...babel-preset-medusa-package@1.1.9) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.8](https://github.com/medusajs/medusa/compare/babel-preset-medusa-package@1.1.7...babel-preset-medusa-package@1.1.8) (2021-06-09) **Note:** Version bump only for package babel-preset-medusa-package diff --git a/packages/babel-preset-medusa-package/package.json b/packages/babel-preset-medusa-package/package.json index 2b5c0ae92f..2f152d5b00 100644 --- a/packages/babel-preset-medusa-package/package.json +++ b/packages/babel-preset-medusa-package/package.json @@ -1,6 +1,6 @@ { "name": "babel-preset-medusa-package", - "version": "1.1.8", + "version": "1.1.9", "author": "Sebastian Rindom ", "repository": { "type": "git", @@ -26,5 +26,5 @@ "engines": { "node": ">=10.14.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-cli/CHANGELOG.md b/packages/medusa-cli/CHANGELOG.md index 3256e9b141..3e742de2c5 100644 --- a/packages/medusa-cli/CHANGELOG.md +++ b/packages/medusa-cli/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.10](https://github.com/medusajs/medusa/compare/@medusajs/medusa-cli@1.1.9...@medusajs/medusa-cli@1.1.10) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.9](https://github.com/medusajs/medusa/compare/@medusajs/medusa-cli@1.1.8...@medusajs/medusa-cli@1.1.9) (2021-06-09) diff --git a/packages/medusa-cli/package.json b/packages/medusa-cli/package.json index bc9afb2a08..9ac628cb6a 100644 --- a/packages/medusa-cli/package.json +++ b/packages/medusa-cli/package.json @@ -1,6 +1,6 @@ { "name": "@medusajs/medusa-cli", - "version": "1.1.9", + "version": "1.1.10", "description": "Command Line interface for Medusa Commerce", "main": "dist/index.js", "bin": { @@ -54,5 +54,5 @@ "resolve-cwd": "^3.0.0", "yargs": "^15.3.1" }, - "gitHead": "43a3e5680387cdeddb0d92a1bb0762235f15ca9a" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-core-utils/CHANGELOG.md b/packages/medusa-core-utils/CHANGELOG.md index f26f0bfbec..2290c30303 100644 --- a/packages/medusa-core-utils/CHANGELOG.md +++ b/packages/medusa-core-utils/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.15](https://github.com/medusajs/medusa/compare/medusa-core-utils@1.1.14...medusa-core-utils@1.1.15) (2021-06-22) + + +### Bug Fixes + +* adds transformer to map field names to field_id names ([88d96a2](https://github.com/medusajs/medusa/commit/88d96a29fd8dbc44ed7ba25154850d417577acad)) +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.14](https://github.com/medusajs/medusa/compare/medusa-core-utils@1.1.13...medusa-core-utils@1.1.14) (2021-06-09) **Note:** Version bump only for package medusa-core-utils diff --git a/packages/medusa-core-utils/package.json b/packages/medusa-core-utils/package.json index 6c1b410c9f..a252d0ad66 100644 --- a/packages/medusa-core-utils/package.json +++ b/packages/medusa-core-utils/package.json @@ -1,6 +1,6 @@ { "name": "medusa-core-utils", - "version": "1.1.14", + "version": "1.1.15", "description": "Core utils for Medusa", "main": "dist/index.js", "repository": { @@ -33,5 +33,5 @@ "joi": "^17.3.0", "joi-objectid": "^3.0.1" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-dev-cli/CHANGELOG.md b/packages/medusa-dev-cli/CHANGELOG.md index 64e8464f5f..7003507c04 100644 --- a/packages/medusa-dev-cli/CHANGELOG.md +++ b/packages/medusa-dev-cli/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.0.14](https://github.com/medusajs/medusa/compare/medusa-dev-cli@0.0.13...medusa-dev-cli@0.0.14) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [0.0.13](https://github.com/medusajs/medusa/compare/medusa-dev-cli@0.0.12...medusa-dev-cli@0.0.13) (2021-06-09) **Note:** Version bump only for package medusa-dev-cli diff --git a/packages/medusa-dev-cli/package.json b/packages/medusa-dev-cli/package.json index aa0bc061b1..79c30ae436 100644 --- a/packages/medusa-dev-cli/package.json +++ b/packages/medusa-dev-cli/package.json @@ -1,7 +1,7 @@ { "name": "medusa-dev-cli", "description": "CLI helpers for contributors working on Medusa", - "version": "0.0.13", + "version": "0.0.14", "author": "Sebastian Rindom ", "bin": { "medusa-dev": "./dist/index.js" @@ -24,7 +24,7 @@ "devDependencies": { "@babel/cli": "^7.12.1", "@babel/core": "^7.12.3", - "babel-preset-medusa-package": "^1.1.8", + "babel-preset-medusa-package": "^1.1.9", "cross-env": "^7.0.3" }, "homepage": "https://github.com/medusajs/medusa/tree/master/packages/medusa-dev-cli#readme", @@ -47,5 +47,5 @@ "engines": { "node": ">=12.13.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-file-spaces/CHANGELOG.md b/packages/medusa-file-spaces/CHANGELOG.md index 1260d136b4..da3099a5a0 100644 --- a/packages/medusa-file-spaces/CHANGELOG.md +++ b/packages/medusa-file-spaces/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-file-spaces@1.1.17...medusa-file-spaces@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-file-spaces@1.1.16...medusa-file-spaces@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-file-spaces diff --git a/packages/medusa-file-spaces/package.json b/packages/medusa-file-spaces/package.json index 848758b47d..ec87a9414f 100644 --- a/packages/medusa-file-spaces/package.json +++ b/packages/medusa-file-spaces/package.json @@ -1,6 +1,6 @@ { "name": "medusa-file-spaces", - "version": "1.1.17", + "version": "1.1.18", "description": "Digital Ocean Spaces file connector for Medusa", "main": "index.js", "repository": { @@ -40,9 +40,9 @@ "aws-sdk": "^2.710.0", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17", + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18", "stripe": "^8.50.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-fulfillment-manual/CHANGELOG.md b/packages/medusa-fulfillment-manual/CHANGELOG.md index b2fded00ee..47ea1f5423 100644 --- a/packages/medusa-fulfillment-manual/CHANGELOG.md +++ b/packages/medusa-fulfillment-manual/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.15](https://github.com/medusajs/medusa/compare/medusa-fulfillment-manual@1.1.14...medusa-fulfillment-manual@1.1.15) (2021-06-22) + + +### Bug Fixes + +* Adds manual return option ([#290](https://github.com/medusajs/medusa/issues/290)) ([350603a](https://github.com/medusajs/medusa/commit/350603ac579027bd96d6855b9a78750a46d857a3)) +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.14](https://github.com/medusajs/medusa/compare/medusa-fulfillment-manual@1.1.13...medusa-fulfillment-manual@1.1.14) (2021-06-09) **Note:** Version bump only for package medusa-fulfillment-manual diff --git a/packages/medusa-fulfillment-manual/package.json b/packages/medusa-fulfillment-manual/package.json index b3e64b0294..6655e85d2e 100644 --- a/packages/medusa-fulfillment-manual/package.json +++ b/packages/medusa-fulfillment-manual/package.json @@ -1,6 +1,6 @@ { "name": "medusa-fulfillment-manual", - "version": "1.1.14", + "version": "1.1.15", "description": "A manual fulfillment provider for Medusa", "main": "index.js", "repository": { @@ -36,7 +36,7 @@ "@babel/plugin-transform-instanceof": "^7.8.3", "@babel/runtime": "^7.7.6", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14" + "medusa-core-utils": "^1.1.15" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-fulfillment-webshipper/CHANGELOG.md b/packages/medusa-fulfillment-webshipper/CHANGELOG.md index 9d36930538..1dbf7b4575 100644 --- a/packages/medusa-fulfillment-webshipper/CHANGELOG.md +++ b/packages/medusa-fulfillment-webshipper/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-fulfillment-webshipper@1.1.18...medusa-fulfillment-webshipper@1.1.19) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-fulfillment-webshipper@1.1.17...medusa-fulfillment-webshipper@1.1.18) (2021-06-09) **Note:** Version bump only for package medusa-fulfillment-webshipper diff --git a/packages/medusa-fulfillment-webshipper/package.json b/packages/medusa-fulfillment-webshipper/package.json index 0f3c6f0c3b..52967e55ac 100644 --- a/packages/medusa-fulfillment-webshipper/package.json +++ b/packages/medusa-fulfillment-webshipper/package.json @@ -1,6 +1,6 @@ { "name": "medusa-fulfillment-webshipper", - "version": "1.1.18", + "version": "1.1.19", "description": "Webshipper Fulfillment provider for Medusa", "main": "index.js", "repository": { @@ -37,7 +37,7 @@ "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14" + "medusa-core-utils": "^1.1.15" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-interfaces/CHANGELOG.md b/packages/medusa-interfaces/CHANGELOG.md index ba8c268074..1638f9e298 100644 --- a/packages/medusa-interfaces/CHANGELOG.md +++ b/packages/medusa-interfaces/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.16](https://github.com/medusajs/medusa/compare/medusa-interfaces@1.1.15...medusa-interfaces@1.1.16) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.15](https://github.com/medusajs/medusa/compare/medusa-interfaces@1.1.14...medusa-interfaces@1.1.15) (2021-06-09) **Note:** Version bump only for package medusa-interfaces diff --git a/packages/medusa-interfaces/package.json b/packages/medusa-interfaces/package.json index 273529fb9f..2ac14b16b4 100644 --- a/packages/medusa-interfaces/package.json +++ b/packages/medusa-interfaces/package.json @@ -1,6 +1,6 @@ { "name": "medusa-interfaces", - "version": "1.1.15", + "version": "1.1.16", "description": "Core interfaces for Medusa", "main": "dist/index.js", "repository": { @@ -35,7 +35,7 @@ "typeorm": "0.x" }, "dependencies": { - "medusa-core-utils": "^1.1.14" + "medusa-core-utils": "^1.1.15" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-payment-adyen/CHANGELOG.md b/packages/medusa-payment-adyen/CHANGELOG.md index d468e7b1bf..d9d7a689f4 100644 --- a/packages/medusa-payment-adyen/CHANGELOG.md +++ b/packages/medusa-payment-adyen/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.19...medusa-payment-adyen@1.1.20) (2021-06-23) + +**Note:** Version bump only for package medusa-payment-adyen + + + + + +## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.18...medusa-payment-adyen@1.1.19) (2021-06-23) + +**Note:** Version bump only for package medusa-payment-adyen + + + + + +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.17...medusa-payment-adyen@1.1.18) (2021-06-22) + + +### Bug Fixes + +* mobile pay support ([91511cb](https://github.com/medusajs/medusa/commit/91511cbdf8bc66f5688a36ecf56edb16a220cc82)) +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.16...medusa-payment-adyen@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-payment-adyen diff --git a/packages/medusa-payment-adyen/package.json b/packages/medusa-payment-adyen/package.json index 5fb8637b79..79e0152a3a 100644 --- a/packages/medusa-payment-adyen/package.json +++ b/packages/medusa-payment-adyen/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-adyen", - "version": "1.1.17", + "version": "1.1.20", "description": "Adyen Payment provider for Medusa Commerce", "main": "index.js", "repository": { @@ -24,7 +24,7 @@ "cross-env": "^7.0.2", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.17" + "medusa-test-utils": "^1.1.18" }, "scripts": { "build": "babel src -d .", @@ -42,7 +42,7 @@ "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14" + "medusa-core-utils": "^1.1.15" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-payment-adyen/src/services/adyen.js b/packages/medusa-payment-adyen/src/services/adyen.js index 1eed6bb0c9..54b6f172dc 100644 --- a/packages/medusa-payment-adyen/src/services/adyen.js +++ b/packages/medusa-payment-adyen/src/services/adyen.js @@ -60,7 +60,14 @@ class AdyenService extends BaseService { config, }) - client.setEnvironment(this.options_.environment) + if (this.options_.live_endpoint_prefix) { + client.setEnvironment( + this.options_.environment, + this.options_.live_endpoint_prefix + ) + } else { + client.setEnvironment(this.options_.environment) + } return client } diff --git a/packages/medusa-payment-klarna/CHANGELOG.md b/packages/medusa-payment-klarna/CHANGELOG.md index ab1a439df6..296703649e 100644 --- a/packages/medusa-payment-klarna/CHANGELOG.md +++ b/packages/medusa-payment-klarna/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-payment-klarna@1.1.18...medusa-payment-klarna@1.1.20) (2021-06-22) + + +### Bug Fixes + +* address fix ([dbf9ba7](https://github.com/medusajs/medusa/commit/dbf9ba7b632570e5fc8efde522837fa44bbf5427)) + + + ## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-payment-klarna@1.1.17...medusa-payment-klarna@1.1.18) (2021-06-09) **Note:** Version bump only for package medusa-payment-klarna diff --git a/packages/medusa-payment-klarna/package.json b/packages/medusa-payment-klarna/package.json index cc342b5101..90ff2cb578 100644 --- a/packages/medusa-payment-klarna/package.json +++ b/packages/medusa-payment-klarna/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-klarna", - "version": "1.1.18", + "version": "1.1.20", "description": "Klarna Payment provider for Medusa Commerce", "main": "index.js", "repository": { @@ -40,8 +40,8 @@ "axios": "^0.21.0", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17" + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-payment-paypal/CHANGELOG.md b/packages/medusa-payment-paypal/CHANGELOG.md index c66ffe8368..c0ff6fdce8 100644 --- a/packages/medusa-payment-paypal/CHANGELOG.md +++ b/packages/medusa-payment-paypal/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.19](https://github.com/medusajs/medusa/compare/medusa-payment-paypal@1.0.18...medusa-payment-paypal@1.0.19) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.0.18](https://github.com/medusajs/medusa/compare/medusa-payment-paypal@1.0.17...medusa-payment-paypal@1.0.18) (2021-06-09) **Note:** Version bump only for package medusa-payment-paypal diff --git a/packages/medusa-payment-paypal/package.json b/packages/medusa-payment-paypal/package.json index d61aa19646..ad5fe00e24 100644 --- a/packages/medusa-payment-paypal/package.json +++ b/packages/medusa-payment-paypal/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-paypal", - "version": "1.0.18", + "version": "1.0.19", "description": "Paypal Payment provider for Meduas Commerce", "main": "index.js", "repository": { @@ -26,8 +26,8 @@ "cross-env": "^5.2.1", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-interfaces": "^1.1.15", - "medusa-test-utils": "^1.1.17" + "medusa-interfaces": "^1.1.16", + "medusa-test-utils": "^1.1.18" }, "scripts": { "build": "babel src -d . --ignore **/__tests__,**/__mocks__", @@ -42,7 +42,7 @@ "@paypal/checkout-server-sdk": "^1.0.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14" + "medusa-core-utils": "^1.1.15" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-payment-stripe/CHANGELOG.md b/packages/medusa-payment-stripe/CHANGELOG.md index 8f6cdc1947..ef163922ff 100644 --- a/packages/medusa-payment-stripe/CHANGELOG.md +++ b/packages/medusa-payment-stripe/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-payment-stripe@1.1.17...medusa-payment-stripe@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + +### Features + +* **stripe:** adds giropay provider ([5873682](https://github.com/medusajs/medusa/commit/58736824911d4fa1b252e93313c71de607405eb9)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-payment-stripe@1.1.16...medusa-payment-stripe@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-payment-stripe diff --git a/packages/medusa-payment-stripe/package.json b/packages/medusa-payment-stripe/package.json index 8e39688cca..cd7a033a32 100644 --- a/packages/medusa-payment-stripe/package.json +++ b/packages/medusa-payment-stripe/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-stripe", - "version": "1.1.17", + "version": "1.1.18", "description": "Stripe Payment provider for Meduas Commerce", "main": "index.js", "repository": { @@ -26,7 +26,7 @@ "cross-env": "^5.2.1", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.17" + "medusa-test-utils": "^1.1.18" }, "scripts": { "build": "babel src -d . --ignore **/__tests__", @@ -40,8 +40,8 @@ "dependencies": { "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", + "medusa-core-utils": "^1.1.15", "stripe": "^8.50.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-add-ons/CHANGELOG.md b/packages/medusa-plugin-add-ons/CHANGELOG.md index f9c90b921f..d6e4960ba9 100644 --- a/packages/medusa-plugin-add-ons/CHANGELOG.md +++ b/packages/medusa-plugin-add-ons/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-add-ons@1.1.17...medusa-plugin-add-ons@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-add-ons@1.1.16...medusa-plugin-add-ons@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-plugin-add-ons diff --git a/packages/medusa-plugin-add-ons/package.json b/packages/medusa-plugin-add-ons/package.json index 4b4994f1bf..939742c457 100644 --- a/packages/medusa-plugin-add-ons/package.json +++ b/packages/medusa-plugin-add-ons/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-add-ons", - "version": "1.1.17", + "version": "1.1.18", "description": "Add-on plugin for Medusa Commerce", "main": "index.js", "repository": { @@ -25,7 +25,7 @@ "cross-env": "^7.0.2", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.17" + "medusa-test-utils": "^1.1.18" }, "scripts": { "build": "babel src -d . --ignore **/__tests__", @@ -37,8 +37,8 @@ "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", + "medusa-core-utils": "^1.1.15", "redis": "^3.0.2" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-brightpearl/CHANGELOG.md b/packages/medusa-plugin-brightpearl/CHANGELOG.md index 725f267363..3b45645dd6 100644 --- a/packages/medusa-plugin-brightpearl/CHANGELOG.md +++ b/packages/medusa-plugin-brightpearl/CHANGELOG.md @@ -3,6 +3,36 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.23](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.22...medusa-plugin-brightpearl@1.1.23) (2021-06-24) + +**Note:** Version bump only for package medusa-plugin-brightpearl + + + + + +## [1.1.22](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.21...medusa-plugin-brightpearl@1.1.22) (2021-06-23) + + +### Bug Fixes + +* **brightpearl:** chunked product availabilities in sync ([fd82de6](https://github.com/medusajs/medusa/commit/fd82de6ef919a53dc25d387a809f7eea998b5e04)) + + + + + +## [1.1.21](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.20...medusa-plugin-brightpearl@1.1.21) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.19...medusa-plugin-brightpearl@1.1.20) (2021-06-09) **Note:** Version bump only for package medusa-plugin-brightpearl diff --git a/packages/medusa-plugin-brightpearl/package.json b/packages/medusa-plugin-brightpearl/package.json index 7f87a2548f..229d7f63a5 100644 --- a/packages/medusa-plugin-brightpearl/package.json +++ b/packages/medusa-plugin-brightpearl/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-brightpearl", - "version": "1.1.20", + "version": "1.1.23", "description": "Brightpearl plugin for Medusa Commerce", "main": "index.js", "repository": { @@ -27,7 +27,7 @@ "cross-env": "^7.0.2", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.17", + "medusa-test-utils": "^1.1.18", "prettier": "^2.0.5" }, "scripts": { @@ -43,8 +43,8 @@ "axios": "^0.19.2", "axios-rate-limit": "^1.2.1", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", + "medusa-core-utils": "^1.1.15", "randomatic": "^3.1.1" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-brightpearl/src/api/index.js b/packages/medusa-plugin-brightpearl/src/api/index.js index c32337a134..b20726fac3 100644 --- a/packages/medusa-plugin-brightpearl/src/api/index.js +++ b/packages/medusa-plugin-brightpearl/src/api/index.js @@ -22,10 +22,10 @@ export default (container) => { app.post("/brightpearl/goods-out", bodyParser.json(), async (req, res) => { const { id, lifecycle_event } = req.body - const brightpearlService = req.scope.resolve("brightpearlService") + const eventBusService = req.scope.resolve("eventBusService") if (lifecycle_event === "created") { - await brightpearlService.createFulfillmentFromGoodsOut(id) + eventBusService.emit("brightpearl.goods_out_note", { id }) } res.sendStatus(200) diff --git a/packages/medusa-plugin-brightpearl/src/services/brightpearl.js b/packages/medusa-plugin-brightpearl/src/services/brightpearl.js index 8d4c197bcb..c2d273ed8d 100644 --- a/packages/medusa-plugin-brightpearl/src/services/brightpearl.js +++ b/packages/medusa-plugin-brightpearl/src/services/brightpearl.js @@ -140,13 +140,31 @@ class BrightpearlService extends BaseService { } if (bpProducts.length) { - const productRange = bpProducts - .map(({ productId }) => productId) - .join(",") + let availabilities = {} + const perChunk = 100 + const chunkedProducts = bpProducts.reduce((resultArray, item, index) => { + const chunkIndex = Math.floor(index / perChunk) - const availabilities = await client.products.retrieveAvailability( - productRange - ) + if (!resultArray[chunkIndex]) { + resultArray[chunkIndex] = [] // start a new chunk + } + + resultArray[chunkIndex].push(item) + + return resultArray + }, []) + + // For large product catalogues we get 414 Too long URI so to avoid this + // we chunk things up + for (const chunk of chunkedProducts) { + const productRange = chunk.map(({ productId }) => productId).join(",") + + const chunkAvails = await client.products.retrieveAvailability( + productRange + ) + + availabilities = Object.assign(availabilities, chunkAvails) + } return Promise.all( bpProducts.map(async (bpProduct) => { @@ -1110,55 +1128,63 @@ class BrightpearlService extends BaseService { } async createFulfillmentFromGoodsOut(id) { - const client = await this.getClient() + await this.manager_.transaction(async (m) => { + const client = await this.getClient() - // Get goods out and associated order - const goodsOut = await client.warehouses.retrieveGoodsOutNote(id) - const order = await client.orders.retrieve(goodsOut.orderId) + // Get goods out and associated order + const goodsOut = await client.warehouses.retrieveGoodsOutNote(id) + const order = await client.orders.retrieve(goodsOut.orderId) - // Only relevant for medusa orders check channel id - if (order.channelId !== parseInt(this.options.channel_id)) { - return - } - - // Combine the line items that we are going to create a fulfillment for - const lines = Object.keys(goodsOut.orderRows) - .map((key) => { - const row = order.rows.find((r) => r.id == key) - if (row) { - return { - item_id: row.externalRef, - - // Brightpearl sometimes gives multiple order row entries - quantity: goodsOut.orderRows[key].reduce( - (sum, next) => sum + next.quantity, - 0 - ), - } - } - - return null - }) - .filter((i) => !!i) - - // Orders with a concatenated externalReference are swap orders - const [_, partId] = order.externalRef.split(".") - - if (partId) { - if (partId.startsWith("claim")) { - return this.claimService_.createFulfillment(partId, { - goods_out_note: id, - }) - } else { - return this.swapService_.createFulfillment(partId, { - goods_out_note: id, - }) + // Only relevant for medusa orders check channel id + if (order.channelId !== parseInt(this.options.channel_id)) { + return } - } - return this.orderService_.createFulfillment(order.externalRef, lines, { - goods_out_note: id, - }) + // Combine the line items that we are going to create a fulfillment for + const lines = Object.keys(goodsOut.orderRows) + .map((key) => { + const row = order.rows.find((r) => r.id == key) + if (row) { + return { + item_id: row.externalRef, + + // Brightpearl sometimes gives multiple order row entries + quantity: goodsOut.orderRows[key].reduce( + (sum, next) => sum + next.quantity, + 0 + ), + } + } + + return null + }) + .filter((i) => !!i) + + // Orders with a concatenated externalReference are swap orders + const [_, partId] = order.externalRef.split(".") + + if (partId) { + if (partId.startsWith("claim")) { + return this.claimService_ + .withTransaction(m) + .createFulfillment(partId, { + goods_out_note: id, + }) + } else { + return this.swapService_ + .withTransaction(m) + .createFulfillment(partId, { + goods_out_note: id, + }) + } + } + + return this.orderService_ + .withTransaction(m) + .createFulfillment(order.externalRef, lines, { + goods_out_note: id, + }) + }, "SERIALIZABLE") } async createCustomer(fromOrder) { diff --git a/packages/medusa-plugin-brightpearl/src/subscribers/order.js b/packages/medusa-plugin-brightpearl/src/subscribers/order.js index d2b89bb247..61caed781e 100644 --- a/packages/medusa-plugin-brightpearl/src/subscribers/order.js +++ b/packages/medusa-plugin-brightpearl/src/subscribers/order.js @@ -19,6 +19,11 @@ class OrderSubscriber { eventBusService.subscribe("order.placed", this.sendToBrightpearl) + eventBusService.subscribe( + "brightpearl.goods_out_note", + this.createFulfillmentFromGoodsOut + ) + eventBusService.subscribe("claim.created", this.registerClaim) eventBusService.subscribe("order.refund_created", this.registerRefund) @@ -50,6 +55,10 @@ class OrderSubscriber { return this.brightpearlService_.createPayment(id) } + createFulfillmentFromGoodsOut = ({ id }) => { + return this.brightpearlService_.createFulfillmentFromGoodsOut(id) + } + registerSwapPayment = async (data) => { return this.registerSwap({ id: data.id, swap_id: data.id }) } diff --git a/packages/medusa-plugin-contentful/CHANGELOG.md b/packages/medusa-plugin-contentful/CHANGELOG.md index 0be5b3b6b8..6026f8b7a8 100644 --- a/packages/medusa-plugin-contentful/CHANGELOG.md +++ b/packages/medusa-plugin-contentful/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.19...medusa-plugin-contentful@1.1.20) (2021-06-24) + +**Note:** Version bump only for package medusa-plugin-contentful + + + + + +## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.18...medusa-plugin-contentful@1.1.19) (2021-06-22) + + +### Bug Fixes + +* region sync ([8e29e6e](https://github.com/medusajs/medusa/commit/8e29e6e63c305b684a37d817b504b3e471d697bd)) +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) +* typo ([4b6445a](https://github.com/medusajs/medusa/commit/4b6445a1b0509dd0c00f240a4ae287caf1a46ebf)) +* wrong custom field ([05bda95](https://github.com/medusajs/medusa/commit/05bda956d97bd0a5f2c43f4c727be569170168c6)) + + + + + ## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.17...medusa-plugin-contentful@1.1.18) (2021-06-09) **Note:** Version bump only for package medusa-plugin-contentful diff --git a/packages/medusa-plugin-contentful/package.json b/packages/medusa-plugin-contentful/package.json index ad2c2cfc98..776428a163 100644 --- a/packages/medusa-plugin-contentful/package.json +++ b/packages/medusa-plugin-contentful/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-contentful", - "version": "1.1.18", + "version": "1.1.20", "description": "Contentful plugin for Medusa Commerce", "main": "index.js", "repository": { @@ -39,9 +39,9 @@ "body-parser": "^1.19.0", "contentful-management": "^5.27.1", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17", + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18", "redis": "^3.0.2" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-contentful/src/services/contentful.js b/packages/medusa-plugin-contentful/src/services/contentful.js index ab28b058db..edd046c8a5 100644 --- a/packages/medusa-plugin-contentful/src/services/contentful.js +++ b/packages/medusa-plugin-contentful/src/services/contentful.js @@ -297,9 +297,6 @@ class ContentfulService extends BaseService { } ) - // const ignoreIds = (await this.getIgnoreIds_("product_variant")) || [] - // ignoreIds.push(v.id) - // this.redis_.set("product_variant_ignore_ids", JSON.stringify(ignoreIds)) return result } catch (error) { throw error @@ -311,7 +308,7 @@ class ContentfulService extends BaseService { .then(() => true) .catch(() => false) if (!hasType) { - return + return Promise.resolve() } try { const r = await this.regionService_.retrieve(region.id, { @@ -353,7 +350,7 @@ class ContentfulService extends BaseService { .then(() => true) .catch(() => false) if (!hasType) { - return + return Promise.resolve() } const updateFields = [ @@ -435,13 +432,13 @@ class ContentfulService extends BaseService { const found = data.fields.find((f) => updateFields.includes(f)) if (!found) { - return + return Promise.resolve() } try { const ignore = await this.shouldIgnore_(data.id, "contentful") if (ignore) { - return + return Promise.resolve() } const p = await this.productService_.retrieve(data.id, { @@ -594,14 +591,14 @@ class ContentfulService extends BaseService { if (variant.fields) { const found = variant.fields.find((f) => updateFields.includes(f)) if (!found) { - return + return Promise.resolve() } } try { const ignore = await this.shouldIgnore_(variant.id, "contentful") if (ignore) { - return + return Promise.resolve() } const environment = await this.getContentfulEnvironment_() diff --git a/packages/medusa-plugin-discount-generator/CHANGELOG.md b/packages/medusa-plugin-discount-generator/CHANGELOG.md index a19a7f8fec..113cf83875 100644 --- a/packages/medusa-plugin-discount-generator/CHANGELOG.md +++ b/packages/medusa-plugin-discount-generator/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.9](https://github.com/medusajs/medusa/compare/medusa-plugin-discount-generator@1.1.8...medusa-plugin-discount-generator@1.1.9) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.8](https://github.com/medusajs/medusa/compare/medusa-plugin-discount-generator@1.1.7...medusa-plugin-discount-generator@1.1.8) (2021-06-09) **Note:** Version bump only for package medusa-plugin-discount-generator diff --git a/packages/medusa-plugin-discount-generator/package.json b/packages/medusa-plugin-discount-generator/package.json index 4b12758e75..74a2f5c467 100644 --- a/packages/medusa-plugin-discount-generator/package.json +++ b/packages/medusa-plugin-discount-generator/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-discount-generator", - "version": "1.1.8", + "version": "1.1.9", "main": "index.js", "license": "MIT", "author": "Sebastian Rindom", @@ -40,5 +40,5 @@ "medusa-core-utils": "^0.1.27", "randomatic": "^3.1.1" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-economic/CHANGELOG.md b/packages/medusa-plugin-economic/CHANGELOG.md index 1758a421ea..712a421b8e 100644 --- a/packages/medusa-plugin-economic/CHANGELOG.md +++ b/packages/medusa-plugin-economic/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-economic@1.1.17...medusa-plugin-economic@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-economic@1.1.16...medusa-plugin-economic@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-plugin-economic diff --git a/packages/medusa-plugin-economic/package-lock.json b/packages/medusa-plugin-economic/package-lock.json index e217073df5..3536bdebc3 100644 --- a/packages/medusa-plugin-economic/package-lock.json +++ b/packages/medusa-plugin-economic/package-lock.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-economic", - "version": "1.1.17", + "version": "1.1.18", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/medusa-plugin-economic/package.json b/packages/medusa-plugin-economic/package.json index ddfdead8c1..d6f3e6fb02 100644 --- a/packages/medusa-plugin-economic/package.json +++ b/packages/medusa-plugin-economic/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-economic", - "version": "1.1.17", + "version": "1.1.18", "description": "E-conomic financial reporting", "main": "index.js", "repository": { @@ -39,9 +39,9 @@ "axios": "^0.19.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17", + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18", "moment": "^2.27.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-ip-lookup/CHANGELOG.md b/packages/medusa-plugin-ip-lookup/CHANGELOG.md index 00f24d8ed3..9fffeb920c 100644 --- a/packages/medusa-plugin-ip-lookup/CHANGELOG.md +++ b/packages/medusa-plugin-ip-lookup/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.9](https://github.com/medusajs/medusa/compare/medusa-plugin-ip-lookup@1.1.8...medusa-plugin-ip-lookup@1.1.9) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.8](https://github.com/medusajs/medusa/compare/medusa-plugin-ip-lookup@1.1.7...medusa-plugin-ip-lookup@1.1.8) (2021-06-09) **Note:** Version bump only for package medusa-plugin-ip-lookup diff --git a/packages/medusa-plugin-ip-lookup/package.json b/packages/medusa-plugin-ip-lookup/package.json index f3b538c9e6..53b61db761 100644 --- a/packages/medusa-plugin-ip-lookup/package.json +++ b/packages/medusa-plugin-ip-lookup/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-ip-lookup", - "version": "1.1.8", + "version": "1.1.9", "description": "IP lookup middleware for Medusa core", "main": "dist/index.js", "repository": { @@ -35,5 +35,5 @@ "axios": "^0.20.0", "mongoose": "^5.8.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-mailchimp/CHANGELOG.md b/packages/medusa-plugin-mailchimp/CHANGELOG.md index 0fbc598341..dd7ad578a5 100644 --- a/packages/medusa-plugin-mailchimp/CHANGELOG.md +++ b/packages/medusa-plugin-mailchimp/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-mailchimp@1.1.17...medusa-plugin-mailchimp@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-mailchimp@1.1.16...medusa-plugin-mailchimp@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-plugin-mailchimp diff --git a/packages/medusa-plugin-mailchimp/package.json b/packages/medusa-plugin-mailchimp/package.json index b730d382ae..0182100ab3 100644 --- a/packages/medusa-plugin-mailchimp/package.json +++ b/packages/medusa-plugin-mailchimp/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-mailchimp", - "version": "1.1.17", + "version": "1.1.18", "description": "Mailchimp newsletter subscriptions", "main": "index.js", "repository": { @@ -40,8 +40,8 @@ "cors": "^2.8.5", "express": "^4.17.1", "mailchimp-api-v3": "^1.14.0", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17" + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-permissions/CHANGELOG.md b/packages/medusa-plugin-permissions/CHANGELOG.md index 1742bc5d97..f03dce18e0 100644 --- a/packages/medusa-plugin-permissions/CHANGELOG.md +++ b/packages/medusa-plugin-permissions/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-permissions@1.1.17...medusa-plugin-permissions@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-permissions@1.1.16...medusa-plugin-permissions@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-plugin-permissions diff --git a/packages/medusa-plugin-permissions/package.json b/packages/medusa-plugin-permissions/package.json index adebd10435..b5e7844e74 100644 --- a/packages/medusa-plugin-permissions/package.json +++ b/packages/medusa-plugin-permissions/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-permissions", - "version": "1.1.17", + "version": "1.1.18", "description": "Role permission for Medusa core", "main": "dist/index.js", "repository": { @@ -32,9 +32,9 @@ "medusa-interfaces": "1.x" }, "dependencies": { - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17", + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18", "mongoose": "^5.8.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-restock-notification/CHANGELOG.md b/packages/medusa-plugin-restock-notification/CHANGELOG.md index 15e17e341c..f4645769fc 100644 --- a/packages/medusa-plugin-restock-notification/CHANGELOG.md +++ b/packages/medusa-plugin-restock-notification/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.0.11](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.10...medusa-plugin-restock-notification@0.0.11) (2021-06-24) + +**Note:** Version bump only for package medusa-plugin-restock-notification + + + + + +## [0.0.10](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.9...medusa-plugin-restock-notification@0.0.10) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [0.0.9](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.8...medusa-plugin-restock-notification@0.0.9) (2021-06-09) **Note:** Version bump only for package medusa-plugin-restock-notification diff --git a/packages/medusa-plugin-restock-notification/package.json b/packages/medusa-plugin-restock-notification/package.json index 1f97aa89cf..b679ec492d 100644 --- a/packages/medusa-plugin-restock-notification/package.json +++ b/packages/medusa-plugin-restock-notification/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-restock-notification", - "version": "0.0.9", + "version": "0.0.11", "main": "index.js", "repository": { "type": "git", @@ -14,11 +14,11 @@ "@babel/core": "^7.7.5", "@babel/plugin-transform-typescript": "^7.13.0", "@babel/preset-typescript": "^7.12.7", - "babel-preset-medusa-package": "^1.1.8", + "babel-preset-medusa-package": "^1.1.9", "cross-env": "^5.2.1", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.17", + "medusa-test-utils": "^1.1.18", "pg": "^8.5.1", "ulid": "^2.3.0" }, @@ -36,7 +36,7 @@ "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14" + "medusa-core-utils": "^1.1.15" }, - "gitHead": "df18c053cb9ec801dd3cb54b0a60a4b9ce8e23c4" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-restock-notification/src/subscribers/index.js b/packages/medusa-plugin-restock-notification/src/subscribers/index.js index 53b3e1dbd7..e97e5293c6 100644 --- a/packages/medusa-plugin-restock-notification/src/subscribers/index.js +++ b/packages/medusa-plugin-restock-notification/src/subscribers/index.js @@ -19,6 +19,8 @@ class VariantSubscriber { .triggerRestock(id) ) } + + return Promise.resolve() } } diff --git a/packages/medusa-plugin-segment/CHANGELOG.md b/packages/medusa-plugin-segment/CHANGELOG.md index dc785f5f2f..bd68732692 100644 --- a/packages/medusa-plugin-segment/CHANGELOG.md +++ b/packages/medusa-plugin-segment/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.21](https://github.com/medusajs/medusa/compare/medusa-plugin-segment@1.1.20...medusa-plugin-segment@1.1.21) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.20](https://github.com/medusajs/medusa/compare/medusa-plugin-segment@1.1.19...medusa-plugin-segment@1.1.20) (2021-06-09) **Note:** Version bump only for package medusa-plugin-segment diff --git a/packages/medusa-plugin-segment/package.json b/packages/medusa-plugin-segment/package.json index 6db34925bc..2b998c5f9a 100644 --- a/packages/medusa-plugin-segment/package.json +++ b/packages/medusa-plugin-segment/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-segment", - "version": "1.1.20", + "version": "1.1.21", "description": "Segment Analytics", "main": "index.js", "repository": { @@ -39,8 +39,8 @@ "axios": "^0.19.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17" + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-sendgrid/CHANGELOG.md b/packages/medusa-plugin-sendgrid/CHANGELOG.md index 88ebb5c580..568a9394c3 100644 --- a/packages/medusa-plugin-sendgrid/CHANGELOG.md +++ b/packages/medusa-plugin-sendgrid/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.19](https://github.com/medusajs/medusa/compare/medusa-plugin-sendgrid@1.1.18...medusa-plugin-sendgrid@1.1.19) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-sendgrid@1.1.17...medusa-plugin-sendgrid@1.1.18) (2021-06-09) **Note:** Version bump only for package medusa-plugin-sendgrid diff --git a/packages/medusa-plugin-sendgrid/package.json b/packages/medusa-plugin-sendgrid/package.json index 4bc8e618ae..0ccbb5df2b 100644 --- a/packages/medusa-plugin-sendgrid/package.json +++ b/packages/medusa-plugin-sendgrid/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-sendgrid", - "version": "1.1.18", + "version": "1.1.19", "description": "SendGrid transactional emails", "main": "index.js", "repository": { @@ -39,8 +39,8 @@ "@sendgrid/mail": "^7.1.1", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17" + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-slack-notification/CHANGELOG.md b/packages/medusa-plugin-slack-notification/CHANGELOG.md index 64421426e0..a9def493d4 100644 --- a/packages/medusa-plugin-slack-notification/CHANGELOG.md +++ b/packages/medusa-plugin-slack-notification/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-slack-notification@1.1.17...medusa-plugin-slack-notification@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-slack-notification@1.1.16...medusa-plugin-slack-notification@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-plugin-slack-notification diff --git a/packages/medusa-plugin-slack-notification/package-lock.json b/packages/medusa-plugin-slack-notification/package-lock.json index e217073df5..3536bdebc3 100644 --- a/packages/medusa-plugin-slack-notification/package-lock.json +++ b/packages/medusa-plugin-slack-notification/package-lock.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-economic", - "version": "1.1.17", + "version": "1.1.18", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/medusa-plugin-slack-notification/package.json b/packages/medusa-plugin-slack-notification/package.json index ca9b6bf977..dab0f27bcf 100644 --- a/packages/medusa-plugin-slack-notification/package.json +++ b/packages/medusa-plugin-slack-notification/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-slack-notification", - "version": "1.1.17", + "version": "1.1.18", "description": "Slack notifications", "main": "index.js", "repository": { @@ -39,9 +39,9 @@ "axios": "^0.19.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17", + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18", "moment": "^2.27.0" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-twilio-sms/CHANGELOG.md b/packages/medusa-plugin-twilio-sms/CHANGELOG.md index e31d19eb7e..80827b3545 100644 --- a/packages/medusa-plugin-twilio-sms/CHANGELOG.md +++ b/packages/medusa-plugin-twilio-sms/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-twilio-sms@1.1.17...medusa-plugin-twilio-sms@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-twilio-sms@1.1.16...medusa-plugin-twilio-sms@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-plugin-twilio-sms diff --git a/packages/medusa-plugin-twilio-sms/package.json b/packages/medusa-plugin-twilio-sms/package.json index 44b2ffb60f..a2a2195da9 100644 --- a/packages/medusa-plugin-twilio-sms/package.json +++ b/packages/medusa-plugin-twilio-sms/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-twilio-sms", - "version": "1.1.17", + "version": "1.1.18", "main": "index.js", "repository": { "type": "git", @@ -35,9 +35,9 @@ "dependencies": { "@babel/plugin-transform-classes": "^7.9.5", "body-parser": "^1.19.0", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17", + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18", "twilio": "^3.49.1" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-plugin-wishlist/CHANGELOG.md b/packages/medusa-plugin-wishlist/CHANGELOG.md index 6b092f32bb..52dc992c4a 100644 --- a/packages/medusa-plugin-wishlist/CHANGELOG.md +++ b/packages/medusa-plugin-wishlist/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.17...medusa-plugin-wishlist@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.16...medusa-plugin-wishlist@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-plugin-wishlist diff --git a/packages/medusa-plugin-wishlist/package.json b/packages/medusa-plugin-wishlist/package.json index e5357edc54..1df58054a3 100644 --- a/packages/medusa-plugin-wishlist/package.json +++ b/packages/medusa-plugin-wishlist/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-wishlist", - "version": "1.1.17", + "version": "1.1.18", "description": "Provides /customers/:id/wishlist to add items to a customr's wishlist", "main": "index.js", "repository": { @@ -37,8 +37,8 @@ "dependencies": { "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17" + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa-test-utils/CHANGELOG.md b/packages/medusa-test-utils/CHANGELOG.md index d08bf0db4e..49e40910c0 100644 --- a/packages/medusa-test-utils/CHANGELOG.md +++ b/packages/medusa-test-utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.18](https://github.com/medusajs/medusa/compare/medusa-test-utils@1.1.17...medusa-test-utils@1.1.18) (2021-06-22) + + +### Bug Fixes + +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.17](https://github.com/medusajs/medusa/compare/medusa-test-utils@1.1.16...medusa-test-utils@1.1.17) (2021-06-09) **Note:** Version bump only for package medusa-test-utils diff --git a/packages/medusa-test-utils/package.json b/packages/medusa-test-utils/package.json index c75702292f..b2f2da4c4c 100644 --- a/packages/medusa-test-utils/package.json +++ b/packages/medusa-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "medusa-test-utils", - "version": "1.1.17", + "version": "1.1.18", "description": "Test utils for Medusa", "main": "dist/index.js", "repository": { @@ -29,8 +29,8 @@ }, "dependencies": { "@babel/plugin-transform-classes": "^7.9.5", - "medusa-core-utils": "^1.1.14", + "medusa-core-utils": "^1.1.15", "randomatic": "^3.1.1" }, - "gitHead": "982da259ed93fe1b618800c8693a5c9dfe312532" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa/CHANGELOG.md b/packages/medusa/CHANGELOG.md index 88fe6587e5..b21e35c0ca 100644 --- a/packages/medusa/CHANGELOG.md +++ b/packages/medusa/CHANGELOG.md @@ -3,6 +3,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.28](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.27...@medusajs/medusa@1.1.28) (2021-06-24) + +**Note:** Version bump only for package @medusajs/medusa + + + + + +## [1.1.27](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.26...@medusajs/medusa@1.1.27) (2021-06-22) + + +### Bug Fixes + +* adds transformer to map field names to field_id names ([88d96a2](https://github.com/medusajs/medusa/commit/88d96a29fd8dbc44ed7ba25154850d417577acad)) +* giftcard-order relation ([c88c407](https://github.com/medusajs/medusa/commit/c88c4070960ad1a8126e65b1e9f60d7ba929246a)) +* lint ([5829550](https://github.com/medusajs/medusa/commit/58295505178209d511046089d736395d121b9732)) +* mobile pay support ([91511cb](https://github.com/medusajs/medusa/commit/91511cbdf8bc66f5688a36ecf56edb16a220cc82)) +* region sync ([8e29e6e](https://github.com/medusajs/medusa/commit/8e29e6e63c305b684a37d817b504b3e471d697bd)) +* release assist ([668e8a7](https://github.com/medusajs/medusa/commit/668e8a740200847fc2a41c91d2979097f1392532)) + + + + + ## [1.1.26](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.25...@medusajs/medusa@1.1.26) (2021-06-10) diff --git a/packages/medusa/package.json b/packages/medusa/package.json index 2d565acc81..9c1bd33d79 100644 --- a/packages/medusa/package.json +++ b/packages/medusa/package.json @@ -1,6 +1,6 @@ { "name": "@medusajs/medusa", - "version": "1.1.26", + "version": "1.1.28", "description": "E-commerce for JAMstack", "main": "dist/index.js", "repository": { @@ -17,11 +17,11 @@ "@babel/cli": "^7.14.3", "@babel/core": "^7.14.3", "@babel/preset-typescript": "^7.13.0", - "babel-preset-medusa-package": "^1.1.8", + "babel-preset-medusa-package": "^1.1.9", "cross-env": "^5.2.1", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-interfaces": "^1.1.15", + "medusa-interfaces": "^1.1.16", "nodemon": "^2.0.1", "prettier": "^1.19.1", "supertest": "^4.0.2" @@ -59,8 +59,8 @@ "joi": "^17.3.0", "joi-objectid": "^3.0.1", "jsonwebtoken": "^8.5.1", - "medusa-core-utils": "^1.1.14", - "medusa-test-utils": "^1.1.17", + "medusa-core-utils": "^1.1.15", + "medusa-test-utils": "^1.1.18", "morgan": "^1.9.1", "multer": "^1.4.2", "passport": "^0.4.0", @@ -78,5 +78,5 @@ "uuid": "^8.3.1", "winston": "^3.2.1" }, - "gitHead": "245ccdc4774965cdd27d4dbdb5fbb084c8066c66" + "gitHead": "db9d6c0cf55ff60a90415b16bc7582cc4795768f" } diff --git a/packages/medusa/src/api/routes/admin/draft-orders/index.js b/packages/medusa/src/api/routes/admin/draft-orders/index.js index 10b9e65f30..4bdacfde84 100644 --- a/packages/medusa/src/api/routes/admin/draft-orders/index.js +++ b/packages/medusa/src/api/routes/admin/draft-orders/index.js @@ -49,6 +49,8 @@ export const defaultRelations = ["order", "cart"] export const defaultCartRelations = [ "region", "items", + "items.variant", + "items.variant.prices", "payment", "shipping_address", "billing_address", diff --git a/packages/medusa/src/api/routes/store/carts/index.js b/packages/medusa/src/api/routes/store/carts/index.js index 42363bd12c..ce5dfdf06b 100644 --- a/packages/medusa/src/api/routes/store/carts/index.js +++ b/packages/medusa/src/api/routes/store/carts/index.js @@ -107,13 +107,15 @@ export const defaultRelations = [ "gift_cards", "region", "items", + "items.variant", + "items.variant.prices", "payment", "shipping_address", "billing_address", "region.countries", "region.payment_providers", - "shipping_methods", "payment_sessions", + "shipping_methods", "shipping_methods.shipping_option", "discounts", ] diff --git a/packages/medusa/src/api/routes/store/orders/index.js b/packages/medusa/src/api/routes/store/orders/index.js index 4405a86ba7..72e802c90e 100644 --- a/packages/medusa/src/api/routes/store/orders/index.js +++ b/packages/medusa/src/api/routes/store/orders/index.js @@ -33,6 +33,7 @@ export const defaultRelations = [ "items", "items.variant", "items.variant.product", + "items.variant.prices", "shipping_methods", "discounts", "customer", diff --git a/packages/medusa/src/models/line-item.ts b/packages/medusa/src/models/line-item.ts index 3060050646..e8d30aecff 100644 --- a/packages/medusa/src/models/line-item.ts +++ b/packages/medusa/src/models/line-item.ts @@ -99,7 +99,7 @@ export class LineItem { @Column({ nullable: true }) variant_id: string - @ManyToOne(() => ProductVariant, { eager: true }) + @ManyToOne(() => ProductVariant) @JoinColumn({ name: "variant_id" }) variant: ProductVariant diff --git a/packages/medusa/src/models/product-variant.ts b/packages/medusa/src/models/product-variant.ts index 7b97b6ea2a..0a3c569f9b 100644 --- a/packages/medusa/src/models/product-variant.ts +++ b/packages/medusa/src/models/product-variant.ts @@ -19,6 +19,9 @@ import { Product } from "./product" import { MoneyAmount } from "./money-amount" import { ProductOptionValue } from "./product-option-value" + + + @Entity() export class ProductVariant { @PrimaryColumn() diff --git a/packages/medusa/src/services/notification.js b/packages/medusa/src/services/notification.js index 1df7dd7577..62bdd688eb 100644 --- a/packages/medusa/src/services/notification.js +++ b/packages/medusa/src/services/notification.js @@ -162,7 +162,7 @@ class NotificationService extends BaseService { handleEvent(eventName, data) { const subs = this.subscribers_[eventName] if (!subs) { - return + return Promise.resolve() } if(data['no_notification'] === true) { return diff --git a/packages/medusa/src/services/order.js b/packages/medusa/src/services/order.js index 8b426e6a0e..89d5a9e62d 100644 --- a/packages/medusa/src/services/order.js +++ b/packages/medusa/src/services/order.js @@ -111,10 +111,13 @@ class OrderService extends BaseService { shippingOptionService: this.shippingOptionService_, shippingProfileService: this.shippingProfileService_, fulfillmentProviderService: this.fulfillmentProviderService_, + fulfillmentService: this.fulfillmentService_, + customerService: this.customerService_, discountService: this.discountService_, totalsService: this.totalsService_, cartService: this.cartService_, giftCardService: this.giftCardService_, + addressRepository: this.addressRepository_, draftOrderService: this.draftOrderService_, })