diff --git a/.changeset/config.json b/.changeset/config.json index 002fec744b..98b3747bcc 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -10,6 +10,7 @@ "ignore": [ "integration-tests-api", "integration-tests-plugins", + "integration-tests-modules", "integration-tests-repositories", "@medusajs/dashboard", "@medusajs/admin-shared", diff --git a/.changeset/four-llamas-accept.md b/.changeset/four-llamas-accept.md new file mode 100644 index 0000000000..26c78e5124 --- /dev/null +++ b/.changeset/four-llamas-accept.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": minor +--- + +chore: V2 core loader + modules integration-tests diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index ba8afeb437..46a6b9396f 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -241,6 +241,59 @@ jobs: DB_PASSWORD: postgres NODE_OPTIONS: "--max_old_space_size=4096" + integration-tests-modules: + needs: setup + runs-on: ubuntu-latest + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + options: >- + --health-cmd pg_isready + --health-interval 1s + --health-timeout 10s + --health-retries 10 + ports: + - 5432:5432 + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: "16.10.0" + cache: "yarn" + + - name: Install dependencies + uses: ./.github/actions/cache-deps + with: + extension: pipeline + + - name: Build Packages + run: yarn build + + - name: Run Modules integration tests + run: yarn test:integration:modules + env: + DB_USERNAME: postgres + DB_PASSWORD: postgres + NODE_OPTIONS: "--max_old_space_size=4096" + integration-tests-repositories: needs: setup runs-on: ubuntu-latest diff --git a/integration-tests/factories/simple-cart-factory.ts b/integration-tests/factories/simple-cart-factory.ts index 679a34abfe..f188275841 100644 --- a/integration-tests/factories/simple-cart-factory.ts +++ b/integration-tests/factories/simple-cart-factory.ts @@ -1,4 +1,5 @@ import { Cart } from "@medusajs/medusa" +import { generateEntityId } from "@medusajs/utils" import faker from "faker" import { DataSource } from "typeorm" import { @@ -19,7 +20,6 @@ import { ShippingMethodFactoryData, simpleShippingMethodFactory, } from "./simple-shipping-method-factory" -import { generateEntityId } from "@medusajs/utils" export type CartFactoryData = { id?: string diff --git a/integration-tests/modules/.babelrc.js b/integration-tests/modules/.babelrc.js new file mode 100644 index 0000000000..bde709c495 --- /dev/null +++ b/integration-tests/modules/.babelrc.js @@ -0,0 +1,13 @@ +let ignore = [`**/dist`] + +// Jest needs to compile this code, but generally we don't want this copied +// to output folders +if (process.env.NODE_ENV !== `test`) { + ignore.push(`**/__tests__`) +} + +module.exports = { + sourceMaps: true, + presets: ["babel-preset-medusa-package"], + ignore, +} diff --git a/integration-tests/modules/.gitignore b/integration-tests/modules/.gitignore new file mode 100644 index 0000000000..a2c424c876 --- /dev/null +++ b/integration-tests/modules/.gitignore @@ -0,0 +1,4 @@ +dist/ +node_modules +*yarn-error.log + diff --git a/integration-tests/plugins/__tests__/api-key/admin/api-key.spec.ts b/integration-tests/modules/__tests__/api-key/admin/api-key.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/api-key/admin/api-key.spec.ts rename to integration-tests/modules/__tests__/api-key/admin/api-key.spec.ts diff --git a/integration-tests/plugins/__tests__/cart/store/add-promotions-to-cart.spec.ts b/integration-tests/modules/__tests__/cart/store/add-promotions-to-cart.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/cart/store/add-promotions-to-cart.spec.ts rename to integration-tests/modules/__tests__/cart/store/add-promotions-to-cart.spec.ts diff --git a/integration-tests/plugins/__tests__/cart/store/cart.workflows.spec.ts b/integration-tests/modules/__tests__/cart/store/cart.workflows.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/cart/store/cart.workflows.spec.ts rename to integration-tests/modules/__tests__/cart/store/cart.workflows.spec.ts diff --git a/integration-tests/plugins/__tests__/cart/store/carts.spec.ts b/integration-tests/modules/__tests__/cart/store/carts.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/cart/store/carts.spec.ts rename to integration-tests/modules/__tests__/cart/store/carts.spec.ts diff --git a/integration-tests/plugins/__tests__/cart/store/remove-promotions-from-cart.spec.ts b/integration-tests/modules/__tests__/cart/store/remove-promotions-from-cart.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/cart/store/remove-promotions-from-cart.spec.ts rename to integration-tests/modules/__tests__/cart/store/remove-promotions-from-cart.spec.ts diff --git a/integration-tests/plugins/__tests__/currency/admin/currency.spec.ts b/integration-tests/modules/__tests__/currency/admin/currency.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/currency/admin/currency.spec.ts rename to integration-tests/modules/__tests__/currency/admin/currency.spec.ts diff --git a/integration-tests/plugins/__tests__/currency/store/currency.spec.ts b/integration-tests/modules/__tests__/currency/store/currency.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/currency/store/currency.spec.ts rename to integration-tests/modules/__tests__/currency/store/currency.spec.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/batch-add-customers.ts b/integration-tests/modules/__tests__/customer-group/admin/batch-add-customers.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/batch-add-customers.ts rename to integration-tests/modules/__tests__/customer-group/admin/batch-add-customers.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/batch-remove-customers.ts b/integration-tests/modules/__tests__/customer-group/admin/batch-remove-customers.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/batch-remove-customers.ts rename to integration-tests/modules/__tests__/customer-group/admin/batch-remove-customers.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/create-customer-group.ts b/integration-tests/modules/__tests__/customer-group/admin/create-customer-group.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/create-customer-group.ts rename to integration-tests/modules/__tests__/customer-group/admin/create-customer-group.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/delete-customer-group.ts b/integration-tests/modules/__tests__/customer-group/admin/delete-customer-group.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/delete-customer-group.ts rename to integration-tests/modules/__tests__/customer-group/admin/delete-customer-group.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/list-customer-group-customers.ts b/integration-tests/modules/__tests__/customer-group/admin/list-customer-group-customers.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/list-customer-group-customers.ts rename to integration-tests/modules/__tests__/customer-group/admin/list-customer-group-customers.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/list-customer-groups.spec.ts b/integration-tests/modules/__tests__/customer-group/admin/list-customer-groups.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/list-customer-groups.spec.ts rename to integration-tests/modules/__tests__/customer-group/admin/list-customer-groups.spec.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/retrieve-customer-group.ts b/integration-tests/modules/__tests__/customer-group/admin/retrieve-customer-group.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/retrieve-customer-group.ts rename to integration-tests/modules/__tests__/customer-group/admin/retrieve-customer-group.ts diff --git a/integration-tests/plugins/__tests__/customer-group/admin/update-customer-group.ts b/integration-tests/modules/__tests__/customer-group/admin/update-customer-group.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer-group/admin/update-customer-group.ts rename to integration-tests/modules/__tests__/customer-group/admin/update-customer-group.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/create-customer-addresses.ts b/integration-tests/modules/__tests__/customer/admin/create-customer-addresses.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/create-customer-addresses.ts rename to integration-tests/modules/__tests__/customer/admin/create-customer-addresses.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/create-customer.ts b/integration-tests/modules/__tests__/customer/admin/create-customer.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/create-customer.ts rename to integration-tests/modules/__tests__/customer/admin/create-customer.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/delete-customer-address.spec.ts b/integration-tests/modules/__tests__/customer/admin/delete-customer-address.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/delete-customer-address.spec.ts rename to integration-tests/modules/__tests__/customer/admin/delete-customer-address.spec.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/delete-customer.ts b/integration-tests/modules/__tests__/customer/admin/delete-customer.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/delete-customer.ts rename to integration-tests/modules/__tests__/customer/admin/delete-customer.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/list-customer-addresses.ts b/integration-tests/modules/__tests__/customer/admin/list-customer-addresses.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/list-customer-addresses.ts rename to integration-tests/modules/__tests__/customer/admin/list-customer-addresses.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/list-customers.spec.ts b/integration-tests/modules/__tests__/customer/admin/list-customers.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/list-customers.spec.ts rename to integration-tests/modules/__tests__/customer/admin/list-customers.spec.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/update-customer-address.spec.ts b/integration-tests/modules/__tests__/customer/admin/update-customer-address.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/update-customer-address.spec.ts rename to integration-tests/modules/__tests__/customer/admin/update-customer-address.spec.ts diff --git a/integration-tests/plugins/__tests__/customer/admin/update-customer.ts b/integration-tests/modules/__tests__/customer/admin/update-customer.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/admin/update-customer.ts rename to integration-tests/modules/__tests__/customer/admin/update-customer.ts diff --git a/integration-tests/plugins/__tests__/customer/store/create-customer-addresses.ts b/integration-tests/modules/__tests__/customer/store/create-customer-addresses.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/store/create-customer-addresses.ts rename to integration-tests/modules/__tests__/customer/store/create-customer-addresses.ts diff --git a/integration-tests/plugins/__tests__/customer/store/create-customer.spec.ts b/integration-tests/modules/__tests__/customer/store/create-customer.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/store/create-customer.spec.ts rename to integration-tests/modules/__tests__/customer/store/create-customer.spec.ts diff --git a/integration-tests/plugins/__tests__/customer/store/delete-customer-address.spec.ts b/integration-tests/modules/__tests__/customer/store/delete-customer-address.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/store/delete-customer-address.spec.ts rename to integration-tests/modules/__tests__/customer/store/delete-customer-address.spec.ts diff --git a/integration-tests/plugins/__tests__/customer/store/get-me.spec.ts b/integration-tests/modules/__tests__/customer/store/get-me.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/store/get-me.spec.ts rename to integration-tests/modules/__tests__/customer/store/get-me.spec.ts diff --git a/integration-tests/plugins/__tests__/customer/store/list-customer-addresses.ts b/integration-tests/modules/__tests__/customer/store/list-customer-addresses.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/store/list-customer-addresses.ts rename to integration-tests/modules/__tests__/customer/store/list-customer-addresses.ts diff --git a/integration-tests/plugins/__tests__/customer/store/update-customer-address.spec.ts b/integration-tests/modules/__tests__/customer/store/update-customer-address.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/customer/store/update-customer-address.spec.ts rename to integration-tests/modules/__tests__/customer/store/update-customer-address.spec.ts diff --git a/integration-tests/plugins/__tests__/invites/accept-invite.spec.ts b/integration-tests/modules/__tests__/invites/accept-invite.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/invites/accept-invite.spec.ts rename to integration-tests/modules/__tests__/invites/accept-invite.spec.ts diff --git a/integration-tests/plugins/__tests__/invites/create-invite.spec.ts b/integration-tests/modules/__tests__/invites/create-invite.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/invites/create-invite.spec.ts rename to integration-tests/modules/__tests__/invites/create-invite.spec.ts diff --git a/integration-tests/plugins/__tests__/invites/delete-invite.spec.ts b/integration-tests/modules/__tests__/invites/delete-invite.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/invites/delete-invite.spec.ts rename to integration-tests/modules/__tests__/invites/delete-invite.spec.ts diff --git a/integration-tests/plugins/__tests__/invites/list-invites.spec.ts b/integration-tests/modules/__tests__/invites/list-invites.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/invites/list-invites.spec.ts rename to integration-tests/modules/__tests__/invites/list-invites.spec.ts diff --git a/integration-tests/plugins/__tests__/invites/resend-invite.spec.ts b/integration-tests/modules/__tests__/invites/resend-invite.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/invites/resend-invite.spec.ts rename to integration-tests/modules/__tests__/invites/resend-invite.spec.ts diff --git a/integration-tests/plugins/__tests__/invites/retrieve-invite.spec.ts b/integration-tests/modules/__tests__/invites/retrieve-invite.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/invites/retrieve-invite.spec.ts rename to integration-tests/modules/__tests__/invites/retrieve-invite.spec.ts diff --git a/integration-tests/plugins/__tests__/link-modules/cart-links.spec.ts b/integration-tests/modules/__tests__/link-modules/cart-links.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/link-modules/cart-links.spec.ts rename to integration-tests/modules/__tests__/link-modules/cart-links.spec.ts diff --git a/integration-tests/plugins/__tests__/link-modules/cart-region.spec.ts b/integration-tests/modules/__tests__/link-modules/cart-region.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/link-modules/cart-region.spec.ts rename to integration-tests/modules/__tests__/link-modules/cart-region.spec.ts diff --git a/integration-tests/plugins/__tests__/link-modules/index.ts b/integration-tests/modules/__tests__/link-modules/index.ts similarity index 100% rename from integration-tests/plugins/__tests__/link-modules/index.ts rename to integration-tests/modules/__tests__/link-modules/index.ts diff --git a/integration-tests/plugins/__tests__/modules/load-standalone.ts b/integration-tests/modules/__tests__/modules/load-standalone.ts similarity index 100% rename from integration-tests/plugins/__tests__/modules/load-standalone.ts rename to integration-tests/modules/__tests__/modules/load-standalone.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts b/integration-tests/modules/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts rename to integration-tests/modules/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/create-price-list.spec.ts b/integration-tests/modules/__tests__/price-lists/admin/create-price-list.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/create-price-list.spec.ts rename to integration-tests/modules/__tests__/price-lists/admin/create-price-list.spec.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts b/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts rename to integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts b/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts rename to integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-prices.ts b/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-prices.ts rename to integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-spec.ts b/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/delete-price-list-spec.ts rename to integration-tests/modules/__tests__/price-lists/admin/delete-price-list-spec.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/get-price-list.spec.ts b/integration-tests/modules/__tests__/price-lists/admin/get-price-list.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/get-price-list.spec.ts rename to integration-tests/modules/__tests__/price-lists/admin/get-price-list.spec.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/list-price-list-products.spec.ts b/integration-tests/modules/__tests__/price-lists/admin/list-price-list-products.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/list-price-list-products.spec.ts rename to integration-tests/modules/__tests__/price-lists/admin/list-price-list-products.spec.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/list-price-list.spec.ts b/integration-tests/modules/__tests__/price-lists/admin/list-price-list.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/list-price-list.spec.ts rename to integration-tests/modules/__tests__/price-lists/admin/list-price-list.spec.ts diff --git a/integration-tests/plugins/__tests__/price-lists/admin/update-price-list.spec.ts b/integration-tests/modules/__tests__/price-lists/admin/update-price-list.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/admin/update-price-list.spec.ts rename to integration-tests/modules/__tests__/price-lists/admin/update-price-list.spec.ts diff --git a/integration-tests/plugins/__tests__/price-lists/store/get-product.ts b/integration-tests/modules/__tests__/price-lists/store/get-product.ts similarity index 100% rename from integration-tests/plugins/__tests__/price-lists/store/get-product.ts rename to integration-tests/modules/__tests__/price-lists/store/get-product.ts diff --git a/integration-tests/plugins/__tests__/pricing/get-product.ts b/integration-tests/modules/__tests__/pricing/get-product.ts similarity index 100% rename from integration-tests/plugins/__tests__/pricing/get-product.ts rename to integration-tests/modules/__tests__/pricing/get-product.ts diff --git a/integration-tests/plugins/__tests__/product/admin/create-product-variant.spec.ts b/integration-tests/modules/__tests__/product/admin/create-product-variant.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/create-product-variant.spec.ts rename to integration-tests/modules/__tests__/product/admin/create-product-variant.spec.ts diff --git a/integration-tests/plugins/__tests__/product/admin/create-product.ts b/integration-tests/modules/__tests__/product/admin/create-product.ts similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/create-product.ts rename to integration-tests/modules/__tests__/product/admin/create-product.ts diff --git a/integration-tests/plugins/__tests__/product/admin/export-products.spec.ts b/integration-tests/modules/__tests__/product/admin/export-products.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/export-products.spec.ts rename to integration-tests/modules/__tests__/product/admin/export-products.spec.ts diff --git a/integration-tests/plugins/__tests__/product/admin/import-products.spec.ts b/integration-tests/modules/__tests__/product/admin/import-products.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/import-products.spec.ts rename to integration-tests/modules/__tests__/product/admin/import-products.spec.ts diff --git a/integration-tests/plugins/__tests__/product/admin/index.ts b/integration-tests/modules/__tests__/product/admin/index.ts similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/index.ts rename to integration-tests/modules/__tests__/product/admin/index.ts diff --git a/integration-tests/plugins/__tests__/product/admin/product-import-template.csv b/integration-tests/modules/__tests__/product/admin/product-import-template.csv similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/product-import-template.csv rename to integration-tests/modules/__tests__/product/admin/product-import-template.csv diff --git a/integration-tests/plugins/__tests__/product/admin/update-product-variant.spec.ts b/integration-tests/modules/__tests__/product/admin/update-product-variant.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/update-product-variant.spec.ts rename to integration-tests/modules/__tests__/product/admin/update-product-variant.spec.ts diff --git a/integration-tests/plugins/__tests__/product/admin/update-product.spec.ts b/integration-tests/modules/__tests__/product/admin/update-product.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/product/admin/update-product.spec.ts rename to integration-tests/modules/__tests__/product/admin/update-product.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/create-campaign.spec.ts b/integration-tests/modules/__tests__/promotion/admin/create-campaign.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/create-campaign.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/create-campaign.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/create-promotion.spec.ts b/integration-tests/modules/__tests__/promotion/admin/create-promotion.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/create-promotion.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/create-promotion.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/delete-campaign.spec.ts b/integration-tests/modules/__tests__/promotion/admin/delete-campaign.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/delete-campaign.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/delete-campaign.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/delete-promotion.spec.ts b/integration-tests/modules/__tests__/promotion/admin/delete-promotion.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/delete-promotion.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/delete-promotion.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/list-campaigns.spec.ts b/integration-tests/modules/__tests__/promotion/admin/list-campaigns.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/list-campaigns.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/list-campaigns.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/list-promotions.spec.ts b/integration-tests/modules/__tests__/promotion/admin/list-promotions.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/list-promotions.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/list-promotions.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/retrieve-campaign.spec.ts b/integration-tests/modules/__tests__/promotion/admin/retrieve-campaign.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/retrieve-campaign.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/retrieve-campaign.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/retrieve-promotion.spec.ts b/integration-tests/modules/__tests__/promotion/admin/retrieve-promotion.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/retrieve-promotion.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/retrieve-promotion.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/update-campaign.spec.ts b/integration-tests/modules/__tests__/promotion/admin/update-campaign.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/update-campaign.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/update-campaign.spec.ts diff --git a/integration-tests/plugins/__tests__/promotion/admin/update-promotion.spec.ts b/integration-tests/modules/__tests__/promotion/admin/update-promotion.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/promotion/admin/update-promotion.spec.ts rename to integration-tests/modules/__tests__/promotion/admin/update-promotion.spec.ts diff --git a/integration-tests/plugins/__tests__/regions/admin/regions.spec.ts b/integration-tests/modules/__tests__/regions/admin/regions.spec.ts similarity index 99% rename from integration-tests/plugins/__tests__/regions/admin/regions.spec.ts rename to integration-tests/modules/__tests__/regions/admin/regions.spec.ts index b257355340..eaf7c35a97 100644 --- a/integration-tests/plugins/__tests__/regions/admin/regions.spec.ts +++ b/integration-tests/modules/__tests__/regions/admin/regions.spec.ts @@ -1,12 +1,11 @@ -import { initDb, useDb } from "../../../../environment-helpers/use-db" - -import { IRegionModuleService } from "@medusajs/types" import { ModuleRegistrationName } from "@medusajs/modules-sdk" -import { createAdminUser } from "../../../helpers/create-admin-user" -import { getContainer } from "../../../../environment-helpers/use-container" +import { IRegionModuleService } from "@medusajs/types" import path from "path" import { startBootstrapApp } from "../../../../environment-helpers/bootstrap-app" import { useApi } from "../../../../environment-helpers/use-api" +import { getContainer } from "../../../../environment-helpers/use-container" +import { initDb, useDb } from "../../../../environment-helpers/use-db" +import { createAdminUser } from "../../../helpers/create-admin-user" jest.setTimeout(50000) diff --git a/integration-tests/plugins/__tests__/services/product.ts b/integration-tests/modules/__tests__/services/product.ts similarity index 100% rename from integration-tests/plugins/__tests__/services/product.ts rename to integration-tests/modules/__tests__/services/product.ts diff --git a/integration-tests/plugins/__tests__/store/admin/store.spec.ts b/integration-tests/modules/__tests__/store/admin/store.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/store/admin/store.spec.ts rename to integration-tests/modules/__tests__/store/admin/store.spec.ts diff --git a/integration-tests/plugins/__tests__/tax/admin/tax.spec.ts b/integration-tests/modules/__tests__/tax/admin/tax.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/tax/admin/tax.spec.ts rename to integration-tests/modules/__tests__/tax/admin/tax.spec.ts diff --git a/integration-tests/plugins/__tests__/users/create-user.spec.ts b/integration-tests/modules/__tests__/users/create-user.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/users/create-user.spec.ts rename to integration-tests/modules/__tests__/users/create-user.spec.ts diff --git a/integration-tests/plugins/__tests__/users/delete-user.spec.ts b/integration-tests/modules/__tests__/users/delete-user.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/users/delete-user.spec.ts rename to integration-tests/modules/__tests__/users/delete-user.spec.ts diff --git a/integration-tests/plugins/__tests__/users/list-users.spec.ts b/integration-tests/modules/__tests__/users/list-users.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/users/list-users.spec.ts rename to integration-tests/modules/__tests__/users/list-users.spec.ts diff --git a/integration-tests/plugins/__tests__/users/retrieve-user.spec.ts b/integration-tests/modules/__tests__/users/retrieve-user.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/users/retrieve-user.spec.ts rename to integration-tests/modules/__tests__/users/retrieve-user.spec.ts diff --git a/integration-tests/plugins/__tests__/users/update-user.spec.ts b/integration-tests/modules/__tests__/users/update-user.spec.ts similarity index 100% rename from integration-tests/plugins/__tests__/users/update-user.spec.ts rename to integration-tests/modules/__tests__/users/update-user.spec.ts diff --git a/integration-tests/plugins/__tests__/workflow-engine/api.ts b/integration-tests/modules/__tests__/workflow-engine/api.ts similarity index 100% rename from integration-tests/plugins/__tests__/workflow-engine/api.ts rename to integration-tests/modules/__tests__/workflow-engine/api.ts diff --git a/integration-tests/plugins/__tests__/workflow-engine/api_v2.ts b/integration-tests/modules/__tests__/workflow-engine/api_v2.ts similarity index 100% rename from integration-tests/plugins/__tests__/workflow-engine/api_v2.ts rename to integration-tests/modules/__tests__/workflow-engine/api_v2.ts diff --git a/integration-tests/plugins/__tests__/workflow-engine/tests.ts b/integration-tests/modules/__tests__/workflow-engine/tests.ts similarity index 100% rename from integration-tests/plugins/__tests__/workflow-engine/tests.ts rename to integration-tests/modules/__tests__/workflow-engine/tests.ts diff --git a/integration-tests/plugins/helpers/create-admin-user.ts b/integration-tests/modules/helpers/create-admin-user.ts similarity index 100% rename from integration-tests/plugins/helpers/create-admin-user.ts rename to integration-tests/modules/helpers/create-admin-user.ts index 4c1b02751e..f163e176cb 100644 --- a/integration-tests/plugins/helpers/create-admin-user.ts +++ b/integration-tests/modules/helpers/create-admin-user.ts @@ -1,8 +1,8 @@ -import { IAuthModuleService } from "@medusajs/types" import { ModuleRegistrationName } from "@medusajs/modules-sdk" -import adminSeeder from "../../helpers/admin-seeder" -import { getContainer } from "../../environment-helpers/use-container" +import { IAuthModuleService } from "@medusajs/types" import jwt from "jsonwebtoken" +import { getContainer } from "../../environment-helpers/use-container" +import adminSeeder from "../../helpers/admin-seeder" export const createAdminUser = async (dbConnection, adminHeaders) => { await adminSeeder(dbConnection) diff --git a/integration-tests/plugins/helpers/create-authenticated-customer.ts b/integration-tests/modules/helpers/create-authenticated-customer.ts similarity index 100% rename from integration-tests/plugins/helpers/create-authenticated-customer.ts rename to integration-tests/modules/helpers/create-authenticated-customer.ts diff --git a/integration-tests/plugins/helpers/create-default-rule-types.ts b/integration-tests/modules/helpers/create-default-rule-types.ts similarity index 100% rename from integration-tests/plugins/helpers/create-default-rule-types.ts rename to integration-tests/modules/helpers/create-default-rule-types.ts diff --git a/integration-tests/plugins/helpers/create-variant-price-set.ts b/integration-tests/modules/helpers/create-variant-price-set.ts similarity index 100% rename from integration-tests/plugins/helpers/create-variant-price-set.ts rename to integration-tests/modules/helpers/create-variant-price-set.ts diff --git a/integration-tests/modules/jest.config.js b/integration-tests/modules/jest.config.js new file mode 100644 index 0000000000..fda20d9945 --- /dev/null +++ b/integration-tests/modules/jest.config.js @@ -0,0 +1,23 @@ +process.chdir(__dirname) + +module.exports = { + name: "Modules", + testEnvironment: `node`, + rootDir: "./", + testPathIgnorePatterns: [ + `/examples/`, + `/www/`, + `/dist/`, + `/node_modules/`, + `/node_modules/`, + `__tests__/fixtures`, + `__testfixtures__`, + `.cache`, + ], + transformIgnorePatterns: [`/dist`], + transform: { "^.+\\.[jt]s$": `../../jest-transformer.js` }, + setupFiles: ["../setup-env.js"], + setupFilesAfterEnv: ["../setup.js"], + globalSetup: "../globalSetup.js", + globalTeardown: "../globalTeardown.js", +} diff --git a/integration-tests/modules/medusa-config.js b/integration-tests/modules/medusa-config.js new file mode 100644 index 0000000000..5ca9dc8519 --- /dev/null +++ b/integration-tests/modules/medusa-config.js @@ -0,0 +1,66 @@ +const { Modules } = require("@medusajs/modules-sdk") +const DB_HOST = process.env.DB_HOST +const DB_USERNAME = process.env.DB_USERNAME +const DB_PASSWORD = process.env.DB_PASSWORD +const DB_NAME = process.env.DB_TEMP_NAME +const DB_URL = `postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}` +process.env.POSTGRES_URL = DB_URL + +const enableMedusaV2 = process.env.MEDUSA_FF_MEDUSA_V2 == "true" + +module.exports = { + plugins: [], + projectConfig: { + database_url: DB_URL, + database_type: "postgres", + jwt_secret: "test", + cookie_secret: "test", + }, + featureFlags: { + medusa_v2: enableMedusaV2, + }, + modules: { + [Modules.AUTH]: { + scope: "internal", + resources: "shared", + resolve: "@medusajs/auth", + options: { + providers: [ + { + name: "emailpass", + scopes: { + admin: {}, + store: {}, + }, + }, + ], + }, + }, + [Modules.USER]: { + scope: "internal", + resources: "shared", + resolve: "@medusajs/user", + options: { + jwt_secret: "test", + }, + }, + [Modules.CACHE]: { + resolve: "@medusajs/cache-inmemory", + options: { ttl: 0 }, // Cache disabled + }, + [Modules.STOCK_LOCATION]: true, + [Modules.INVENTORY]: true, + [Modules.PRODUCT]: true, + [Modules.PRICING]: true, + [Modules.PROMOTION]: true, + [Modules.CUSTOMER]: true, + [Modules.SALES_CHANNEL]: true, + [Modules.CART]: true, + [Modules.WORKFLOW_ENGINE]: true, + [Modules.REGION]: true, + [Modules.API_KEY]: true, + [Modules.STORE]: true, + [Modules.TAX]: true, + [Modules.CURRENCY]: true, + }, +} diff --git a/integration-tests/modules/package.json b/integration-tests/modules/package.json new file mode 100644 index 0000000000..7293c5ecac --- /dev/null +++ b/integration-tests/modules/package.json @@ -0,0 +1,45 @@ +{ + "name": "integration-tests-modules", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "private": true, + "scripts": { + "test:integration": "node --expose-gc ./../../node_modules/.bin/jest --silent=false --runInBand --bail --detectOpenHandles --logHeapUsage --clearMocks --forceExit", + "build": "babel src -d dist --extensions \".ts,.js\"" + }, + "dependencies": { + "@medusajs/api-key": "workspace:^", + "@medusajs/auth": "workspace:*", + "@medusajs/cache-inmemory": "workspace:*", + "@medusajs/customer": "workspace:^", + "@medusajs/event-bus-local": "workspace:*", + "@medusajs/inventory": "workspace:^", + "@medusajs/medusa": "workspace:*", + "@medusajs/modules-sdk": "workspace:^", + "@medusajs/pricing": "workspace:^", + "@medusajs/product": "workspace:^", + "@medusajs/promotion": "workspace:^", + "@medusajs/region": "workspace:^", + "@medusajs/store": "workspace:^", + "@medusajs/tax": "workspace:^", + "@medusajs/user": "workspace:^", + "@medusajs/utils": "workspace:^", + "@medusajs/workflow-engine-inmemory": "workspace:*", + "faker": "^5.5.3", + "medusa-fulfillment-webshipper": "workspace:*", + "medusa-interfaces": "workspace:*", + "medusa-plugin-sendgrid": "workspace:*", + "pg": "^8.11.0", + "typeorm": "^0.3.16" + }, + "devDependencies": { + "@babel/cli": "^7.12.10", + "@babel/core": "^7.12.10", + "@babel/node": "^7.12.10", + "@medusajs/types": "workspace:^", + "babel-preset-medusa-package": "*", + "jest": "^26.6.3", + "jest-environment-node": "26.6.2" + } +} diff --git a/integration-tests/modules/src/index.js b/integration-tests/modules/src/index.js new file mode 100644 index 0000000000..172f1ae6a4 --- /dev/null +++ b/integration-tests/modules/src/index.js @@ -0,0 +1 @@ +// noop diff --git a/integration-tests/plugins/medusa-config.js b/integration-tests/plugins/medusa-config.js index 3c7bd438f7..17621c03ac 100644 --- a/integration-tests/plugins/medusa-config.js +++ b/integration-tests/plugins/medusa-config.js @@ -1,5 +1,4 @@ const { Modules } = require("@medusajs/modules-sdk") -const { Workflows } = require("@medusajs/core-flows") const DB_HOST = process.env.DB_HOST const DB_USERNAME = process.env.DB_USERNAME const DB_PASSWORD = process.env.DB_PASSWORD @@ -55,14 +54,6 @@ module.exports = { ], }, }, - [Modules.USER]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/user", - options: { - jwt_secret: "test", - }, - }, [Modules.STOCK_LOCATION]: { scope: "internal", resources: "shared", @@ -82,56 +73,6 @@ module.exports = { resources: "shared", resolve: "@medusajs/product", }, - [Modules.PRICING]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/pricing", - }, - [Modules.PROMOTION]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/promotion", - }, - [Modules.CUSTOMER]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/customer", - }, - [Modules.SALES_CHANNEL]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/sales-channel", - }, - [Modules.CART]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/cart", - }, [Modules.WORKFLOW_ENGINE]: true, - [Modules.REGION]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/region", - }, - [Modules.API_KEY]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/api-key", - }, - [Modules.STORE]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/store", - }, - [Modules.TAX]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/tax", - }, - [Modules.CURRENCY]: { - scope: "internal", - resources: "shared", - resolve: "@medusajs/currency", - }, }, } diff --git a/package.json b/package.json index 6313fa0d9b..ddff44a2c0 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "test:integration:packages": "turbo run test:integration --concurrency=1 --no-daemon --filter='./packages/*'", "test:integration:api": "turbo run test:integration --concurrency=50% --no-daemon --filter=integration-tests-api", "test:integration:plugins": "turbo run test:integration --concurrency=50% --no-daemon --filter=integration-tests-plugins", + "test:integration:modules": "turbo run test:integration --concurrency=50% --no-daemon --filter=integration-tests-modules", "test:integration:repositories": "turbo run test:integration --concurrency=50% --no-daemon --filter=integration-tests-repositories", "openapi:generate": "yarn ./packages/oas/oas-github-ci run ci --with-full-file", "medusa-oas": "yarn ./packages/oas/medusa-oas-cli run medusa-oas", diff --git a/packages/medusa/src/loaders/index.ts b/packages/medusa/src/loaders/index.ts index 36e46ede97..91331f436a 100644 --- a/packages/medusa/src/loaders/index.ts +++ b/packages/medusa/src/loaders/index.ts @@ -8,10 +8,7 @@ import { Express, NextFunction, Request, Response } from "express" import databaseLoader, { dataSource } from "./database" import pluginsLoader, { registerPluginModels } from "./plugins" -import { - ContainerRegistrationKeys, - isString -} from "@medusajs/utils" +import { ContainerRegistrationKeys, isString } from "@medusajs/utils" import { asValue } from "awilix" import { createMedusaContainer } from "medusa-core-utils" import { track } from "medusa-telemetry" @@ -82,16 +79,75 @@ async function loadLegacyModulesEntities(configModules, container) { } } +async function loadMedusaV2({ directory, expressApp }) { + const configModule = loadConfig(directory) + + const container = createMedusaContainer() + + // Add additional information to context of request + expressApp.use((req: Request, res: Response, next: NextFunction) => { + const ipAddress = requestIp.getClientIp(req) as string + ;(req as any).request_context = { + ip_address: ipAddress, + } + next() + }) + + const featureFlagRouter = featureFlagsLoader(configModule, Logger) + + const pgConnection = await pgConnectionLoader({ container, configModule }) + + container.register({ + [ContainerRegistrationKeys.MANAGER]: asValue(dataSource.manager), + [ContainerRegistrationKeys.LOGGER]: asValue(Logger), + featureFlagRouter: asValue(featureFlagRouter), + [ContainerRegistrationKeys.CONFIG_MODULE]: asValue(configModule), + ["remoteQuery"]: asValue(null), + }) + + await loadMedusaApp({ + configModule, + container, + }) + + await expressLoader({ app: expressApp, configModule }) + + expressApp.use((req: Request, res: Response, next: NextFunction) => { + req.scope = container.createScope() as MedusaContainer + req.requestId = (req.headers["x-request-id"] as string) ?? v4() + next() + }) + + // TODO: Add Subscribers loader + + await apiLoader({ + container, + app: expressApp, + configModule, + featureFlagRouter, + }) + + return { + container, + app: expressApp, + pgConnection, + } +} + export default async ({ directory: rootDirectory, expressApp, isTest, }: Options): Promise<{ container: MedusaContainer - dbConnection: Connection + dbConnection?: Connection app: Express pgConnection: unknown }> => { + if (process.env.MEDUSA_FF_MEDUSA_V2 == "true") { + return await loadMedusaV2({ directory: rootDirectory, expressApp }) + } + const configModule = loadConfig(rootDirectory) const container = createMedusaContainer() diff --git a/packages/region/src/migrations/RegionModuleSetup20240205173216.ts b/packages/region/src/migrations/RegionModuleSetup20240205173216.ts index 17b7ea7b10..36b56b04f7 100644 --- a/packages/region/src/migrations/RegionModuleSetup20240205173216.ts +++ b/packages/region/src/migrations/RegionModuleSetup20240205173216.ts @@ -15,19 +15,15 @@ CREATE TABLE IF NOT EXISTS "region" ( "deleted_at" timestamptz NULL, CONSTRAINT "region_pkey" PRIMARY KEY ("id") ); - -- Adjust "region" table ALTER TABLE "region" DROP CONSTRAINT IF EXISTS "FK_3bdd5896ec93be2f1c62a3309a5"; ALTER TABLE "region" DROP CONSTRAINT IF EXISTS "FK_91f88052197680f9790272aaf5b"; - ${generatePostgresAlterColummnIfExistStatement( "region", ["tax_rate", "gift_cards_taxable", "automatic_taxes", "includes_tax"], "DROP NOT NULL" )} - CREATE INDEX IF NOT EXISTS "IDX_region_deleted_at" ON "region" ("deleted_at") WHERE "deleted_at" IS NOT NULL; - -- Create or update "region_country" table CREATE TABLE IF NOT EXISTS "region_country" ( "id" text NOT NULL, @@ -40,7 +36,6 @@ CREATE TABLE IF NOT EXISTS "region_country" ( CONSTRAINT "region_country_pkey" PRIMARY KEY ("id") ); CREATE UNIQUE INDEX IF NOT EXISTS "IDX_region_country_region_id_iso_2_unique" ON "region_country" (region_id, iso_2); - -- Adjust foreign keys for "region_country" ALTER TABLE "region_country" DROP CONSTRAINT IF EXISTS "FK_91f88052197680f9790272aaf5b"; ALTER TABLE "region_country" ADD CONSTRAINT "region_country_region_id_foreign" FOREIGN KEY ("region_id") REFERENCES "region" ("id") ON UPDATE CASCADE; diff --git a/yarn.lock b/yarn.lock index 0f607d002e..6f50670c7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31755,6 +31755,43 @@ __metadata: languageName: unknown linkType: soft +"integration-tests-modules@workspace:integration-tests/modules": + version: 0.0.0-use.local + resolution: "integration-tests-modules@workspace:integration-tests/modules" + dependencies: + "@babel/cli": ^7.12.10 + "@babel/core": ^7.12.10 + "@babel/node": ^7.12.10 + "@medusajs/api-key": "workspace:^" + "@medusajs/auth": "workspace:*" + "@medusajs/cache-inmemory": "workspace:*" + "@medusajs/customer": "workspace:^" + "@medusajs/event-bus-local": "workspace:*" + "@medusajs/inventory": "workspace:^" + "@medusajs/medusa": "workspace:*" + "@medusajs/modules-sdk": "workspace:^" + "@medusajs/pricing": "workspace:^" + "@medusajs/product": "workspace:^" + "@medusajs/promotion": "workspace:^" + "@medusajs/region": "workspace:^" + "@medusajs/store": "workspace:^" + "@medusajs/tax": "workspace:^" + "@medusajs/types": "workspace:^" + "@medusajs/user": "workspace:^" + "@medusajs/utils": "workspace:^" + "@medusajs/workflow-engine-inmemory": "workspace:*" + babel-preset-medusa-package: "*" + faker: ^5.5.3 + jest: ^26.6.3 + jest-environment-node: 26.6.2 + medusa-fulfillment-webshipper: "workspace:*" + medusa-interfaces: "workspace:*" + medusa-plugin-sendgrid: "workspace:*" + pg: ^8.11.0 + typeorm: ^0.3.16 + languageName: unknown + linkType: soft + "integration-tests-plugins@workspace:integration-tests/plugins": version: 0.0.0-use.local resolution: "integration-tests-plugins@workspace:integration-tests/plugins"