diff --git a/.changeset/brown-cows-sleep.md b/.changeset/brown-cows-sleep.md new file mode 100644 index 0000000000..a967a40746 --- /dev/null +++ b/.changeset/brown-cows-sleep.md @@ -0,0 +1,48 @@ +--- +"@medusajs/cli": patch +"@medusajs/core-flows": patch +"@medusajs/framework": patch +"@medusajs/modules-sdk": patch +"@medusajs/orchestration": patch +"@medusajs/types": patch +"@medusajs/utils": patch +"@medusajs/workflows-sdk": patch +"create-medusa-app": patch +"@medusajs/medusa": patch +"@medusajs/test-utils": patch +"@medusajs/analytics": patch +"@medusajs/api-key": patch +"@medusajs/auth": patch +"@medusajs/cache-redis": patch +"@medusajs/cart": patch +"@medusajs/currency": patch +"@medusajs/customer": patch +"@medusajs/event-bus-redis": patch +"@medusajs/file": patch +"@medusajs/fulfillment": patch +"@medusajs/index": patch +"@medusajs/inventory": patch +"@medusajs/link-modules": patch +"@medusajs/locking": patch +"@medusajs/notification": patch +"@medusajs/order": patch +"@medusajs/payment": patch +"@medusajs/pricing": patch +"@medusajs/product": patch +"@medusajs/promotion": patch +"@medusajs/locking-postgres": patch +"@medusajs/payment-stripe": patch +"@medusajs/region": patch +"@medusajs/sales-channel": patch +"@medusajs/settings": patch +"@medusajs/stock-location": patch +"@medusajs/store": patch +"@medusajs/tax": patch +"@medusajs/user": patch +"@medusajs/workflow-engine-inmemory": patch +"@medusajs/workflow-engine-redis": patch +"@medusajs/draft-order": patch +"@medusajs/deps": patch +--- + +chore(): Move peer deps into a single package and re export from framework diff --git a/integration-tests/http/__fixtures__/feature-flag/src/modules/custom/migrations/MigrationTest.ts b/integration-tests/http/__fixtures__/feature-flag/src/modules/custom/migrations/MigrationTest.ts index ddd8e9dab6..ca8b1c79db 100644 --- a/integration-tests/http/__fixtures__/feature-flag/src/modules/custom/migrations/MigrationTest.ts +++ b/integration-tests/http/__fixtures__/feature-flag/src/modules/custom/migrations/MigrationTest.ts @@ -1,5 +1,5 @@ import { FeatureFlag, defineFileConfig } from "@medusajs/framework/utils" -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" defineFileConfig({ isDisabled: () => !FeatureFlag.isFeatureEnabled("custom_ff"), diff --git a/integration-tests/http/package.json b/integration-tests/http/package.json index f4cb2a1976..19718ffdb4 100644 --- a/integration-tests/http/package.json +++ b/integration-tests/http/package.json @@ -16,6 +16,7 @@ "@medusajs/core-flows": "workspace:*", "@medusajs/customer": "workspace:^", "@medusajs/event-bus-local": "workspace:*", + "@medusajs/framework": "workspace:*", "@medusajs/fulfillment": "workspace:^", "@medusajs/fulfillment-manual": "workspace:^", "@medusajs/inventory": "workspace:^", diff --git a/integration-tests/modules/__tests__/__fixtures__/translation-test/src/modules/translation/migrations/Migration20240907134741.ts b/integration-tests/modules/__tests__/__fixtures__/translation-test/src/modules/translation/migrations/Migration20240907134741.ts index 0f0825ce08..19b169c514 100644 --- a/integration-tests/modules/__tests__/__fixtures__/translation-test/src/modules/translation/migrations/Migration20240907134741.ts +++ b/integration-tests/modules/__tests__/__fixtures__/translation-test/src/modules/translation/migrations/Migration20240907134741.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20240907134741 extends Migration { diff --git a/integration-tests/modules/package.json b/integration-tests/modules/package.json index 7f125c805f..2c7d81feee 100644 --- a/integration-tests/modules/package.json +++ b/integration-tests/modules/package.json @@ -17,7 +17,7 @@ "@medusajs/currency": "workspace:^", "@medusajs/customer": "workspace:^", "@medusajs/event-bus-local": "workspace:*", - "@medusajs/framework": "workspace:^", + "@medusajs/framework": "workspace:*", "@medusajs/fulfillment": "workspace:^", "@medusajs/fulfillment-manual": "workspace:^", "@medusajs/inventory": "workspace:^", diff --git a/integration-tests/modules/src/modules/brand/migrations/Migration20250805184935.ts b/integration-tests/modules/src/modules/brand/migrations/Migration20250805184935.ts index 5131737d69..1890234894 100644 --- a/integration-tests/modules/src/modules/brand/migrations/Migration20250805184935.ts +++ b/integration-tests/modules/src/modules/brand/migrations/Migration20250805184935.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250805184935 extends Migration { override async up(): Promise { diff --git a/integration-tests/package.json b/integration-tests/package.json index e6cedeb057..d6a18b7911 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -21,10 +21,6 @@ "scrypt-kdf": "^2.0.1", "jsonwebtoken": "^9.0.2", "@medusajs/framework": "^1.0.1", - "@mikro-orm/core": "6.4.3", - "@mikro-orm/knex": "6.4.3", - "@mikro-orm/migrations": "6.4.3", - "@mikro-orm/postgresql": "6.4.3", "awilix": "^8.0.1", "ioredis": "^5.4.1", "pg": "^8.13.0", diff --git a/packages/cli/create-medusa-app/package.json b/packages/cli/create-medusa-app/package.json index 8d3a27bb9a..98860c5e45 100644 --- a/packages/cli/create-medusa-app/package.json +++ b/packages/cli/create-medusa-app/package.json @@ -13,6 +13,7 @@ "watch": "tsc --watch" }, "dependencies": { + "@medusajs/deps": "2.10.3", "@medusajs/telemetry": "2.10.3", "boxen": "^5", "chalk": "^5.2.0", @@ -23,7 +24,6 @@ "node-fetch": "^3.3.1", "open": "^9.1.0", "ora": "^6.3.0", - "pg": "^8.16.3", "slugify": "^1.6.6", "uuid": "^9.0.0", "validator": "^13.9.0", @@ -37,7 +37,6 @@ "@types/inquirer": "^9.0.3", "@types/node": "^20.12.11", "@types/node-emoji": "^1.8.2", - "@types/pg": "^8.6.6", "@types/uuid": "^9.0.1", "@types/validator": "^13.7.17", "@types/wait-on": "^5.3.1", diff --git a/packages/cli/create-medusa-app/src/utils/create-db.ts b/packages/cli/create-medusa-app/src/utils/create-db.ts index 38ad7de6ca..2a49e22566 100644 --- a/packages/cli/create-medusa-app/src/utils/create-db.ts +++ b/packages/cli/create-medusa-app/src/utils/create-db.ts @@ -1,5 +1,5 @@ import { EOL } from "os" -import pg from "pg" +import type pg from "@medusajs/deps/pg" import postgresClient, { DEFAULT_HOST, DEFAULT_PORT, diff --git a/packages/cli/create-medusa-app/src/utils/postgres-client.ts b/packages/cli/create-medusa-app/src/utils/postgres-client.ts index 28ad9db254..de924d0b6b 100644 --- a/packages/cli/create-medusa-app/src/utils/postgres-client.ts +++ b/packages/cli/create-medusa-app/src/utils/postgres-client.ts @@ -1,6 +1,6 @@ -import pg from "pg" +import pg from "@medusajs/deps/pg" -const { Client } = pg +const { Client } = pg as any export const DEFAULT_HOST = "localhost" export const DEFAULT_PORT = 5432 diff --git a/packages/cli/create-medusa-app/src/utils/prepare-project.ts b/packages/cli/create-medusa-app/src/utils/prepare-project.ts index 68d1d6c977..1b95b78b25 100644 --- a/packages/cli/create-medusa-app/src/utils/prepare-project.ts +++ b/packages/cli/create-medusa-app/src/utils/prepare-project.ts @@ -5,7 +5,7 @@ import execute from "./execute.js" import { EOL } from "os" import { displayFactBox, FactBoxOptions } from "./facts.js" import ProcessManager from "./process-manager.js" -import type { Client } from "pg" +import type { Client } from "@medusajs/deps/pg" import PackageManager from "./package-manager.js" import { updatePackageVersions } from "./update-package-versions.js" diff --git a/packages/cli/medusa-cli/package.json b/packages/cli/medusa-cli/package.json index f32b47cfa9..5ff5fa5467 100644 --- a/packages/cli/medusa-cli/package.json +++ b/packages/cli/medusa-cli/package.json @@ -32,20 +32,15 @@ "author": "Sebastian Rindom", "license": "MIT", "devDependencies": { - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "@types/yargs": "^15.0.15", - "awilix": "^8.0.1", "jest": "^29.7.0", - "pg": "^8.16.3", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, "dependencies": { + "@medusajs/deps": "2.10.3", "@medusajs/telemetry": "2.10.3", "@medusajs/utils": "2.10.3", "@types/express": "^4.17.17", @@ -62,7 +57,6 @@ "is-valid-path": "^0.1.1", "meant": "^1.0.3", "ora": "^5.4.1", - "pg": "^8.16.3", "pg-god": "^1.0.12", "prompts": "^2.4.2", "resolve-cwd": "^3.0.0", @@ -71,13 +65,5 @@ "winston": "^3.8.2", "yargs": "^15.3.1" }, - "peerDependencies": { - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", - "pg": "^8.16.3" - }, "gitHead": "81a7ff73d012fda722f6e9ef0bd9ba0232d37808" } diff --git a/packages/cli/medusa-cli/src/commands/new.ts b/packages/cli/medusa-cli/src/commands/new.ts index 4013955b30..8bb6caaed2 100644 --- a/packages/cli/medusa-cli/src/commands/new.ts +++ b/packages/cli/medusa-cli/src/commands/new.ts @@ -11,7 +11,7 @@ import isValid from "is-valid-path" import sysPath from "path" import path from "path" import prompts from "prompts" -import { Pool } from "pg" +import { Pool } from "@medusajs/deps/pg" import url from "url" import { track } from "@medusajs/telemetry" // @ts-ignore diff --git a/packages/core/core-flows/package.json b/packages/core/core-flows/package.json index e7f85efceb..126ad51bf4 100644 --- a/packages/core/core-flows/package.json +++ b/packages/core/core-flows/package.json @@ -27,16 +27,10 @@ "license": "MIT", "devDependencies": { "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", - "awilix": "^8.0.1", "expect-type": "^0.20.0", "jest": "^29.7.0", - "pg": "^8.16.3", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, @@ -46,8 +40,7 @@ "zod": "3.25.76" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" }, "scripts": { "build": "rimraf dist && tsc --build", diff --git a/packages/core/core-flows/src/common/steps/__tests__/use-query-graph-step.spec.ts b/packages/core/core-flows/src/common/steps/__tests__/use-query-graph-step.spec.ts index 92f5876f35..5686373a9a 100644 --- a/packages/core/core-flows/src/common/steps/__tests__/use-query-graph-step.spec.ts +++ b/packages/core/core-flows/src/common/steps/__tests__/use-query-graph-step.spec.ts @@ -3,7 +3,7 @@ import { expectTypeOf } from "expect-type" import { FixtureEntryPoints } from "../__fixtures__/remote-query" import { useQueryGraphStep } from "../use-query-graph" import { MedusaContainer } from "@medusajs/framework" -import { asFunction, createContainer } from "awilix" +import { asFunction, createContainer } from "@medusajs/framework/awilix" import { ContainerRegistrationKeys } from "@medusajs/framework/utils" describe("useQueryGraphStep", () => { diff --git a/packages/core/framework/package.json b/packages/core/framework/package.json index 03fe85369e..1c1782eadd 100644 --- a/packages/core/framework/package.json +++ b/packages/core/framework/package.json @@ -32,7 +32,14 @@ "./workflows-sdk": "./dist/workflows-sdk/index.js", "./workflows-sdk/composer": "./dist/workflows-sdk/composer.js", "./modules-sdk": "./dist/modules-sdk/index.js", - "./migrations": "./dist/migrations/index.js" + "./migrations": "./dist/migrations/index.js", + "./mikro-orm/cli": "./dist/deps/mikro-orm-cli.js", + "./mikro-orm/core": "./dist/deps/mikro-orm-core.js", + "./mikro-orm/knex": "./dist/deps/mikro-orm-knex.js", + "./mikro-orm/migrations": "./dist/deps/mikro-orm-migrations.js", + "./mikro-orm/postgresql": "./dist/deps/mikro-orm-postgresql.js", + "./awilix": "./dist/deps/awilix.js", + "./pg": "./dist/deps/pg.js" }, "engines": { "node": ">=20" @@ -56,19 +63,13 @@ "devDependencies": { "@aws-sdk/client-dynamodb": "^3.218.0", "@medusajs/cli": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "@types/cors": "^2.8.17", "@types/jsonwebtoken": "^8.5.9", - "awilix": "^8.0.1", "connect-dynamodb": "^3.0.5", "ioredis": "^5.4.1", "jest": "^29.7.0", - "pg": "^8.16.3", "rimraf": "^3.0.2", "supertest": "^4.0.2", "typescript": "^5.6.2", @@ -76,6 +77,7 @@ }, "dependencies": { "@jercle/yargonaut": "^1.1.5", + "@medusajs/deps": "2.10.3", "@medusajs/modules-sdk": "2.10.3", "@medusajs/orchestration": "2.10.3", "@medusajs/telemetry": "2.10.3", @@ -103,24 +105,14 @@ "peerDependencies": { "@aws-sdk/client-dynamodb": "^3.218.0", "@medusajs/cli": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", "connect-dynamodb": "^3.0.5", "ioredis": "^5.4.1", - "pg": "^8.16.3", "vite": "^5.4.14" }, "peerDependenciesMeta": { "@aws-sdk/client-dynamodb": { "optional": true }, - "@mikro-orm/cli": { - "optional": true - }, "connect-dynamodb": { "optional": true }, diff --git a/packages/core/framework/src/config/loader.ts b/packages/core/framework/src/config/loader.ts index 90292b4672..68b48940f8 100644 --- a/packages/core/framework/src/config/loader.ts +++ b/packages/core/framework/src/config/loader.ts @@ -1,5 +1,5 @@ import { ContainerRegistrationKeys, getConfigFile } from "@medusajs/utils" -import { asFunction } from "awilix" +import { asFunction } from "../deps/awilix" import { container } from "../container" import { logger as defaultLogger } from "../logger" import { ConfigManager } from "./config" diff --git a/packages/core/framework/src/database/pg-connection-loader.ts b/packages/core/framework/src/database/pg-connection-loader.ts index e977990045..57fcb4b92a 100644 --- a/packages/core/framework/src/database/pg-connection-loader.ts +++ b/packages/core/framework/src/database/pg-connection-loader.ts @@ -4,7 +4,7 @@ import { retryExecution, stringifyCircular, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "../deps/awilix" import { configManager } from "../config" import { container } from "../container" import { logger } from "../logger" diff --git a/packages/core/framework/src/deps/awilix.ts b/packages/core/framework/src/deps/awilix.ts new file mode 100644 index 0000000000..4be4eefa58 --- /dev/null +++ b/packages/core/framework/src/deps/awilix.ts @@ -0,0 +1 @@ +export * from "@medusajs/deps/awilix" diff --git a/packages/core/framework/src/deps/mikro-orm-cli.ts b/packages/core/framework/src/deps/mikro-orm-cli.ts new file mode 100644 index 0000000000..5731a55780 --- /dev/null +++ b/packages/core/framework/src/deps/mikro-orm-cli.ts @@ -0,0 +1 @@ +export * from "@medusajs/deps/mikro-orm/cli" diff --git a/packages/core/framework/src/deps/mikro-orm-core.ts b/packages/core/framework/src/deps/mikro-orm-core.ts new file mode 100644 index 0000000000..0d1426b86f --- /dev/null +++ b/packages/core/framework/src/deps/mikro-orm-core.ts @@ -0,0 +1 @@ +export * from "@medusajs/deps/mikro-orm/core" diff --git a/packages/core/framework/src/deps/mikro-orm-knex.ts b/packages/core/framework/src/deps/mikro-orm-knex.ts new file mode 100644 index 0000000000..7fed3ec788 --- /dev/null +++ b/packages/core/framework/src/deps/mikro-orm-knex.ts @@ -0,0 +1 @@ +export * from "@medusajs/deps/mikro-orm/knex" diff --git a/packages/core/framework/src/deps/mikro-orm-migrations.ts b/packages/core/framework/src/deps/mikro-orm-migrations.ts new file mode 100644 index 0000000000..2ff3bb18bf --- /dev/null +++ b/packages/core/framework/src/deps/mikro-orm-migrations.ts @@ -0,0 +1 @@ +export * from "@medusajs/deps/mikro-orm/migrations" diff --git a/packages/core/framework/src/deps/mikro-orm-postgresql.ts b/packages/core/framework/src/deps/mikro-orm-postgresql.ts new file mode 100644 index 0000000000..8c8eedb21f --- /dev/null +++ b/packages/core/framework/src/deps/mikro-orm-postgresql.ts @@ -0,0 +1 @@ +export * from "@medusajs/deps/mikro-orm/postgresql" diff --git a/packages/core/framework/src/deps/pg.ts b/packages/core/framework/src/deps/pg.ts new file mode 100644 index 0000000000..c00d20b94f --- /dev/null +++ b/packages/core/framework/src/deps/pg.ts @@ -0,0 +1 @@ +export * from "@medusajs/deps/pg" diff --git a/packages/core/framework/src/feature-flags/feature-flag-loader.ts b/packages/core/framework/src/feature-flags/feature-flag-loader.ts index 5d8e62b0ce..b82aa45ae2 100644 --- a/packages/core/framework/src/feature-flags/feature-flag-loader.ts +++ b/packages/core/framework/src/feature-flags/feature-flag-loader.ts @@ -5,7 +5,7 @@ import { FeatureFlag, FlagRouter, } from "@medusajs/utils" -import { asFunction } from "awilix" +import { asFunction } from "../deps/awilix" import { normalize } from "path" import { configManager } from "../config" import { container } from "../container" diff --git a/packages/core/framework/src/http/__fixtures__/server/index.ts b/packages/core/framework/src/http/__fixtures__/server/index.ts index 7fef285b37..f0bb4f771b 100644 --- a/packages/core/framework/src/http/__fixtures__/server/index.ts +++ b/packages/core/framework/src/http/__fixtures__/server/index.ts @@ -5,7 +5,7 @@ import { } from "@medusajs/modules-sdk" import { MedusaContainer } from "@medusajs/types" import { ContainerRegistrationKeys, generateJwtToken } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "../../../deps/awilix" import express from "express" import querystring from "querystring" import supertest from "supertest" diff --git a/packages/core/framework/src/http/__tests__/index.spec.ts b/packages/core/framework/src/http/__tests__/index.spec.ts index 5e6e78fda1..848da34154 100644 --- a/packages/core/framework/src/http/__tests__/index.spec.ts +++ b/packages/core/framework/src/http/__tests__/index.spec.ts @@ -2,7 +2,7 @@ import { ContainerRegistrationKeys, createMedusaContainer, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "../../deps/awilix" import express from "express" import { resolve } from "path" import { logger as defaultLogger } from "../../logger" diff --git a/packages/core/framework/src/jobs/__tests__/register-jobs.spec.ts b/packages/core/framework/src/jobs/__tests__/register-jobs.spec.ts index cb3ab3dd69..e98282db4c 100644 --- a/packages/core/framework/src/jobs/__tests__/register-jobs.spec.ts +++ b/packages/core/framework/src/jobs/__tests__/register-jobs.spec.ts @@ -3,7 +3,7 @@ import { ContainerRegistrationKeys, createMedusaContainer, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "../../deps/awilix" import { join } from "path" import { logger } from "../../logger" import { MockSchedulerStorage } from "../__fixtures__/mock-scheduler-storage" diff --git a/packages/core/framework/src/medusa-app-loader.ts b/packages/core/framework/src/medusa-app-loader.ts index 4cfdea0477..82ad09597e 100644 --- a/packages/core/framework/src/medusa-app-loader.ts +++ b/packages/core/framework/src/medusa-app-loader.ts @@ -25,8 +25,8 @@ import { upperCaseFirst, } from "@medusajs/utils" -import type { Knex } from "@mikro-orm/knex" -import { aliasTo, asValue } from "awilix" +import type { Knex } from "@medusajs/framework/mikro-orm/knex" +import { aliasTo, asValue } from "./deps/awilix" import { configManager } from "./config" import { container, diff --git a/packages/core/framework/src/migrations/migrator.ts b/packages/core/framework/src/migrations/migrator.ts index 9873a7db77..589684f045 100644 --- a/packages/core/framework/src/migrations/migrator.ts +++ b/packages/core/framework/src/migrations/migrator.ts @@ -1,5 +1,5 @@ import { MedusaContainer } from "@medusajs/types" -import { Knex } from "@mikro-orm/knex" +import { Knex } from "../deps/mikro-orm-knex" import { glob } from "glob" import { join } from "path" import { logger } from "../logger" diff --git a/packages/core/framework/src/mikro-orm-cli/bin.ts b/packages/core/framework/src/mikro-orm-cli/bin.ts index 4ca967e9e4..129a8b011d 100644 --- a/packages/core/framework/src/mikro-orm-cli/bin.ts +++ b/packages/core/framework/src/mikro-orm-cli/bin.ts @@ -11,8 +11,8 @@ * small, we should be okay with managing this wrapper. */ -import { CLIConfigurator, CLIHelper } from "@mikro-orm/cli" -import { ConfigurationLoader } from "@mikro-orm/core" +import { CLIConfigurator, CLIHelper } from "../deps/mikro-orm-cli" +import { ConfigurationLoader } from "../deps/mikro-orm-core" import { isAbsolute, join } from "path" /** diff --git a/packages/core/framework/src/subscribers/__tests__/index.spec.ts b/packages/core/framework/src/subscribers/__tests__/index.spec.ts index 16e96c37e1..87489e1f70 100644 --- a/packages/core/framework/src/subscribers/__tests__/index.spec.ts +++ b/packages/core/framework/src/subscribers/__tests__/index.spec.ts @@ -1,5 +1,5 @@ import { ContainerRegistrationKeys, Modules } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "../../deps/awilix" import { join } from "path" import { container } from "../../container" import { logger } from "../../logger" diff --git a/packages/core/framework/src/types/container.ts b/packages/core/framework/src/types/container.ts index e63d9aad59..fbe1ea8df9 100644 --- a/packages/core/framework/src/types/container.ts +++ b/packages/core/framework/src/types/container.ts @@ -32,8 +32,8 @@ import { RemoteQueryFunction, } from "@medusajs/types" import { ContainerRegistrationKeys, Modules } from "@medusajs/utils" -import { Knex } from "@mikro-orm/knex" -import { AwilixContainer, ResolveOptions } from "awilix" +import { Knex } from "../deps/mikro-orm-knex" +import { AwilixContainer, ResolveOptions } from "../deps/awilix" declare module "@medusajs/types" { export interface ModuleImplementations { diff --git a/packages/core/framework/src/workflows/__tests__/index.spec.ts b/packages/core/framework/src/workflows/__tests__/index.spec.ts index 4a3e91ea5b..ba476bcaa4 100644 --- a/packages/core/framework/src/workflows/__tests__/index.spec.ts +++ b/packages/core/framework/src/workflows/__tests__/index.spec.ts @@ -3,7 +3,7 @@ import { ContainerRegistrationKeys, createMedusaContainer, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "../../deps/awilix" import { join } from "path" import { logger } from "../../logger" import { productWorkflowId } from "../__fixtures__/workflows/deep-workflows/product-updater" diff --git a/packages/core/modules-sdk/package.json b/packages/core/modules-sdk/package.json index 8774387bd5..ab22201c05 100644 --- a/packages/core/modules-sdk/package.json +++ b/packages/core/modules-sdk/package.json @@ -32,30 +32,19 @@ }, "devDependencies": { "@medusajs/types": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", - "awilix": "^8.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", - "pg": "^8.16.3", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, "dependencies": { + "@medusajs/deps": "2.10.3", "@medusajs/orchestration": "2.10.3", "@medusajs/utils": "2.10.3" }, "peerDependencies": { - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", - "express": "^4.21.0", - "pg": "^8.16.3" + "express": "^4.21.0" } } diff --git a/packages/core/modules-sdk/src/loaders/__tests__/medusa-module.ts b/packages/core/modules-sdk/src/loaders/__tests__/medusa-module.ts index 0ce88427dd..7d3c67c9f4 100644 --- a/packages/core/modules-sdk/src/loaders/__tests__/medusa-module.ts +++ b/packages/core/modules-sdk/src/loaders/__tests__/medusa-module.ts @@ -1,7 +1,7 @@ import { InternalModuleDeclaration } from "@medusajs/types" import { MODULE_SCOPE } from "../../types" -import { asValue } from "awilix" +import { asValue } from "@medusajs/deps/awilix" import { MedusaModule } from "../../medusa-module" const mockRegisterMedusaModule = jest.fn().mockImplementation(() => { diff --git a/packages/core/modules-sdk/src/loaders/__tests__/module-provider-loader.ts b/packages/core/modules-sdk/src/loaders/__tests__/module-provider-loader.ts index 186867fc47..907ca748ae 100644 --- a/packages/core/modules-sdk/src/loaders/__tests__/module-provider-loader.ts +++ b/packages/core/modules-sdk/src/loaders/__tests__/module-provider-loader.ts @@ -1,5 +1,5 @@ import { createMedusaContainer } from "@medusajs/utils" -import { asFunction, Lifetime } from "awilix" +import { asFunction, Lifetime } from "@medusajs/deps/awilix" import { moduleProviderLoader } from "../module-provider-loader" describe("modules loader", () => { diff --git a/packages/core/modules-sdk/src/loaders/module-loader.ts b/packages/core/modules-sdk/src/loaders/module-loader.ts index 3beac7197f..fcd339e3c0 100644 --- a/packages/core/modules-sdk/src/loaders/module-loader.ts +++ b/packages/core/modules-sdk/src/loaders/module-loader.ts @@ -1,5 +1,5 @@ import { Logger, MedusaContainer, ModuleResolution } from "@medusajs/types" -import { asValue } from "awilix" +import { asValue } from "@medusajs/deps/awilix" import { EOL } from "os" import { MODULE_SCOPE } from "../types" import { loadInternalModule } from "./utils" diff --git a/packages/core/modules-sdk/src/loaders/module-provider-loader.ts b/packages/core/modules-sdk/src/loaders/module-provider-loader.ts index f167e5f85a..e77f8242cd 100644 --- a/packages/core/modules-sdk/src/loaders/module-provider-loader.ts +++ b/packages/core/modules-sdk/src/loaders/module-provider-loader.ts @@ -7,7 +7,7 @@ import { normalizeImportPathWithSource, promiseAll, } from "@medusajs/utils" -import { asFunction, Lifetime } from "awilix" +import { asFunction, Lifetime } from "@medusajs/deps/awilix" export async function moduleProviderLoader({ container, diff --git a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-dml-mixed-without-joiner-config/models/entity.ts b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-dml-mixed-without-joiner-config/models/entity.ts index 6aaa9fb4a9..a0640ea7a4 100644 --- a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-dml-mixed-without-joiner-config/models/entity.ts +++ b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-dml-mixed-without-joiner-config/models/entity.ts @@ -1,4 +1,4 @@ -import { Entity, Property } from "@mikro-orm/core" +import { Entity, Property } from "@medusajs/deps/mikro-orm/core" @Entity() export class EntityModel { diff --git a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity-2.ts b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity-2.ts index 9fb792adb7..27c0469496 100644 --- a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity-2.ts +++ b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity-2.ts @@ -1,4 +1,4 @@ -import { Entity, Property } from "@mikro-orm/core" +import { Entity, Property } from "@medusajs/deps/mikro-orm/core" @Entity() export class Entity2 { diff --git a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity.ts b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity.ts index 6aaa9fb4a9..a0640ea7a4 100644 --- a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity.ts +++ b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-joiner-config/models/entity.ts @@ -1,4 +1,4 @@ -import { Entity, Property } from "@mikro-orm/core" +import { Entity, Property } from "@medusajs/deps/mikro-orm/core" @Entity() export class EntityModel { diff --git a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity-2.ts b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity-2.ts index 9fb792adb7..27c0469496 100644 --- a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity-2.ts +++ b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity-2.ts @@ -1,4 +1,4 @@ -import { Entity, Property } from "@mikro-orm/core" +import { Entity, Property } from "@medusajs/deps/mikro-orm/core" @Entity() export class Entity2 { diff --git a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity.ts b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity.ts index 6aaa9fb4a9..a0640ea7a4 100644 --- a/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity.ts +++ b/packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-without-joiner-config/models/entity.ts @@ -1,4 +1,4 @@ -import { Entity, Property } from "@mikro-orm/core" +import { Entity, Property } from "@medusajs/deps/mikro-orm/core" @Entity() export class EntityModel { diff --git a/packages/core/modules-sdk/src/loaders/utils/load-internal.ts b/packages/core/modules-sdk/src/loaders/utils/load-internal.ts index cc16b75f44..5f2f0f8d77 100644 --- a/packages/core/modules-sdk/src/loaders/utils/load-internal.ts +++ b/packages/core/modules-sdk/src/loaders/utils/load-internal.ts @@ -31,7 +31,7 @@ import { stringifyCircular, toMikroOrmEntities, } from "@medusajs/utils" -import { asFunction, asValue } from "awilix" +import { asFunction, asValue } from "@medusajs/deps/awilix" import { statSync } from "fs" import { readdir } from "fs/promises" import { dirname, join, resolve } from "path" diff --git a/packages/core/modules-sdk/src/medusa-app.ts b/packages/core/modules-sdk/src/medusa-app.ts index 68366e2388..5a6848e0ee 100644 --- a/packages/core/modules-sdk/src/medusa-app.ts +++ b/packages/core/modules-sdk/src/medusa-app.ts @@ -33,7 +33,7 @@ import { promiseAll, registerFeatureFlag, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/deps/awilix" import { Link } from "./link" import { MedusaModule, diff --git a/packages/core/modules-sdk/src/medusa-module.ts b/packages/core/modules-sdk/src/medusa-module.ts index aea24637cc..8631db749d 100644 --- a/packages/core/modules-sdk/src/medusa-module.ts +++ b/packages/core/modules-sdk/src/medusa-module.ts @@ -18,7 +18,7 @@ import { simpleHash, stringifyCircular, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/deps/awilix" import { EOL } from "os" import { moduleLoader, diff --git a/packages/core/orchestration/package.json b/packages/core/orchestration/package.json index af5ae7c68f..c5f0d61e9c 100644 --- a/packages/core/orchestration/package.json +++ b/packages/core/orchestration/package.json @@ -27,30 +27,19 @@ "license": "MIT", "devDependencies": { "@medusajs/types": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", - "awilix": "^8.0.1", "jest": "^29.7.0", - "pg": "^8.16.3", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, "dependencies": { + "@medusajs/deps": "2.10.3", "@medusajs/utils": "2.10.3", "ulid": "^2.3.0" }, "peerDependencies": { - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", - "express": "^4.21.0", - "pg": "^8.16.3" + "express": "^4.21.0" }, "scripts": { "build": "rimraf dist && tsc --build", diff --git a/packages/core/orchestration/src/workflow/global-workflow.ts b/packages/core/orchestration/src/workflow/global-workflow.ts index 520069d594..fd72a75711 100644 --- a/packages/core/orchestration/src/workflow/global-workflow.ts +++ b/packages/core/orchestration/src/workflow/global-workflow.ts @@ -1,6 +1,6 @@ import { Context, LoadedModule, MedusaContainer } from "@medusajs/types" import { createMedusaContainer } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/deps/awilix" import { DistributedTransactionEvents, diff --git a/packages/core/orchestration/src/workflow/local-workflow.ts b/packages/core/orchestration/src/workflow/local-workflow.ts index 74e2cad8fa..9c2324c208 100644 --- a/packages/core/orchestration/src/workflow/local-workflow.ts +++ b/packages/core/orchestration/src/workflow/local-workflow.ts @@ -8,7 +8,7 @@ import { MedusaError, MedusaModuleType, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/deps/awilix" import { DistributedTransactionEvent, DistributedTransactionEvents, diff --git a/packages/core/types/package.json b/packages/core/types/package.json index 71f5ab636a..510be3ca55 100644 --- a/packages/core/types/package.json +++ b/packages/core/types/package.json @@ -35,8 +35,8 @@ "bignumber.js": "^9.1.2" }, "devDependencies": { + "@medusajs/deps": "2.10.3", "@types/jsonwebtoken": "^8.5.9", - "awilix": "^8.0.1", "expect-type": "^0.20.0", "ioredis": "^5.4.1", "rimraf": "^5.0.1", @@ -44,7 +44,6 @@ "vite": "^5.4.14" }, "peerDependencies": { - "awilix": "^8.0.1", "ioredis": "^5.4.1", "vite": "^5 || ^6" }, diff --git a/packages/core/types/src/common/medusa-container.ts b/packages/core/types/src/common/medusa-container.ts index f2b9fc7c27..5ecee803dc 100644 --- a/packages/core/types/src/common/medusa-container.ts +++ b/packages/core/types/src/common/medusa-container.ts @@ -1,4 +1,4 @@ -import { AwilixContainer, ResolveOptions } from "awilix" +import type { AwilixContainer, ResolveOptions } from "@medusajs/deps/awilix" /** * The following interface acts as a bucket that other modules or the diff --git a/packages/core/types/src/dal/repository-service.ts b/packages/core/types/src/dal/repository-service.ts index 086b4c442c..0b714d6b3f 100644 --- a/packages/core/types/src/dal/repository-service.ts +++ b/packages/core/types/src/dal/repository-service.ts @@ -5,7 +5,7 @@ import { FindOptions, UpsertWithReplaceConfig, } from "./index" -import { EntityClass } from "@mikro-orm/core" +import type { EntityClass } from "@medusajs/deps/mikro-orm/core" import { IDmlEntity, InferTypeOf } from "../dml" type EntityClassName = string diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index aa22aed0ef..a22e5cc1cc 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -27,18 +27,12 @@ "license": "MIT", "devDependencies": { "@medusajs/types": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "@types/express": "^4.17.21", - "awilix": "^8.0.1", "expect-type": "^0.20.0", "express": "^4.21.0", "jest": "^29.7.0", - "pg": "^8.16.3", "pg-god": "^1.0.12", "rimraf": "^5.0.1", "typescript": "^5.6.2" @@ -48,6 +42,7 @@ "@graphql-codegen/typescript": "^4.0.9", "@graphql-tools/merge": "^9.0.7", "@graphql-tools/schema": "^10.0.6", + "@medusajs/deps": "2.10.3", "@types/pluralize": "^0.0.33", "bignumber.js": "^9.1.2", "dotenv": "^16.4.5", @@ -60,13 +55,7 @@ "zod": "3.25.76" }, "peerDependencies": { - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", - "express": "^4.21.0", - "pg": "^8.16.3" + "express": "^4.21.0" }, "scripts": { "build": "rimraf dist && tsc --build", diff --git a/packages/core/utils/src/common/create-psql-index-helper.ts b/packages/core/utils/src/common/create-psql-index-helper.ts index b2b15436e8..5958702fe9 100644 --- a/packages/core/utils/src/common/create-psql-index-helper.ts +++ b/packages/core/utils/src/common/create-psql-index-helper.ts @@ -1,4 +1,4 @@ -import { Index } from "@mikro-orm/core" +import { Index } from "@medusajs/deps/mikro-orm/core" /** * Create a PSQL index statement diff --git a/packages/core/utils/src/common/medusa-container.ts b/packages/core/utils/src/common/medusa-container.ts index c98607e12c..87d3c0aeb5 100644 --- a/packages/core/utils/src/common/medusa-container.ts +++ b/packages/core/utils/src/common/medusa-container.ts @@ -6,7 +6,7 @@ import { ClassOrFunctionReturning, createContainer, Resolver, -} from "awilix" +} from "@medusajs/deps/awilix" function asArray( resolvers: (ClassOrFunctionReturning | Resolver)[] diff --git a/packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts b/packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts index 4b8a839484..54e674e53d 100644 --- a/packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts +++ b/packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts @@ -8,7 +8,7 @@ import { PrimaryKey, Property, Rel, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" import { Searchable } from "../decorators/searchable" @Entity() diff --git a/packages/core/utils/src/dal/mikro-orm/__tests__/base-entity.spec.ts b/packages/core/utils/src/dal/mikro-orm/__tests__/base-entity.spec.ts index 5a15dec87e..70f79c2850 100644 --- a/packages/core/utils/src/dal/mikro-orm/__tests__/base-entity.spec.ts +++ b/packages/core/utils/src/dal/mikro-orm/__tests__/base-entity.spec.ts @@ -1,5 +1,10 @@ -import { Entity, MikroORM, OnInit, Property } from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +import { + Entity, + MikroORM, + OnInit, + Property, +} from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { BaseEntity } from "../base-entity" describe("BaseEntity", () => { diff --git a/packages/core/utils/src/dal/mikro-orm/__tests__/big-number-field.spec.ts b/packages/core/utils/src/dal/mikro-orm/__tests__/big-number-field.spec.ts index a2e49231e2..22e7939c54 100644 --- a/packages/core/utils/src/dal/mikro-orm/__tests__/big-number-field.spec.ts +++ b/packages/core/utils/src/dal/mikro-orm/__tests__/big-number-field.spec.ts @@ -1,6 +1,6 @@ import { BigNumberRawValue } from "@medusajs/types" -import { Entity, MikroORM, PrimaryKey } from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +import { Entity, MikroORM, PrimaryKey } from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { BigNumber } from "../../../totals/big-number" import { MikroOrmBigNumberProperty } from "../big-number-field" diff --git a/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-free-text-search-filter.spec.ts b/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-free-text-search-filter.spec.ts index eb4c4c92f8..f0bfb31155 100644 --- a/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-free-text-search-filter.spec.ts +++ b/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-free-text-search-filter.spec.ts @@ -1,5 +1,5 @@ -import { MikroORM } from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +import { MikroORM } from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { SearchableEntity1, SearchableEntity2 } from "../__fixtures__/utils" import { mikroOrmFreeTextSearchFilterOptionsFactory } from "../mikro-orm-free-text-search-filter" diff --git a/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-serializer.spec.ts b/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-serializer.spec.ts index 5acd333a04..061feab7b5 100644 --- a/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-serializer.spec.ts +++ b/packages/core/utils/src/dal/mikro-orm/__tests__/mikro-orm-serializer.spec.ts @@ -1,5 +1,5 @@ -import { MikroORM } from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +import { MikroORM } from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { Entity1WithUnDecoratedProp, Entity2WithUnDecoratedProp, diff --git a/packages/core/utils/src/dal/mikro-orm/base-entity.ts b/packages/core/utils/src/dal/mikro-orm/base-entity.ts index 89ecdfe442..8d4a2c3af5 100644 --- a/packages/core/utils/src/dal/mikro-orm/base-entity.ts +++ b/packages/core/utils/src/dal/mikro-orm/base-entity.ts @@ -4,7 +4,7 @@ import { OnInit, OptionalProps, PrimaryKey, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" import { generateEntityId } from "../../common" @Entity({ abstract: true }) diff --git a/packages/core/utils/src/dal/mikro-orm/big-number-field.ts b/packages/core/utils/src/dal/mikro-orm/big-number-field.ts index 5ec2e68c01..744907cec1 100644 --- a/packages/core/utils/src/dal/mikro-orm/big-number-field.ts +++ b/packages/core/utils/src/dal/mikro-orm/big-number-field.ts @@ -1,5 +1,5 @@ import { BigNumberInput } from "@medusajs/types" -import { EntityProperty, Platform, Property, Type } from "@mikro-orm/core" +import { EntityProperty, Platform, Property, Type } from "@medusajs/deps/mikro-orm/core" import { isDefined, isObject, isPresent, trimZeros } from "../../common" import { BigNumber } from "../../totals/big-number" diff --git a/packages/core/utils/src/dal/mikro-orm/custom-db-migrator.ts b/packages/core/utils/src/dal/mikro-orm/custom-db-migrator.ts index fed9108a1f..bb20ad1901 100644 --- a/packages/core/utils/src/dal/mikro-orm/custom-db-migrator.ts +++ b/packages/core/utils/src/dal/mikro-orm/custom-db-migrator.ts @@ -1,10 +1,10 @@ import { Constructor } from "@medusajs/types" -import { MikroORM, Utils } from "@mikro-orm/core" +import { MikroORM, Utils } from "@medusajs/deps/mikro-orm/core" import { Migrator as BaseMigrator, Migration, UmzugMigration, -} from "@mikro-orm/migrations" +} from "@medusajs/deps/mikro-orm/migrations" import { isFileDisabled, isFileSkipped } from "../../common/define-file-config" import { dynamicImport } from "../../common/dynamic-import" diff --git a/packages/core/utils/src/dal/mikro-orm/db-error-mapper.ts b/packages/core/utils/src/dal/mikro-orm/db-error-mapper.ts index 5d44ec62c5..bd03b7f98d 100644 --- a/packages/core/utils/src/dal/mikro-orm/db-error-mapper.ts +++ b/packages/core/utils/src/dal/mikro-orm/db-error-mapper.ts @@ -4,7 +4,7 @@ import { NotFoundError, NotNullConstraintViolationException, UniqueConstraintViolationException, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" import { MedusaError, upperCaseFirst } from "../../common" function parseValue(value: string) { diff --git a/packages/core/utils/src/dal/mikro-orm/decorators/foreign-key.ts b/packages/core/utils/src/dal/mikro-orm/decorators/foreign-key.ts index 8d2cf213af..db430c1c06 100644 --- a/packages/core/utils/src/dal/mikro-orm/decorators/foreign-key.ts +++ b/packages/core/utils/src/dal/mikro-orm/decorators/foreign-key.ts @@ -1,4 +1,4 @@ -import { MetadataStorage } from "@mikro-orm/core" +import { MetadataStorage } from "@medusajs/deps/mikro-orm/core" export function ForeignKey() { return function (target, propertyName) { diff --git a/packages/core/utils/src/dal/mikro-orm/decorators/searchable.ts b/packages/core/utils/src/dal/mikro-orm/decorators/searchable.ts index d98f592413..d16941f947 100644 --- a/packages/core/utils/src/dal/mikro-orm/decorators/searchable.ts +++ b/packages/core/utils/src/dal/mikro-orm/decorators/searchable.ts @@ -1,4 +1,4 @@ -import { MetadataStorage } from "@mikro-orm/core" +import { MetadataStorage } from "@medusajs/deps/mikro-orm/core" export function Searchable() { return function (target, propertyName) { diff --git a/packages/core/utils/src/dal/mikro-orm/integration-tests/__fixtures__/utils.ts b/packages/core/utils/src/dal/mikro-orm/integration-tests/__fixtures__/utils.ts index dbf28eb70e..862443d30f 100644 --- a/packages/core/utils/src/dal/mikro-orm/integration-tests/__fixtures__/utils.ts +++ b/packages/core/utils/src/dal/mikro-orm/integration-tests/__fixtures__/utils.ts @@ -6,7 +6,7 @@ import { PrimaryKey, Property, Rel, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" import { Searchable } from "../../decorators/searchable" // Circular dependency one level diff --git a/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/mikro-orm-repository.spec.ts b/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/mikro-orm-repository.spec.ts index 44b73ad930..f37a5cdff7 100644 --- a/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/mikro-orm-repository.spec.ts +++ b/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/mikro-orm-repository.spec.ts @@ -13,8 +13,8 @@ import { Property, Unique, wrap, -} from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +} from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import BigNumber from "bignumber.js" import { dropDatabase } from "pg-god" import { MikroOrmBigNumberProperty } from "../../big-number-field" diff --git a/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/utils.spec.ts b/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/utils.spec.ts index 6a492d6304..8552d3f68d 100644 --- a/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/utils.spec.ts +++ b/packages/core/utils/src/dal/mikro-orm/integration-tests/__tests__/utils.spec.ts @@ -1,5 +1,8 @@ -import { MikroORM } from "@mikro-orm/core" -import { defineConfig, SqlEntityManager } from "@mikro-orm/postgresql" +import { MikroORM } from "@medusajs/deps/mikro-orm/core" +import { + defineConfig, + SqlEntityManager, +} from "@medusajs/deps/mikro-orm/postgresql" import { dropDatabase } from "pg-god" import { mikroOrmUpdateDeletedAtRecursively } from "../../utils" import { getDatabaseURL, pgGodCredentials } from "../__fixtures__/database" @@ -17,8 +20,8 @@ import { const dbName = "mikroorm-utils-integration-1" -jest.mock("@mikro-orm/core", () => ({ - ...jest.requireActual("@mikro-orm/core"), +jest.mock("@medusajs/deps/mikro-orm/core", () => ({ + ...jest.requireActual("@medusajs/deps/mikro-orm/core"), wrap: jest.fn().mockImplementation((entity) => ({ ...entity, init: jest.fn().mockResolvedValue(entity), diff --git a/packages/core/utils/src/dal/mikro-orm/mikro-orm-create-connection.ts b/packages/core/utils/src/dal/mikro-orm/mikro-orm-create-connection.ts index 11736dcf66..79d91cea48 100644 --- a/packages/core/utils/src/dal/mikro-orm/mikro-orm-create-connection.ts +++ b/packages/core/utils/src/dal/mikro-orm/mikro-orm-create-connection.ts @@ -1,6 +1,6 @@ import { ModuleServiceInitializeOptions } from "@medusajs/types" -import { Filter as MikroORMFilter } from "@mikro-orm/core" -import { TSMigrationGenerator } from "@mikro-orm/migrations" +import { Filter as MikroORMFilter } from "@medusajs/deps/mikro-orm/core" +import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations" import { isString, retryExecution, stringifyCircular } from "../../common" import { normalizeMigrationSQL } from "../utils" import { CustomDBMigrator } from "./custom-db-migrator" @@ -83,7 +83,9 @@ export async function mikroOrmCreateConnection( schema = database.connection.context?.client?.config?.searchPath } - const { MikroORM, defineConfig } = await import("@mikro-orm/postgresql") + const { MikroORM, defineConfig } = await import( + "@medusajs/deps/mikro-orm/postgresql" + ) const mikroOrmConfig = defineConfig({ discovery: { disableDynamicFileAccess: true, warnWhenNoEntities: false }, entities, diff --git a/packages/core/utils/src/dal/mikro-orm/mikro-orm-free-text-search-filter.ts b/packages/core/utils/src/dal/mikro-orm/mikro-orm-free-text-search-filter.ts index 0397a0d8f3..0f26800e0e 100644 --- a/packages/core/utils/src/dal/mikro-orm/mikro-orm-free-text-search-filter.ts +++ b/packages/core/utils/src/dal/mikro-orm/mikro-orm-free-text-search-filter.ts @@ -3,9 +3,10 @@ import type { EntityProperty, FindOneOptions, FindOptions, -} from "@mikro-orm/core" -import { EntityMetadata, raw, ReferenceKind } from "@mikro-orm/core" -import { SqlEntityManager } from "@mikro-orm/postgresql" + EntityMetadata, +} from "@medusajs/deps/mikro-orm/core" +import { raw, ReferenceKind } from "@medusajs/deps/mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql" export const FreeTextSearchFilterKeyPrefix = "freeTextSearch_" diff --git a/packages/core/utils/src/dal/mikro-orm/mikro-orm-repository.ts b/packages/core/utils/src/dal/mikro-orm/mikro-orm-repository.ts index a00950b0ca..26bf8fcfdf 100644 --- a/packages/core/utils/src/dal/mikro-orm/mikro-orm-repository.ts +++ b/packages/core/utils/src/dal/mikro-orm/mikro-orm-repository.ts @@ -21,8 +21,8 @@ import { FilterQuery as MikroFilterQuery, FindOptions as MikroOptions, ReferenceKind, -} from "@mikro-orm/core" -import { SqlEntityManager } from "@mikro-orm/postgresql" +} from "@medusajs/deps/mikro-orm/core" +import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql" import { arrayDifference, isString, diff --git a/packages/core/utils/src/dal/mikro-orm/mikro-orm-serializer.ts b/packages/core/utils/src/dal/mikro-orm/mikro-orm-serializer.ts index 305800e772..711849cc2a 100644 --- a/packages/core/utils/src/dal/mikro-orm/mikro-orm-serializer.ts +++ b/packages/core/utils/src/dal/mikro-orm/mikro-orm-serializer.ts @@ -15,7 +15,7 @@ import { ReferenceKind, SerializationContext, Utils, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" const STATIC_OPTIONS_SHAPE: { populate: string[] | boolean | undefined diff --git a/packages/core/utils/src/dal/mikro-orm/utils.ts b/packages/core/utils/src/dal/mikro-orm/utils.ts index a34f9162b0..ef8be272af 100644 --- a/packages/core/utils/src/dal/mikro-orm/utils.ts +++ b/packages/core/utils/src/dal/mikro-orm/utils.ts @@ -1,5 +1,5 @@ -import { EntityMetadata, FindOptions } from "@mikro-orm/core" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { EntityMetadata, FindOptions } from "@medusajs/deps/mikro-orm/core" +import { SqlEntityManager } from "@medusajs/deps/mikro-orm/postgresql" import { promiseAll } from "../../common" import { isString } from "../../common/is-string" import { buildQuery } from "../../modules-sdk/build-query" diff --git a/packages/core/utils/src/dml/__tests__/entity-builder.spec.ts b/packages/core/utils/src/dml/__tests__/entity-builder.spec.ts index b7b68edb9e..1e45d094bb 100644 --- a/packages/core/utils/src/dml/__tests__/entity-builder.spec.ts +++ b/packages/core/utils/src/dml/__tests__/entity-builder.spec.ts @@ -1,4 +1,8 @@ -import { ArrayType, EntityMetadata, MetadataStorage } from "@mikro-orm/core" +import { + ArrayType, + EntityMetadata, + MetadataStorage, +} from "@medusajs/deps/mikro-orm/core" import { expectTypeOf } from "expect-type" import { DmlEntity } from "../entity" import { model } from "../entity-builder" diff --git a/packages/core/utils/src/dml/helpers/create-mikro-orm-entity.ts b/packages/core/utils/src/dml/helpers/create-mikro-orm-entity.ts index 139c371d5f..7d143e127d 100644 --- a/packages/core/utils/src/dml/helpers/create-mikro-orm-entity.ts +++ b/packages/core/utils/src/dml/helpers/create-mikro-orm-entity.ts @@ -6,7 +6,7 @@ import type { Infer, PropertyType, } from "@medusajs/types" -import { Entity, Filter, MetadataStorage } from "@mikro-orm/core" +import { Entity, Filter, MetadataStorage } from "@medusajs/deps/mikro-orm/core" import { mikroOrmFreeTextSearchFilterOptionsFactory, diff --git a/packages/core/utils/src/dml/helpers/entity-builder/define-property.ts b/packages/core/utils/src/dml/helpers/entity-builder/define-property.ts index dcd68a6567..1a400cc943 100644 --- a/packages/core/utils/src/dml/helpers/entity-builder/define-property.ts +++ b/packages/core/utils/src/dml/helpers/entity-builder/define-property.ts @@ -12,7 +12,7 @@ import { PrimaryKey, Property, Utils, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" import { generateEntityId, isDefined } from "../../../common" import { MikroOrmBigNumberProperty } from "../../../dal" import { PrimaryKeyModifier } from "../../properties/primary-key" diff --git a/packages/core/utils/src/dml/helpers/entity-builder/define-relationship.ts b/packages/core/utils/src/dml/helpers/entity-builder/define-relationship.ts index 1ff04a0810..ae57496354 100644 --- a/packages/core/utils/src/dml/helpers/entity-builder/define-relationship.ts +++ b/packages/core/utils/src/dml/helpers/entity-builder/define-relationship.ts @@ -17,7 +17,7 @@ import { OnInit, Property, rel, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" import { camelToSnakeCase, pluralize } from "../../../common" import { DmlEntity } from "../../entity" import { BelongsTo } from "../../relations" diff --git a/packages/core/utils/src/dml/helpers/mikro-orm/apply-checks.ts b/packages/core/utils/src/dml/helpers/mikro-orm/apply-checks.ts index 6bbdbb8478..591d8feac6 100644 --- a/packages/core/utils/src/dml/helpers/mikro-orm/apply-checks.ts +++ b/packages/core/utils/src/dml/helpers/mikro-orm/apply-checks.ts @@ -1,4 +1,4 @@ -import { Check, CheckOptions } from "@mikro-orm/core" +import { Check, CheckOptions } from "@medusajs/deps/mikro-orm/core" import { CheckConstraint, EntityConstructor } from "@medusajs/types" /** diff --git a/packages/core/utils/src/dml/helpers/mikro-orm/build-indexes.ts b/packages/core/utils/src/dml/helpers/mikro-orm/build-indexes.ts index af725ce7a3..1da26e1fe5 100644 --- a/packages/core/utils/src/dml/helpers/mikro-orm/build-indexes.ts +++ b/packages/core/utils/src/dml/helpers/mikro-orm/build-indexes.ts @@ -1,5 +1,5 @@ import { DMLSchema, EntityConstructor, EntityIndex } from "@medusajs/types" -import { MetadataStorage } from "@mikro-orm/core" +import { MetadataStorage } from "@medusajs/deps/mikro-orm/core" import { arrayDifference } from "../../../common" /* diff --git a/packages/core/utils/src/dml/integration-tests/__tests__/entity.spec.ts b/packages/core/utils/src/dml/integration-tests/__tests__/entity.spec.ts index f8d426cd17..a8b1424072 100644 --- a/packages/core/utils/src/dml/integration-tests/__tests__/entity.spec.ts +++ b/packages/core/utils/src/dml/integration-tests/__tests__/entity.spec.ts @@ -1,6 +1,6 @@ import { EntityConstructor } from "@medusajs/types" -import { MetadataStorage, MikroORM } from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { join } from "path" import { createDatabase, dropDatabase } from "pg-god" import { FileSystem } from "../../../common" diff --git a/packages/core/utils/src/dml/integration-tests/__tests__/enum.spec.ts b/packages/core/utils/src/dml/integration-tests/__tests__/enum.spec.ts index b193959076..0ec2cadac7 100644 --- a/packages/core/utils/src/dml/integration-tests/__tests__/enum.spec.ts +++ b/packages/core/utils/src/dml/integration-tests/__tests__/enum.spec.ts @@ -3,8 +3,8 @@ import { CheckConstraintViolationException, MetadataStorage, MikroORM, -} from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +} from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { join } from "path" import { createDatabase, dropDatabase } from "pg-god" import { FileSystem } from "../../../common" diff --git a/packages/core/utils/src/dml/integration-tests/__tests__/has-one-belongs-to.spec.ts b/packages/core/utils/src/dml/integration-tests/__tests__/has-one-belongs-to.spec.ts index 7fe0fded46..68db70b09a 100644 --- a/packages/core/utils/src/dml/integration-tests/__tests__/has-one-belongs-to.spec.ts +++ b/packages/core/utils/src/dml/integration-tests/__tests__/has-one-belongs-to.spec.ts @@ -1,6 +1,6 @@ import { EntityConstructor } from "@medusajs/types" -import { MetadataStorage, MikroORM } from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { join } from "path" import { createDatabase, dropDatabase } from "pg-god" import { FileSystem } from "../../../common" diff --git a/packages/core/utils/src/dml/integration-tests/__tests__/many-to-many.spec.ts b/packages/core/utils/src/dml/integration-tests/__tests__/many-to-many.spec.ts index d88db258d1..3b9e50dae1 100644 --- a/packages/core/utils/src/dml/integration-tests/__tests__/many-to-many.spec.ts +++ b/packages/core/utils/src/dml/integration-tests/__tests__/many-to-many.spec.ts @@ -1,6 +1,6 @@ import { EntityConstructor } from "@medusajs/types" -import { MetadataStorage, MikroORM } from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { join } from "path" import { createDatabase, dropDatabase } from "pg-god" import { FileSystem } from "../../../common" diff --git a/packages/core/utils/src/dml/integration-tests/__tests__/many-to-one.spec.ts b/packages/core/utils/src/dml/integration-tests/__tests__/many-to-one.spec.ts index 3fa4971a47..53e1494e83 100644 --- a/packages/core/utils/src/dml/integration-tests/__tests__/many-to-one.spec.ts +++ b/packages/core/utils/src/dml/integration-tests/__tests__/many-to-one.spec.ts @@ -1,6 +1,9 @@ import { EntityConstructor } from "@medusajs/types" -import { MetadataStorage, MikroORM } from "@mikro-orm/core" -import { defineConfig, SqlEntityManager } from "@mikro-orm/postgresql" +import { MetadataStorage, MikroORM } from "@medusajs/deps/mikro-orm/core" +import { + defineConfig, + SqlEntityManager, +} from "@medusajs/deps/mikro-orm/postgresql" import { join } from "path" import { createDatabase, dropDatabase } from "pg-god" import { FileSystem } from "../../../common" diff --git a/packages/core/utils/src/migrations/index.ts b/packages/core/utils/src/migrations/index.ts index 4ee283d243..99db453168 100644 --- a/packages/core/utils/src/migrations/index.ts +++ b/packages/core/utils/src/migrations/index.ts @@ -1,10 +1,13 @@ -import { MikroORM, MikroORMOptions } from "@mikro-orm/core" +import { MikroORM, MikroORMOptions } from "@medusajs/deps/mikro-orm/core" import { MigrateOptions, MigrationResult, UmzugMigration, -} from "@mikro-orm/migrations" -import { defineConfig, PostgreSqlDriver } from "@mikro-orm/postgresql" +} from "@medusajs/deps/mikro-orm/migrations" +import { + defineConfig, + PostgreSqlDriver, +} from "@medusajs/deps/mikro-orm/postgresql" import { EventEmitter } from "events" import { access, mkdir, rename, writeFile } from "fs/promises" import { dirname, join } from "path" diff --git a/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-generate.spec.ts b/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-generate.spec.ts index b60a29b6d6..b0cef88f44 100644 --- a/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-generate.spec.ts +++ b/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-generate.spec.ts @@ -1,6 +1,6 @@ import { join } from "path" import { setTimeout } from "timers/promises" -import { MetadataStorage } from "@mikro-orm/core" +import { MetadataStorage } from "@medusajs/deps/mikro-orm/core" import { Migrations } from "../../index" import { FileSystem } from "../../../common" diff --git a/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-revert.spec.ts b/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-revert.spec.ts index 50de45462a..425ef3036c 100644 --- a/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-revert.spec.ts +++ b/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-revert.spec.ts @@ -1,6 +1,6 @@ -import { MetadataStorage } from "@mikro-orm/core" -import { TSMigrationGenerator } from "@mikro-orm/migrations" -import { MikroORM } from "@mikro-orm/postgresql" +import { MetadataStorage } from "@medusajs/deps/mikro-orm/core" +import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations" +import { MikroORM } from "@medusajs/deps/mikro-orm/postgresql" import { join } from "path" import { createDatabase, dropDatabase } from "pg-god" diff --git a/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-run.spec.ts b/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-run.spec.ts index 1ff76cf74d..92c983e965 100644 --- a/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-run.spec.ts +++ b/packages/core/utils/src/migrations/integration-tests/__tests__/migrations-run.spec.ts @@ -1,8 +1,8 @@ import { join } from "path" -import { MikroORM } from "@mikro-orm/postgresql" -import { MetadataStorage } from "@mikro-orm/core" +import { MikroORM } from "@medusajs/deps/mikro-orm/postgresql" +import { MetadataStorage } from "@medusajs/deps/mikro-orm/core" import { createDatabase, dropDatabase } from "pg-god" -import { TSMigrationGenerator } from "@mikro-orm/migrations" +import { TSMigrationGenerator } from "@medusajs/deps/mikro-orm/migrations" import { model } from "../../../dml" import { FileSystem } from "../../../common" diff --git a/packages/core/utils/src/modules-sdk/create-pg-connection.ts b/packages/core/utils/src/modules-sdk/create-pg-connection.ts index 4a278fcdf2..9a70f5b8d2 100644 --- a/packages/core/utils/src/modules-sdk/create-pg-connection.ts +++ b/packages/core/utils/src/modules-sdk/create-pg-connection.ts @@ -1,5 +1,5 @@ import { ModuleServiceInitializeOptions } from "@medusajs/types" -import { knex } from "@mikro-orm/postgresql" +import { knex } from "@medusajs/deps/mikro-orm/postgresql" type Options = ModuleServiceInitializeOptions["database"] diff --git a/packages/core/utils/src/modules-sdk/loaders/container-loader-factory.ts b/packages/core/utils/src/modules-sdk/loaders/container-loader-factory.ts index a3939ba716..2a1031d598 100644 --- a/packages/core/utils/src/modules-sdk/loaders/container-loader-factory.ts +++ b/packages/core/utils/src/modules-sdk/loaders/container-loader-factory.ts @@ -7,7 +7,7 @@ import { RepositoryService, } from "@medusajs/types" -import { asClass } from "awilix" +import { asClass } from "@medusajs/deps/awilix" import { MedusaInternalService } from "../medusa-internal-service" import { lowerCaseFirst } from "../../common" import { diff --git a/packages/core/utils/src/modules-sdk/loaders/mikro-orm-connection-loader.ts b/packages/core/utils/src/modules-sdk/loaders/mikro-orm-connection-loader.ts index 2c86a86ae3..5bff66f436 100644 --- a/packages/core/utils/src/modules-sdk/loaders/mikro-orm-connection-loader.ts +++ b/packages/core/utils/src/modules-sdk/loaders/mikro-orm-connection-loader.ts @@ -1,6 +1,9 @@ import { Logger, MedusaContainer, ModulesSdkTypes } from "@medusajs/types" -import { PostgreSqlDriver, SqlEntityManager } from "@mikro-orm/postgresql" -import { asValue } from "awilix" +import { + PostgreSqlDriver, + SqlEntityManager, +} from "@medusajs/deps/mikro-orm/postgresql" +import { asValue } from "@medusajs/deps/awilix" import { ContainerRegistrationKeys, MedusaError } from "../../common" import { mikroOrmCreateConnection } from "../../dal" import { isSharedConnectionSymbol } from "../create-pg-connection" diff --git a/packages/core/utils/src/modules-sdk/medusa-internal-service.ts b/packages/core/utils/src/modules-sdk/medusa-internal-service.ts index 09defb3c2e..a9244d8127 100644 --- a/packages/core/utils/src/modules-sdk/medusa-internal-service.ts +++ b/packages/core/utils/src/modules-sdk/medusa-internal-service.ts @@ -14,7 +14,7 @@ import { type EntityClass, type EntityManager, type EntitySchema, -} from "@mikro-orm/core" +} from "@medusajs/deps/mikro-orm/core" import { isDefined, isObject, diff --git a/packages/core/utils/src/modules-sdk/migration-scripts/seed.ts b/packages/core/utils/src/modules-sdk/migration-scripts/seed.ts index f42a8d34c3..eadef13250 100644 --- a/packages/core/utils/src/modules-sdk/migration-scripts/seed.ts +++ b/packages/core/utils/src/modules-sdk/migration-scripts/seed.ts @@ -1,5 +1,5 @@ import { LoaderOptions, Logger, ModulesSdkTypes } from "@medusajs/types" -import { EntitySchema } from "@mikro-orm/core" +import { EntitySchema } from "@medusajs/deps/mikro-orm/core" import { EOL } from "os" import { resolve } from "path" import { dynamicImport, isFileSkipped } from "../../common" diff --git a/packages/core/utils/src/modules-sdk/mikro-orm-cli-config-builder.ts b/packages/core/utils/src/modules-sdk/mikro-orm-cli-config-builder.ts index 02574d111a..1c13c2b624 100644 --- a/packages/core/utils/src/modules-sdk/mikro-orm-cli-config-builder.ts +++ b/packages/core/utils/src/modules-sdk/mikro-orm-cli-config-builder.ts @@ -4,8 +4,8 @@ import type { EntityClassGroup, EntitySchema, MikroORMOptions, -} from "@mikro-orm/core" -import { defineConfig } from "@mikro-orm/postgresql" +} from "@medusajs/deps/mikro-orm/core" +import { defineConfig } from "@medusajs/deps/mikro-orm/postgresql" import { kebabCase } from "../common" import { CustomDBMigrator, CustomTsMigrationGenerator } from "../dal" import { DmlEntity, toMikroOrmEntities } from "../dml" diff --git a/packages/core/utils/src/pg/index.ts b/packages/core/utils/src/pg/index.ts index df47c16188..e7ac84c979 100644 --- a/packages/core/utils/src/pg/index.ts +++ b/packages/core/utils/src/pg/index.ts @@ -13,7 +13,7 @@ | */ -import { Client, type ClientConfig } from "pg" +import { Client, type ClientConfig } from "@medusajs/deps/pg" import { parse } from "pg-connection-string" /** diff --git a/packages/core/workflows-sdk/package.json b/packages/core/workflows-sdk/package.json index ffe7c0d102..c80e448981 100644 --- a/packages/core/workflows-sdk/package.json +++ b/packages/core/workflows-sdk/package.json @@ -28,34 +28,23 @@ "license": "MIT", "devDependencies": { "@medusajs/types": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", - "awilix": "^8.0.1", "expect-type": "^0.20.0", "jest": "^29.7.0", - "pg": "^8.16.3", "rimraf": "^5.0.1", "typescript": "^5.6.2", "zod": "3.25.76" }, "dependencies": { + "@medusajs/deps": "2.10.3", "@medusajs/modules-sdk": "2.10.3", "@medusajs/orchestration": "2.10.3", "@medusajs/utils": "2.10.3", "ulid": "^2.3.0" }, "peerDependencies": { - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", - "express": "^4.21.0", - "pg": "^8.16.3" + "express": "^4.21.0" }, "scripts": { "build": "rimraf dist && tsc --build", diff --git a/packages/core/workflows-sdk/src/utils/composer/__tests__/compose.ts b/packages/core/workflows-sdk/src/utils/composer/__tests__/compose.ts index 68fb2bbbf9..750048fc30 100644 --- a/packages/core/workflows-sdk/src/utils/composer/__tests__/compose.ts +++ b/packages/core/workflows-sdk/src/utils/composer/__tests__/compose.ts @@ -11,7 +11,7 @@ import { Modules, promiseAll, } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/deps/awilix" import { setTimeout } from "timers/promises" import { createStep, diff --git a/packages/deps/.gitignore b/packages/deps/.gitignore new file mode 100644 index 0000000000..5b0adf937e --- /dev/null +++ b/packages/deps/.gitignore @@ -0,0 +1,6 @@ +/dist +node_modules +.DS_store +.env* +.env + diff --git a/packages/deps/CHANGELOG.md b/packages/deps/CHANGELOG.md new file mode 100644 index 0000000000..420e6f23d0 --- /dev/null +++ b/packages/deps/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log diff --git a/packages/deps/package.json b/packages/deps/package.json new file mode 100644 index 0000000000..e3be467a99 --- /dev/null +++ b/packages/deps/package.json @@ -0,0 +1,50 @@ +{ + "name": "@medusajs/deps", + "version": "2.10.3", + "description": "Dependencies for Medusa", + "main": "dist/index.js", + "repository": { + "type": "git", + "url": "https://github.com/medusajs/medusa", + "directory": "packages/deps" + }, + "engines": { + "node": ">=20" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "dist" + ], + "exports": { + ".": "./dist/index.js", + "./mikro-orm/cli": "./dist/mikro-orm-cli.js", + "./mikro-orm/core": "./dist/mikro-orm-core.js", + "./mikro-orm/knex": "./dist/mikro-orm-knex.js", + "./mikro-orm/migrations": "./dist/mikro-orm-migrations.js", + "./mikro-orm/postgresql": "./dist/mikro-orm-postgresql.js", + "./awilix": "./dist/awilix.js", + "./pg": "./dist/pg.js" + }, + "author": "Medusa", + "license": "MIT", + "scripts": { + "build": "rimraf dist && tsc --build" + }, + "dependencies": { + "@mikro-orm/cli": "6.5.4", + "@mikro-orm/core": "6.5.4", + "@mikro-orm/knex": "6.5.4", + "@mikro-orm/migrations": "6.5.4", + "@mikro-orm/postgresql": "6.5.4", + "awilix": "^8.0.1", + "pg": "^8.16.3" + }, + "devDependencies": { + "@swc/core": "^1.7.28", + "rimraf": "^5.0.1", + "typescript": "^5.6.2" + }, + "gitHead": "41a5425405aea5045a26def95c0dc00cf4a5a44d" +} diff --git a/packages/deps/src/awilix.ts b/packages/deps/src/awilix.ts new file mode 100644 index 0000000000..d404e03333 --- /dev/null +++ b/packages/deps/src/awilix.ts @@ -0,0 +1 @@ +export * from "awilix" diff --git a/packages/deps/src/mikro-orm-cli.ts b/packages/deps/src/mikro-orm-cli.ts new file mode 100644 index 0000000000..b797223666 --- /dev/null +++ b/packages/deps/src/mikro-orm-cli.ts @@ -0,0 +1 @@ +export * from "@mikro-orm/cli" diff --git a/packages/deps/src/mikro-orm-core.ts b/packages/deps/src/mikro-orm-core.ts new file mode 100644 index 0000000000..1422000ea6 --- /dev/null +++ b/packages/deps/src/mikro-orm-core.ts @@ -0,0 +1 @@ +export * from "@mikro-orm/core" diff --git a/packages/deps/src/mikro-orm-knex.ts b/packages/deps/src/mikro-orm-knex.ts new file mode 100644 index 0000000000..b5488c298e --- /dev/null +++ b/packages/deps/src/mikro-orm-knex.ts @@ -0,0 +1 @@ +export * from "@mikro-orm/knex" diff --git a/packages/deps/src/mikro-orm-migrations.ts b/packages/deps/src/mikro-orm-migrations.ts new file mode 100644 index 0000000000..eca21595e1 --- /dev/null +++ b/packages/deps/src/mikro-orm-migrations.ts @@ -0,0 +1 @@ +export * from "@mikro-orm/migrations" diff --git a/packages/deps/src/mikro-orm-postgresql.ts b/packages/deps/src/mikro-orm-postgresql.ts new file mode 100644 index 0000000000..ed786bb018 --- /dev/null +++ b/packages/deps/src/mikro-orm-postgresql.ts @@ -0,0 +1 @@ +export * from "@mikro-orm/postgresql" diff --git a/packages/deps/src/pg.js b/packages/deps/src/pg.js new file mode 100644 index 0000000000..9d46ba5964 --- /dev/null +++ b/packages/deps/src/pg.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("pg"), exports); diff --git a/packages/deps/src/pg.ts b/packages/deps/src/pg.ts new file mode 100644 index 0000000000..2e302e0ef6 --- /dev/null +++ b/packages/deps/src/pg.ts @@ -0,0 +1 @@ +export * from "pg" diff --git a/packages/deps/tsconfig.json b/packages/deps/tsconfig.json new file mode 100644 index 0000000000..161c09e5f3 --- /dev/null +++ b/packages/deps/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../_tsconfig.base.json" +} diff --git a/packages/medusa-test-utils/package.json b/packages/medusa-test-utils/package.json index 9c729ff54d..b93bf5d814 100644 --- a/packages/medusa-test-utils/package.json +++ b/packages/medusa-test-utils/package.json @@ -26,13 +26,7 @@ "license": "MIT", "devDependencies": { "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", "jest": "^29.7.0", - "pg": "^8.16.3", "pg-god": "^1.0.12", "rimraf": "^3.0.2", "typescript": "^5.6.2" @@ -46,9 +40,7 @@ }, "peerDependencies": { "@medusajs/framework": "2.10.3", - "@medusajs/medusa": "2.10.3", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/medusa": "2.10.3" }, "peerDependenciesMeta": { "@medusajs/medusa": { diff --git a/packages/medusa-test-utils/src/database.ts b/packages/medusa-test-utils/src/database.ts index c0c8506374..b8e1390987 100644 --- a/packages/medusa-test-utils/src/database.ts +++ b/packages/medusa-test-utils/src/database.ts @@ -6,7 +6,7 @@ import { MikroORM, Options, SqlEntityManager, -} from "@mikro-orm/postgresql" +} from "@medusajs/framework/mikro-orm/postgresql" import { createDatabase, dropDatabase } from "pg-god" import { execOrTimeout } from "./medusa-test-runner-utils" diff --git a/packages/medusa-test-utils/src/medusa-test-runner.ts b/packages/medusa-test-utils/src/medusa-test-runner.ts index e0febd1867..b67727d4a2 100644 --- a/packages/medusa-test-utils/src/medusa-test-runner.ts +++ b/packages/medusa-test-utils/src/medusa-test-runner.ts @@ -7,7 +7,7 @@ import { getResolvedPlugins, mergePluginModules, } from "@medusajs/framework/utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import { dbTestUtilFactory, getDatabaseURL } from "./database" import { applyEnvVarsToProcess, diff --git a/packages/medusa/package.json b/packages/medusa/package.json index ff10632dc2..58171be6fc 100644 --- a/packages/medusa/package.json +++ b/packages/medusa/package.json @@ -136,16 +136,11 @@ }, "peerDependencies": { "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@opentelemetry/instrumentation-pg": "^0.52.0", "@opentelemetry/resources": "^2.0.0", "@opentelemetry/sdk-node": "^0.200.0", "@opentelemetry/sdk-trace-node": "^2.0.0", "@swc/core": "1.5.7", - "awilix": "^8.0.1", "posthog-node": "^4.17.1", "react-dom": "^18.0.0", "yalc": "1.0.0-pre.53" diff --git a/packages/medusa/src/commands/plugin/db/generate.ts b/packages/medusa/src/commands/plugin/db/generate.ts index 7e60db9760..febd95b831 100644 --- a/packages/medusa/src/commands/plugin/db/generate.ts +++ b/packages/medusa/src/commands/plugin/db/generate.ts @@ -7,8 +7,8 @@ import { isFileSkipped, toUnixSlash, } from "@medusajs/framework/utils" -import { MetadataStorage } from "@mikro-orm/core" -import { MikroORM } from "@mikro-orm/postgresql" +import { MetadataStorage } from "@medusajs/framework/mikro-orm/core" +import { MikroORM } from "@medusajs/framework/mikro-orm/postgresql" import { glob } from "glob" import { dirname, join } from "path" diff --git a/packages/medusa/src/instrumentation/__fixtures__/server/index.ts b/packages/medusa/src/instrumentation/__fixtures__/server/index.ts index efc4608d6a..485808b931 100644 --- a/packages/medusa/src/instrumentation/__fixtures__/server/index.ts +++ b/packages/medusa/src/instrumentation/__fixtures__/server/index.ts @@ -4,7 +4,7 @@ import { registerMedusaModule, } from "@medusajs/modules-sdk" import { ContainerRegistrationKeys, generateJwtToken } from "@medusajs/utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import express from "express" import querystring from "querystring" import supertest from "supertest" diff --git a/packages/medusa/src/loaders/index.ts b/packages/medusa/src/loaders/index.ts index 8a04cd3d2e..c8e8e87034 100644 --- a/packages/medusa/src/loaders/index.ts +++ b/packages/medusa/src/loaders/index.ts @@ -22,7 +22,7 @@ import { validateModuleName, } from "@medusajs/framework/utils" import { WorkflowLoader } from "@medusajs/framework/workflows" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import { Express, NextFunction, Request, Response } from "express" import { join } from "path" import requestIp from "request-ip" diff --git a/packages/modules/analytics/package.json b/packages/modules/analytics/package.json index 06d75bbaeb..c58e333b89 100644 --- a/packages/modules/analytics/package.json +++ b/packages/modules/analytics/package.json @@ -42,7 +42,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/analytics/src/loaders/providers.ts b/packages/modules/analytics/src/loaders/providers.ts index 2a141fc597..d476424537 100644 --- a/packages/modules/analytics/src/loaders/providers.ts +++ b/packages/modules/analytics/src/loaders/providers.ts @@ -4,7 +4,7 @@ import { ModuleProvider, ModulesSdkTypes, } from "@medusajs/framework/types" -import { asFunction, asValue, Lifetime } from "awilix" +import { asFunction, asValue, Lifetime } from "@medusajs/framework/awilix" import ProviderService, { AnalyticsProviderIdentifierRegistrationName, AnalyticsProviderRegistrationPrefix, diff --git a/packages/modules/api-key/package.json b/packages/modules/api-key/package.json index 282715efe2..274d137490 100644 --- a/packages/modules/api-key/package.json +++ b/packages/modules/api-key/package.json @@ -38,7 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -47,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/api-key/src/migrations/InitialSetup20240221144943.ts b/packages/modules/api-key/src/migrations/InitialSetup20240221144943.ts index 512b3d16ed..e0039a9931 100644 --- a/packages/modules/api-key/src/migrations/InitialSetup20240221144943.ts +++ b/packages/modules/api-key/src/migrations/InitialSetup20240221144943.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class InitialSetup20240221144943 extends Migration { async up(): Promise { diff --git a/packages/modules/api-key/src/migrations/Migration20240604080145.ts b/packages/modules/api-key/src/migrations/Migration20240604080145.ts index 452e0a0c9c..549087d074 100644 --- a/packages/modules/api-key/src/migrations/Migration20240604080145.ts +++ b/packages/modules/api-key/src/migrations/Migration20240604080145.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240604080145 extends Migration { async up(): Promise { diff --git a/packages/modules/api-key/src/migrations/Migration20241205122700.ts b/packages/modules/api-key/src/migrations/Migration20241205122700.ts index bc82b5d3da..3369d1a1ba 100644 --- a/packages/modules/api-key/src/migrations/Migration20241205122700.ts +++ b/packages/modules/api-key/src/migrations/Migration20241205122700.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241205122700 extends Migration { async up(): Promise { diff --git a/packages/modules/auth/package.json b/packages/modules/auth/package.json index 251e51dee1..83f02dd293 100644 --- a/packages/modules/auth/package.json +++ b/packages/modules/auth/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/auth/src/loaders/providers.ts b/packages/modules/auth/src/loaders/providers.ts index 43526d54c2..522dd064a8 100644 --- a/packages/modules/auth/src/loaders/providers.ts +++ b/packages/modules/auth/src/loaders/providers.ts @@ -3,7 +3,7 @@ import { ModuleProvider, ModulesSdkTypes, } from "@medusajs/framework/types" -import { asFunction, asValue, Lifetime } from "awilix" +import { asFunction, asValue, Lifetime } from "@medusajs/framework/awilix" import { moduleProviderLoader } from "@medusajs/framework/modules-sdk" import { AuthIdentifiersRegistrationName, diff --git a/packages/modules/auth/src/migrations/Migration20240205025928.ts b/packages/modules/auth/src/migrations/Migration20240205025928.ts index fc950356f9..cb04ee185e 100644 --- a/packages/modules/auth/src/migrations/Migration20240205025928.ts +++ b/packages/modules/auth/src/migrations/Migration20240205025928.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240205025928 extends Migration { async up(): Promise { diff --git a/packages/modules/auth/src/migrations/Migration20240529080336.ts b/packages/modules/auth/src/migrations/Migration20240529080336.ts index 77fa4c1ee9..0394386cf2 100644 --- a/packages/modules/auth/src/migrations/Migration20240529080336.ts +++ b/packages/modules/auth/src/migrations/Migration20240529080336.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240529080336 extends Migration { async up(): Promise { diff --git a/packages/modules/auth/src/migrations/Migration20241202100304.ts b/packages/modules/auth/src/migrations/Migration20241202100304.ts index 8d9a845bbb..962377b79b 100644 --- a/packages/modules/auth/src/migrations/Migration20241202100304.ts +++ b/packages/modules/auth/src/migrations/Migration20241202100304.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241202100304 extends Migration { async up(): Promise { diff --git a/packages/modules/cache-redis/package.json b/packages/modules/cache-redis/package.json index e19b440443..888eaf934d 100644 --- a/packages/modules/cache-redis/package.json +++ b/packages/modules/cache-redis/package.json @@ -39,7 +39,6 @@ "ioredis": "^5.4.1" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/cache-redis/src/loaders/index.ts b/packages/modules/cache-redis/src/loaders/index.ts index 1b25f62637..b7f7a8ca1f 100644 --- a/packages/modules/cache-redis/src/loaders/index.ts +++ b/packages/modules/cache-redis/src/loaders/index.ts @@ -1,5 +1,5 @@ import { LoaderOptions } from "@medusajs/framework/types" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import Redis from "ioredis" import { RedisCacheModuleOptions } from "../types" diff --git a/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts b/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts index 1bbac62243..214ecf4265 100644 --- a/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts +++ b/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts @@ -1,5 +1,5 @@ import { CreateCartDTO, InferEntityType } from "@medusajs/framework/types" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { Cart } from "../../../src/models" import { defaultCartsData } from "./data" import { toMikroORMEntity } from "@medusajs/framework/utils" diff --git a/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts b/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts index 78ad5eea1d..ec8709c268 100644 --- a/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts +++ b/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts @@ -1,7 +1,7 @@ import { ICartModuleService } from "@medusajs/framework/types" import { BigNumber, Module, Modules } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import { CheckConstraintViolationException } from "@mikro-orm/core" +import { CheckConstraintViolationException } from "@medusajs/framework/mikro-orm/core" import { CartModuleService } from "@services" jest.setTimeout(50000) diff --git a/packages/modules/cart/package.json b/packages/modules/cart/package.json index 35a2a84898..56db0074b0 100644 --- a/packages/modules/cart/package.json +++ b/packages/modules/cart/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/cart/src/migrations/Migration20240222170223.ts b/packages/modules/cart/src/migrations/Migration20240222170223.ts index c404aec51e..f102fd95a3 100644 --- a/packages/modules/cart/src/migrations/Migration20240222170223.ts +++ b/packages/modules/cart/src/migrations/Migration20240222170223.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240222170223 extends Migration { async up(): Promise { diff --git a/packages/modules/cart/src/migrations/Migration20240831125857.ts b/packages/modules/cart/src/migrations/Migration20240831125857.ts index b3024fb75c..bf84f782e9 100644 --- a/packages/modules/cart/src/migrations/Migration20240831125857.ts +++ b/packages/modules/cart/src/migrations/Migration20240831125857.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240831125857 extends Migration { async up(): Promise { diff --git a/packages/modules/cart/src/migrations/Migration20241106085918.ts b/packages/modules/cart/src/migrations/Migration20241106085918.ts index 836c5adb2e..977fd6719e 100644 --- a/packages/modules/cart/src/migrations/Migration20241106085918.ts +++ b/packages/modules/cart/src/migrations/Migration20241106085918.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241106085918 extends Migration { diff --git a/packages/modules/cart/src/migrations/Migration20241205095237.ts b/packages/modules/cart/src/migrations/Migration20241205095237.ts index e09b710630..ed3dd2073b 100644 --- a/packages/modules/cart/src/migrations/Migration20241205095237.ts +++ b/packages/modules/cart/src/migrations/Migration20241205095237.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241205095237 extends Migration { async up(): Promise { diff --git a/packages/modules/cart/src/migrations/Migration20241216183049.ts b/packages/modules/cart/src/migrations/Migration20241216183049.ts index c5ca53f06f..4542544390 100644 --- a/packages/modules/cart/src/migrations/Migration20241216183049.ts +++ b/packages/modules/cart/src/migrations/Migration20241216183049.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241216183049 extends Migration { async up(): Promise { diff --git a/packages/modules/cart/src/migrations/Migration20241218091938.ts b/packages/modules/cart/src/migrations/Migration20241218091938.ts index d4314e8c5c..1648a42dcf 100644 --- a/packages/modules/cart/src/migrations/Migration20241218091938.ts +++ b/packages/modules/cart/src/migrations/Migration20241218091938.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241218091938 extends Migration { diff --git a/packages/modules/cart/src/migrations/Migration20250120115059.ts b/packages/modules/cart/src/migrations/Migration20250120115059.ts index e56d705a40..45bea909ee 100644 --- a/packages/modules/cart/src/migrations/Migration20250120115059.ts +++ b/packages/modules/cart/src/migrations/Migration20250120115059.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250120115059 extends Migration { async up(): Promise { diff --git a/packages/modules/cart/src/migrations/Migration20250212131240.ts b/packages/modules/cart/src/migrations/Migration20250212131240.ts index ca054cfd64..f7a5807453 100644 --- a/packages/modules/cart/src/migrations/Migration20250212131240.ts +++ b/packages/modules/cart/src/migrations/Migration20250212131240.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250212131240 extends Migration { override async up(): Promise { diff --git a/packages/modules/cart/src/migrations/Migration20250326151602.ts b/packages/modules/cart/src/migrations/Migration20250326151602.ts index 5eca680be4..2779795d34 100644 --- a/packages/modules/cart/src/migrations/Migration20250326151602.ts +++ b/packages/modules/cart/src/migrations/Migration20250326151602.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250326151602 extends Migration { override async up(): Promise { diff --git a/packages/modules/cart/src/migrations/Migration20250508081553.ts b/packages/modules/cart/src/migrations/Migration20250508081553.ts index c8e1d3a952..9eeec203d4 100644 --- a/packages/modules/cart/src/migrations/Migration20250508081553.ts +++ b/packages/modules/cart/src/migrations/Migration20250508081553.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250508081553 extends Migration { diff --git a/packages/modules/currency/package.json b/packages/modules/currency/package.json index 57c5410e27..036b685a67 100644 --- a/packages/modules/currency/package.json +++ b/packages/modules/currency/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/currency/src/migrations/InitialSetup20240228133303.ts b/packages/modules/currency/src/migrations/InitialSetup20240228133303.ts index 53e6b89534..4faedeff12 100644 --- a/packages/modules/currency/src/migrations/InitialSetup20240228133303.ts +++ b/packages/modules/currency/src/migrations/InitialSetup20240228133303.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class InitialSetup20240228133303 extends Migration { async up(): Promise { diff --git a/packages/modules/currency/src/migrations/Migration20240624082354.ts b/packages/modules/currency/src/migrations/Migration20240624082354.ts index 73e13c0528..0a832c812e 100644 --- a/packages/modules/currency/src/migrations/Migration20240624082354.ts +++ b/packages/modules/currency/src/migrations/Migration20240624082354.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240624082354 extends Migration { async up(): Promise { diff --git a/packages/modules/customer/package.json b/packages/modules/customer/package.json index 628000db0b..27dbe4c2ec 100644 --- a/packages/modules/customer/package.json +++ b/packages/modules/customer/package.json @@ -39,10 +39,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -51,10 +47,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/customer/src/migrations/Migration20240124154000.ts b/packages/modules/customer/src/migrations/Migration20240124154000.ts index 93c61f3d72..22238e492f 100644 --- a/packages/modules/customer/src/migrations/Migration20240124154000.ts +++ b/packages/modules/customer/src/migrations/Migration20240124154000.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240124154000 extends Migration { async up(): Promise { diff --git a/packages/modules/customer/src/migrations/Migration20240524123112.ts b/packages/modules/customer/src/migrations/Migration20240524123112.ts index 39701451eb..ab2a7c31e9 100644 --- a/packages/modules/customer/src/migrations/Migration20240524123112.ts +++ b/packages/modules/customer/src/migrations/Migration20240524123112.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240524123112 extends Migration { async up(): Promise { diff --git a/packages/modules/customer/src/migrations/Migration20240602110946.ts b/packages/modules/customer/src/migrations/Migration20240602110946.ts index e2ca6df517..17f3b2aea7 100644 --- a/packages/modules/customer/src/migrations/Migration20240602110946.ts +++ b/packages/modules/customer/src/migrations/Migration20240602110946.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240602110946 extends Migration { async up(): Promise { diff --git a/packages/modules/customer/src/migrations/Migration20241211074630.ts b/packages/modules/customer/src/migrations/Migration20241211074630.ts index e4751ad12a..e0bb2ccd58 100644 --- a/packages/modules/customer/src/migrations/Migration20241211074630.ts +++ b/packages/modules/customer/src/migrations/Migration20241211074630.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241211074630 extends Migration { async up(): Promise { diff --git a/packages/modules/event-bus-redis/package.json b/packages/modules/event-bus-redis/package.json index b5e04c88a6..bc46b171ec 100644 --- a/packages/modules/event-bus-redis/package.json +++ b/packages/modules/event-bus-redis/package.json @@ -41,7 +41,6 @@ "ioredis": "^5.4.1" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/event-bus-redis/src/loaders/index.ts b/packages/modules/event-bus-redis/src/loaders/index.ts index 1a15082477..9ae66e22e5 100644 --- a/packages/modules/event-bus-redis/src/loaders/index.ts +++ b/packages/modules/event-bus-redis/src/loaders/index.ts @@ -1,5 +1,5 @@ import { LoaderOptions } from "@medusajs/framework/types" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import Redis from "ioredis" import { EOL } from "os" import { EventBusRedisModuleOptions } from "../types" diff --git a/packages/modules/file/package.json b/packages/modules/file/package.json index 92810262fc..d4a9a9c278 100644 --- a/packages/modules/file/package.json +++ b/packages/modules/file/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,7 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/file/src/loaders/providers.ts b/packages/modules/file/src/loaders/providers.ts index 502fab79fc..3bf764afa2 100644 --- a/packages/modules/file/src/loaders/providers.ts +++ b/packages/modules/file/src/loaders/providers.ts @@ -9,7 +9,7 @@ import { FileProviderIdentifierRegistrationName, FileProviderRegistrationPrefix, } from "@types" -import { asFunction, asValue, Lifetime } from "awilix" +import { asFunction, asValue, Lifetime } from "@medusajs/framework/awilix" const registrationFn = async (klass, container, pluginOptions) => { const key = FileProviderService.getRegistrationIdentifier( diff --git a/packages/modules/fulfillment/package.json b/packages/modules/fulfillment/package.json index c7fd449df0..1bfd35d65d 100644 --- a/packages/modules/fulfillment/package.json +++ b/packages/modules/fulfillment/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/fulfillment/src/loaders/providers.ts b/packages/modules/fulfillment/src/loaders/providers.ts index 69026f111d..a2f091a969 100644 --- a/packages/modules/fulfillment/src/loaders/providers.ts +++ b/packages/modules/fulfillment/src/loaders/providers.ts @@ -11,7 +11,7 @@ import { } from "@medusajs/framework/utils" import { FulfillmentProviderService } from "@services" import { FulfillmentIdentifiersRegistrationName } from "@types" -import { Lifetime, asFunction, asValue } from "awilix" +import { Lifetime, asFunction, asValue } from "@medusajs/framework/awilix" const registrationFn = async (klass, container, pluginOptions) => { const key = FulfillmentProviderService.getRegistrationIdentifier( diff --git a/packages/modules/fulfillment/src/migrations/Migration20240311145700_InitialSetupMigration.ts b/packages/modules/fulfillment/src/migrations/Migration20240311145700_InitialSetupMigration.ts index 174e61ddd5..5d159350ca 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20240311145700_InitialSetupMigration.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20240311145700_InitialSetupMigration.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240311145700_InitialSetupMigration extends Migration { async up(): Promise { diff --git a/packages/modules/fulfillment/src/migrations/Migration20240821170957.ts b/packages/modules/fulfillment/src/migrations/Migration20240821170957.ts index 159d989c82..3e2f37c7bd 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20240821170957.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20240821170957.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240821170957 extends Migration { async up(): Promise { diff --git a/packages/modules/fulfillment/src/migrations/Migration20240917161003.ts b/packages/modules/fulfillment/src/migrations/Migration20240917161003.ts index 984022b5b9..8205cef2e5 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20240917161003.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20240917161003.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240917161003 extends Migration { async up(): Promise { diff --git a/packages/modules/fulfillment/src/migrations/Migration20241217110416.ts b/packages/modules/fulfillment/src/migrations/Migration20241217110416.ts index 52a1884979..41577c96f2 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20241217110416.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20241217110416.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241217110416 extends Migration { async up(): Promise { diff --git a/packages/modules/fulfillment/src/migrations/Migration20250113122235.ts b/packages/modules/fulfillment/src/migrations/Migration20250113122235.ts index 96d27cbbb9..b373b91274 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20250113122235.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20250113122235.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250113122235 extends Migration { override async up(): Promise { diff --git a/packages/modules/fulfillment/src/migrations/Migration20250120115002.ts b/packages/modules/fulfillment/src/migrations/Migration20250120115002.ts index c52829cecc..48b20ec493 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20250120115002.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20250120115002.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250120115002 extends Migration { async up(): Promise { diff --git a/packages/modules/fulfillment/src/migrations/Migration20250822130931.ts b/packages/modules/fulfillment/src/migrations/Migration20250822130931.ts index b657918c7c..e537945f09 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20250822130931.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20250822130931.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250822130931 extends Migration { override async up(): Promise { diff --git a/packages/modules/fulfillment/src/migrations/Migration20250825132614.ts b/packages/modules/fulfillment/src/migrations/Migration20250825132614.ts index 6d64093845..08fb45b2e1 100644 --- a/packages/modules/fulfillment/src/migrations/Migration20250825132614.ts +++ b/packages/modules/fulfillment/src/migrations/Migration20250825132614.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" import { ulid } from "ulid" export class Migration20250825132614 extends Migration { diff --git a/packages/modules/index/integration-tests/__tests__/config-sync.spec.ts b/packages/modules/index/integration-tests/__tests__/config-sync.spec.ts index 52b7094a58..d42b79ce6a 100644 --- a/packages/modules/index/integration-tests/__tests__/config-sync.spec.ts +++ b/packages/modules/index/integration-tests/__tests__/config-sync.spec.ts @@ -9,7 +9,7 @@ import { ContainerRegistrationKeys, Modules } from "@medusajs/framework/utils" import { initDb, TestDatabaseUtils } from "@medusajs/test-utils" import { IndexTypes, ModulesSdkTypes } from "@medusajs/types" import { Configuration } from "@utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import path from "path" import { setTimeout } from "timers/promises" import { EventBusServiceMock } from "../__fixtures__" diff --git a/packages/modules/index/integration-tests/__tests__/data-synchronizer.spec.ts b/packages/modules/index/integration-tests/__tests__/data-synchronizer.spec.ts index ec04804372..38c1e43a9b 100644 --- a/packages/modules/index/integration-tests/__tests__/data-synchronizer.spec.ts +++ b/packages/modules/index/integration-tests/__tests__/data-synchronizer.spec.ts @@ -12,10 +12,10 @@ import { toMikroORMEntity, } from "@medusajs/framework/utils" import { initDb, TestDatabaseUtils } from "@medusajs/test-utils" -import { EntityManager } from "@mikro-orm/postgresql" +import { EntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { IndexData, IndexRelation } from "@models" import { DataSynchronizer } from "@services" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import * as path from "path" import { setTimeout } from "timers/promises" import { EventBusServiceMock } from "../__fixtures__" diff --git a/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts b/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts index 38f3b10a7d..cde8232dbf 100644 --- a/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts +++ b/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts @@ -12,9 +12,9 @@ import { toMikroORMEntity, } from "@medusajs/framework/utils" import { initDb, TestDatabaseUtils } from "@medusajs/test-utils" -import { EntityManager } from "@mikro-orm/postgresql" +import { EntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { IndexData, IndexRelation } from "@models" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import * as path from "path" import { setTimeout } from "timers/promises" import { EventBusServiceMock } from "../__fixtures__" diff --git a/packages/modules/index/integration-tests/__tests__/orchestrator.spec.ts b/packages/modules/index/integration-tests/__tests__/orchestrator.spec.ts index 5b4282773a..eb7d0b4e6f 100644 --- a/packages/modules/index/integration-tests/__tests__/orchestrator.spec.ts +++ b/packages/modules/index/integration-tests/__tests__/orchestrator.spec.ts @@ -1,4 +1,4 @@ -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import { container, logger } from "@medusajs/framework" import type { IndexTypes } from "@medusajs/types" import { Orchestrator } from "@utils" diff --git a/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts b/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts index 82c48fa873..834ee31e88 100644 --- a/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts +++ b/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts @@ -8,9 +8,9 @@ import { MedusaAppOutput, MedusaModule } from "@medusajs/framework/modules-sdk" import { IndexTypes } from "@medusajs/framework/types" import { ContainerRegistrationKeys, Modules } from "@medusajs/framework/utils" import { initDb, TestDatabaseUtils } from "@medusajs/test-utils" -import { EntityManager } from "@mikro-orm/postgresql" +import { EntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { IndexData, IndexRelation } from "@models" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import path from "path" import { EventBusServiceMock } from "../__fixtures__" import { dbName } from "../__fixtures__/medusa-config" diff --git a/packages/modules/index/package.json b/packages/modules/index/package.json index 67fd5b2d65..4728274589 100644 --- a/packages/modules/index/package.json +++ b/packages/modules/index/package.json @@ -38,11 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -51,11 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/index/src/loaders/index.ts b/packages/modules/index/src/loaders/index.ts index 623ddf84a3..9fed45694e 100644 --- a/packages/modules/index/src/loaders/index.ts +++ b/packages/modules/index/src/loaders/index.ts @@ -1,4 +1,4 @@ -import { asClass, asValue } from "awilix" +import { asClass, asValue } from "@medusajs/framework/awilix" import { PostgresProvider } from "../services/postgres-provider" import { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils" import { IndexModuleService } from "@services" diff --git a/packages/modules/index/src/migrations/Migration20231019174230.ts b/packages/modules/index/src/migrations/Migration20231019174230.ts index 7e2089850c..9a3448c7bc 100644 --- a/packages/modules/index/src/migrations/Migration20231019174230.ts +++ b/packages/modules/index/src/migrations/Migration20231019174230.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20231019174230 extends Migration { async up(): Promise { diff --git a/packages/modules/index/src/migrations/Migration20241209173313.ts b/packages/modules/index/src/migrations/Migration20241209173313.ts index 0fe2f0c1f3..09b12f73b2 100644 --- a/packages/modules/index/src/migrations/Migration20241209173313.ts +++ b/packages/modules/index/src/migrations/Migration20241209173313.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241209173313 extends Migration { async up(): Promise { diff --git a/packages/modules/index/src/migrations/Migration20250122154720.ts b/packages/modules/index/src/migrations/Migration20250122154720.ts index 68c8c231d1..c19aa41892 100644 --- a/packages/modules/index/src/migrations/Migration20250122154720.ts +++ b/packages/modules/index/src/migrations/Migration20250122154720.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250122154720 extends Migration { override async up(): Promise { diff --git a/packages/modules/index/src/migrations/Migration20250127105159.ts b/packages/modules/index/src/migrations/Migration20250127105159.ts index 6dc8b95e07..cc69b11508 100644 --- a/packages/modules/index/src/migrations/Migration20250127105159.ts +++ b/packages/modules/index/src/migrations/Migration20250127105159.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250127105159 extends Migration { override async up(): Promise { diff --git a/packages/modules/index/src/migrations/Migration20250127144442.ts b/packages/modules/index/src/migrations/Migration20250127144442.ts index 659d500072..b11c496a78 100644 --- a/packages/modules/index/src/migrations/Migration20250127144442.ts +++ b/packages/modules/index/src/migrations/Migration20250127144442.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250127144442 extends Migration { override async up(): Promise { diff --git a/packages/modules/index/src/migrations/Migration20250128132404.ts b/packages/modules/index/src/migrations/Migration20250128132404.ts index 6339eeba6e..d683efada4 100644 --- a/packages/modules/index/src/migrations/Migration20250128132404.ts +++ b/packages/modules/index/src/migrations/Migration20250128132404.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250128132404 extends Migration { override async up(): Promise { diff --git a/packages/modules/index/src/migrations/Migration20250218132404.ts b/packages/modules/index/src/migrations/Migration20250218132404.ts index cf9bb7aad7..b0c875fd43 100644 --- a/packages/modules/index/src/migrations/Migration20250218132404.ts +++ b/packages/modules/index/src/migrations/Migration20250218132404.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250218132404 extends Migration { override async up(): Promise { diff --git a/packages/modules/index/src/migrations/Migration20250515161913.ts b/packages/modules/index/src/migrations/Migration20250515161913.ts index ba301605ca..5ea7477099 100644 --- a/packages/modules/index/src/migrations/Migration20250515161913.ts +++ b/packages/modules/index/src/migrations/Migration20250515161913.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250515161913 extends Migration { override async up(): Promise { diff --git a/packages/modules/index/src/services/postgres-provider.ts b/packages/modules/index/src/services/postgres-provider.ts index 65b71eeb4a..d690e14a16 100644 --- a/packages/modules/index/src/services/postgres-provider.ts +++ b/packages/modules/index/src/services/postgres-provider.ts @@ -22,7 +22,7 @@ import { EntityManager, EntityRepository, SqlEntityManager, -} from "@mikro-orm/postgresql" +} from "@medusajs/framework/mikro-orm/postgresql" import { IndexData, IndexRelation } from "@models" import { createPartitions, QueryBuilder } from "../utils" import { flattenObjectKeys } from "../utils/flatten-object-keys" diff --git a/packages/modules/index/src/utils/create-partitions.ts b/packages/modules/index/src/utils/create-partitions.ts index af9e0beab4..243eb3a663 100644 --- a/packages/modules/index/src/utils/create-partitions.ts +++ b/packages/modules/index/src/utils/create-partitions.ts @@ -1,5 +1,5 @@ import { IndexTypes } from "@medusajs/framework/types" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { schemaObjectRepresentationPropertiesToOmit } from "@types" import { getPivotTableName, normalizeTableName } from "./normalze-table-name" diff --git a/packages/modules/index/src/utils/query-builder.ts b/packages/modules/index/src/utils/query-builder.ts index f9d0dca24e..7f032f5daf 100644 --- a/packages/modules/index/src/utils/query-builder.ts +++ b/packages/modules/index/src/utils/query-builder.ts @@ -5,7 +5,7 @@ import { isString, unflattenObjectKeys, } from "@medusajs/framework/utils" -import { Knex } from "@mikro-orm/knex" +import { Knex } from "@medusajs/framework/mikro-orm/knex" import { OrderBy, QueryFormat, QueryOptions, Select } from "@types" import { getPivotTableName, normalizeTableName } from "./normalze-table-name" diff --git a/packages/modules/inventory/package.json b/packages/modules/inventory/package.json index 5f5a47fa91..85de461ece 100644 --- a/packages/modules/inventory/package.json +++ b/packages/modules/inventory/package.json @@ -25,10 +25,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -37,11 +33,7 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" }, "scripts": { "watch": "tsc --build --watch", diff --git a/packages/modules/inventory/src/migrations/Migration20240307132720.ts b/packages/modules/inventory/src/migrations/Migration20240307132720.ts index 7cafc79716..c2db5bd503 100644 --- a/packages/modules/inventory/src/migrations/Migration20240307132720.ts +++ b/packages/modules/inventory/src/migrations/Migration20240307132720.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240307132720 extends Migration { async up(): Promise { diff --git a/packages/modules/inventory/src/migrations/Migration20240719123015.ts b/packages/modules/inventory/src/migrations/Migration20240719123015.ts index bf66e54607..6b7116f56b 100644 --- a/packages/modules/inventory/src/migrations/Migration20240719123015.ts +++ b/packages/modules/inventory/src/migrations/Migration20240719123015.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240719123015 extends Migration { async up(): Promise { diff --git a/packages/modules/inventory/src/migrations/Migration20241213063611.ts b/packages/modules/inventory/src/migrations/Migration20241213063611.ts index 041418ca44..c9a1e15843 100644 --- a/packages/modules/inventory/src/migrations/Migration20241213063611.ts +++ b/packages/modules/inventory/src/migrations/Migration20241213063611.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241213063611 extends Migration { async up(): Promise { diff --git a/packages/modules/inventory/src/repositories/inventory-level.ts b/packages/modules/inventory/src/repositories/inventory-level.ts index 719fcc36ec..6c842caf3a 100644 --- a/packages/modules/inventory/src/repositories/inventory-level.ts +++ b/packages/modules/inventory/src/repositories/inventory-level.ts @@ -4,7 +4,7 @@ import { MathBN, mikroOrmBaseRepositoryFactory, } from "@medusajs/framework/utils" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { InventoryLevel } from "@models" export class InventoryLevelRepository extends mikroOrmBaseRepositoryFactory( diff --git a/packages/modules/inventory/src/utils/apply-decorators.ts b/packages/modules/inventory/src/utils/apply-decorators.ts index a5a2c82f01..90f0993599 100644 --- a/packages/modules/inventory/src/utils/apply-decorators.ts +++ b/packages/modules/inventory/src/utils/apply-decorators.ts @@ -4,7 +4,7 @@ import { MathBN, toMikroORMEntity, } from "@medusajs/framework/utils" -import { Formula, OnInit } from "@mikro-orm/core" +import { Formula, OnInit } from "@medusajs/framework/mikro-orm/core" import InventoryItem from "../models/inventory-item" import InventoryLevel from "../models/inventory-level" diff --git a/packages/modules/link-modules/package.json b/packages/modules/link-modules/package.json index 19606df212..35242f4225 100644 --- a/packages/modules/link-modules/package.json +++ b/packages/modules/link-modules/package.json @@ -35,9 +35,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "cross-env": "^5.2.1", @@ -47,10 +44,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/link-modules/src/loaders/connection.ts b/packages/modules/link-modules/src/loaders/connection.ts index e0ef5c8c45..834a94383f 100644 --- a/packages/modules/link-modules/src/loaders/connection.ts +++ b/packages/modules/link-modules/src/loaders/connection.ts @@ -6,7 +6,7 @@ import { } from "@medusajs/framework/types" import { ModulesSdkUtils } from "@medusajs/framework/utils" -import { EntitySchema } from "@mikro-orm/core" +import { EntitySchema } from "@medusajs/framework/mikro-orm/core" export function connectionLoader(entity: EntitySchema) { return async ( diff --git a/packages/modules/link-modules/src/loaders/container.ts b/packages/modules/link-modules/src/loaders/container.ts index 2984099fd0..71227febc3 100644 --- a/packages/modules/link-modules/src/loaders/container.ts +++ b/packages/modules/link-modules/src/loaders/container.ts @@ -13,7 +13,7 @@ import { simpleHash, toPascalCase, } from "@medusajs/framework/utils" -import { asClass, asValue } from "awilix" +import { asClass, asValue } from "@medusajs/framework/awilix" export function containerLoader(entity, joinerConfig: ModuleJoinerConfig) { return async ( { diff --git a/packages/modules/link-modules/src/migration/index.ts b/packages/modules/link-modules/src/migration/index.ts index f20949d9b3..41c7d9b04f 100644 --- a/packages/modules/link-modules/src/migration/index.ts +++ b/packages/modules/link-modules/src/migration/index.ts @@ -13,8 +13,11 @@ import { normalizeMigrationSQL, promiseAll, } from "@medusajs/framework/utils" -import { EntitySchema, MikroORM } from "@mikro-orm/core" -import { DatabaseSchema, PostgreSqlDriver } from "@mikro-orm/postgresql" +import { EntitySchema, MikroORM } from "@medusajs/framework/mikro-orm/core" +import { + DatabaseSchema, + PostgreSqlDriver, +} from "@medusajs/framework/mikro-orm/postgresql" import { generateEntity } from "../utils" /** diff --git a/packages/modules/link-modules/src/repositories/link.ts b/packages/modules/link-modules/src/repositories/link.ts index 5064484755..a11e9ac486 100644 --- a/packages/modules/link-modules/src/repositories/link.ts +++ b/packages/modules/link-modules/src/repositories/link.ts @@ -1,11 +1,11 @@ import { Context, ModuleJoinerConfig } from "@medusajs/framework/types" -import { EntitySchema } from "@mikro-orm/core" +import { EntitySchema } from "@medusajs/framework/mikro-orm/core" import { generateEntityId, mikroOrmBaseRepositoryFactory, } from "@medusajs/framework/utils" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" export function getLinkRepository(model: EntitySchema) { return class LinkRepository extends mikroOrmBaseRepositoryFactory(model) { diff --git a/packages/modules/link-modules/src/utils/generate-entity.ts b/packages/modules/link-modules/src/utils/generate-entity.ts index ad9119bd72..6c77db6884 100644 --- a/packages/modules/link-modules/src/utils/generate-entity.ts +++ b/packages/modules/link-modules/src/utils/generate-entity.ts @@ -10,7 +10,7 @@ import { SoftDeletableFilterKey, } from "@medusajs/framework/utils" -import { EntitySchema } from "@mikro-orm/core" +import { EntitySchema } from "@medusajs/framework/mikro-orm/core" function getClass(...properties) { return class LinkModel { diff --git a/packages/modules/locking/package.json b/packages/modules/locking/package.json index 0128293b03..b58d7d4440 100644 --- a/packages/modules/locking/package.json +++ b/packages/modules/locking/package.json @@ -34,10 +34,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -46,10 +42,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/locking/src/loaders/providers.ts b/packages/modules/locking/src/loaders/providers.ts index 31284a0f04..d8fca627ae 100644 --- a/packages/modules/locking/src/loaders/providers.ts +++ b/packages/modules/locking/src/loaders/providers.ts @@ -14,7 +14,12 @@ import { LockingIdentifiersRegistrationName, LockingProviderRegistrationPrefix, } from "@types" -import { Lifetime, aliasTo, asFunction, asValue } from "awilix" +import { + Lifetime, + aliasTo, + asFunction, + asValue, +} from "@medusajs/framework/awilix" import { InMemoryLockingProvider } from "../providers/in-memory" const registrationFn = async (klass, container, { id }) => { diff --git a/packages/modules/locking/src/services/locking-module.ts b/packages/modules/locking/src/services/locking-module.ts index bd2e3236b9..c1a15976f1 100644 --- a/packages/modules/locking/src/services/locking-module.ts +++ b/packages/modules/locking/src/services/locking-module.ts @@ -3,8 +3,8 @@ import { ILockingModule, InternalModuleDeclaration, Logger, -} from "@medusajs/framework/types" -import { EntityManager } from "@mikro-orm/core" +} from "@medusajs/types" +import { EntityManager } from "@medusajs/framework/mikro-orm/core" import { LockingDefaultProvider } from "@types" import LockingProviderService from "./locking-provider" diff --git a/packages/modules/notification/package.json b/packages/modules/notification/package.json index a3bf0fb6dc..cc95fadbc1 100644 --- a/packages/modules/notification/package.json +++ b/packages/modules/notification/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/notification/src/loaders/providers.ts b/packages/modules/notification/src/loaders/providers.ts index 8529a40536..5edb614621 100644 --- a/packages/modules/notification/src/loaders/providers.ts +++ b/packages/modules/notification/src/loaders/providers.ts @@ -15,7 +15,7 @@ import { NotificationIdentifiersRegistrationName, NotificationProviderRegistrationPrefix, } from "@types" -import { Lifetime, asFunction, asValue } from "awilix" +import { Lifetime, asFunction, asValue } from "@medusajs/framework/awilix" const registrationFn = async (klass, container, pluginOptions) => { container.register({ diff --git a/packages/modules/notification/src/migrations/Migration20240509083918_InitialSetupMigration.ts b/packages/modules/notification/src/migrations/Migration20240509083918_InitialSetupMigration.ts index 09f4fe41c9..9f4a682e56 100644 --- a/packages/modules/notification/src/migrations/Migration20240509083918_InitialSetupMigration.ts +++ b/packages/modules/notification/src/migrations/Migration20240509083918_InitialSetupMigration.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240509083918_InitialSetupMigration extends Migration { async up(): Promise { diff --git a/packages/modules/notification/src/migrations/Migration20240628075401.ts b/packages/modules/notification/src/migrations/Migration20240628075401.ts index 7c6a532213..daba66cab6 100644 --- a/packages/modules/notification/src/migrations/Migration20240628075401.ts +++ b/packages/modules/notification/src/migrations/Migration20240628075401.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240628075401 extends Migration { async up(): Promise { diff --git a/packages/modules/notification/src/migrations/Migration20240830094712.ts b/packages/modules/notification/src/migrations/Migration20240830094712.ts index 52f55833b6..1eefc6e527 100644 --- a/packages/modules/notification/src/migrations/Migration20240830094712.ts +++ b/packages/modules/notification/src/migrations/Migration20240830094712.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240830094712 extends Migration { async up(): Promise { diff --git a/packages/modules/notification/src/migrations/Migration20250120110514.ts b/packages/modules/notification/src/migrations/Migration20250120110514.ts index 6d9f81a5e8..5d6acaf813 100644 --- a/packages/modules/notification/src/migrations/Migration20250120110514.ts +++ b/packages/modules/notification/src/migrations/Migration20250120110514.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250120110514 extends Migration { diff --git a/packages/modules/order/package.json b/packages/modules/order/package.json index bfaf18b7b2..3020816314 100644 --- a/packages/modules/order/package.json +++ b/packages/modules/order/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/order/src/migrations/Migration20240219102530.ts b/packages/modules/order/src/migrations/Migration20240219102530.ts index b475cf185f..01858c1b28 100644 --- a/packages/modules/order/src/migrations/Migration20240219102530.ts +++ b/packages/modules/order/src/migrations/Migration20240219102530.ts @@ -1,5 +1,5 @@ import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240219102530 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240604100512.ts b/packages/modules/order/src/migrations/Migration20240604100512.ts index 9da1242d22..c91f03e0ed 100644 --- a/packages/modules/order/src/migrations/Migration20240604100512.ts +++ b/packages/modules/order/src/migrations/Migration20240604100512.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240604100512 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240715102100.ts b/packages/modules/order/src/migrations/Migration20240715102100.ts index e4e5b3186d..46c3af2d8d 100644 --- a/packages/modules/order/src/migrations/Migration20240715102100.ts +++ b/packages/modules/order/src/migrations/Migration20240715102100.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240715102100 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240715174100.ts b/packages/modules/order/src/migrations/Migration20240715174100.ts index 43f17594cc..bc5f116b83 100644 --- a/packages/modules/order/src/migrations/Migration20240715174100.ts +++ b/packages/modules/order/src/migrations/Migration20240715174100.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240715174100 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240716081800.ts b/packages/modules/order/src/migrations/Migration20240716081800.ts index c32ec6fae4..1b8fe42f30 100644 --- a/packages/modules/order/src/migrations/Migration20240716081800.ts +++ b/packages/modules/order/src/migrations/Migration20240716081800.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240716081800 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240801085921.ts b/packages/modules/order/src/migrations/Migration20240801085921.ts index 74cc6bbb7c..7a8c2edebe 100644 --- a/packages/modules/order/src/migrations/Migration20240801085921.ts +++ b/packages/modules/order/src/migrations/Migration20240801085921.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240801085921 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240821164505.ts b/packages/modules/order/src/migrations/Migration20240821164505.ts index a069437a74..baf2dbce2e 100644 --- a/packages/modules/order/src/migrations/Migration20240821164505.ts +++ b/packages/modules/order/src/migrations/Migration20240821164505.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240821164505 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240821170920.ts b/packages/modules/order/src/migrations/Migration20240821170920.ts index 4342d52404..66a0c913bd 100644 --- a/packages/modules/order/src/migrations/Migration20240821170920.ts +++ b/packages/modules/order/src/migrations/Migration20240821170920.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240821170920 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240827133639.ts b/packages/modules/order/src/migrations/Migration20240827133639.ts index a1587cac1f..db49165e93 100644 --- a/packages/modules/order/src/migrations/Migration20240827133639.ts +++ b/packages/modules/order/src/migrations/Migration20240827133639.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240827133639 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240902195921.ts b/packages/modules/order/src/migrations/Migration20240902195921.ts index d0ed2be64e..717f4130cb 100644 --- a/packages/modules/order/src/migrations/Migration20240902195921.ts +++ b/packages/modules/order/src/migrations/Migration20240902195921.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240902195921 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240913092514.ts b/packages/modules/order/src/migrations/Migration20240913092514.ts index c661500b51..d8d2199f0e 100644 --- a/packages/modules/order/src/migrations/Migration20240913092514.ts +++ b/packages/modules/order/src/migrations/Migration20240913092514.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240913092514 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20240930122627.ts b/packages/modules/order/src/migrations/Migration20240930122627.ts index e56d6a541d..e81d48dee4 100644 --- a/packages/modules/order/src/migrations/Migration20240930122627.ts +++ b/packages/modules/order/src/migrations/Migration20240930122627.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240930122627 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20241014142943.ts b/packages/modules/order/src/migrations/Migration20241014142943.ts index b2398bccdb..a5ec9ba36c 100644 --- a/packages/modules/order/src/migrations/Migration20241014142943.ts +++ b/packages/modules/order/src/migrations/Migration20241014142943.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241014142943 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20241106085223.ts b/packages/modules/order/src/migrations/Migration20241106085223.ts index 287bf47572..e026d43f11 100644 --- a/packages/modules/order/src/migrations/Migration20241106085223.ts +++ b/packages/modules/order/src/migrations/Migration20241106085223.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241106085223 extends Migration { diff --git a/packages/modules/order/src/migrations/Migration20241129124827.ts b/packages/modules/order/src/migrations/Migration20241129124827.ts index b9fd13eb94..ec4ed02160 100644 --- a/packages/modules/order/src/migrations/Migration20241129124827.ts +++ b/packages/modules/order/src/migrations/Migration20241129124827.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241129124827 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20241217162224.ts b/packages/modules/order/src/migrations/Migration20241217162224.ts index 0ed45eff84..e5b95a1f9a 100644 --- a/packages/modules/order/src/migrations/Migration20241217162224.ts +++ b/packages/modules/order/src/migrations/Migration20241217162224.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241217162224 extends Migration { async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20250326151554.ts b/packages/modules/order/src/migrations/Migration20250326151554.ts index 3bdb2414a6..59ff8d900f 100644 --- a/packages/modules/order/src/migrations/Migration20250326151554.ts +++ b/packages/modules/order/src/migrations/Migration20250326151554.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250326151554 extends Migration { override async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20250522181137.ts b/packages/modules/order/src/migrations/Migration20250522181137.ts index 5f65c3f07b..580ade2054 100644 --- a/packages/modules/order/src/migrations/Migration20250522181137.ts +++ b/packages/modules/order/src/migrations/Migration20250522181137.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250522181137 extends Migration { override async up(): Promise { diff --git a/packages/modules/order/src/migrations/Migration20250702095353.ts b/packages/modules/order/src/migrations/Migration20250702095353.ts index 24a4746a63..ac6cdf95b7 100644 --- a/packages/modules/order/src/migrations/Migration20250702095353.ts +++ b/packages/modules/order/src/migrations/Migration20250702095353.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250702095353 extends Migration { diff --git a/packages/modules/order/src/migrations/Migration20250704120229.ts b/packages/modules/order/src/migrations/Migration20250704120229.ts index e27e29de87..c79e95d2ba 100644 --- a/packages/modules/order/src/migrations/Migration20250704120229.ts +++ b/packages/modules/order/src/migrations/Migration20250704120229.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250704120229 extends Migration { override async up(): Promise { diff --git a/packages/modules/order/src/services/order-module-service.ts b/packages/modules/order/src/services/order-module-service.ts index a592ad46e1..5211e52864 100644 --- a/packages/modules/order/src/services/order-module-service.ts +++ b/packages/modules/order/src/services/order-module-service.ts @@ -43,7 +43,7 @@ import { toMikroORMEntity, transformPropertiesToBigNumber, } from "@medusajs/framework/utils" -import { BeforeCreate, OnInit, rel } from "@mikro-orm/core" +import { BeforeCreate, OnInit, rel } from "@medusajs/framework/mikro-orm/core" import { Order, OrderAddress, diff --git a/packages/modules/order/src/utils/base-repository-find.ts b/packages/modules/order/src/utils/base-repository-find.ts index b039464963..aa03039a7a 100644 --- a/packages/modules/order/src/utils/base-repository-find.ts +++ b/packages/modules/order/src/utils/base-repository-find.ts @@ -1,6 +1,6 @@ import { Constructor, Context, DAL } from "@medusajs/framework/types" import { toMikroORMEntity } from "@medusajs/framework/utils" -import { LoadStrategy } from "@mikro-orm/core" +import { LoadStrategy } from "@medusajs/framework/mikro-orm/core" import { Order, OrderClaim } from "@models" import { mapRepositoryToOrderModel } from "." diff --git a/packages/modules/payment/integration-tests/__fixtures__/index.ts b/packages/modules/payment/integration-tests/__fixtures__/index.ts index ee87a7d8a9..cf54978f92 100644 --- a/packages/modules/payment/integration-tests/__fixtures__/index.ts +++ b/packages/modules/payment/integration-tests/__fixtures__/index.ts @@ -1,5 +1,5 @@ -import { EntityName } from "@mikro-orm/core" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { EntityName } from "@medusajs/framework/mikro-orm/core" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { Payment, PaymentSession, PaymentCollection } from "@models" diff --git a/packages/modules/payment/package.json b/packages/modules/payment/package.json index 6f08e1b721..40532e3536 100644 --- a/packages/modules/payment/package.json +++ b/packages/modules/payment/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/payment/src/loaders/providers.ts b/packages/modules/payment/src/loaders/providers.ts index 676d43bf9d..e5304f01f6 100644 --- a/packages/modules/payment/src/loaders/providers.ts +++ b/packages/modules/payment/src/loaders/providers.ts @@ -5,7 +5,7 @@ import { ModuleProvider, ModulesSdkTypes, } from "@medusajs/framework/types" -import { asFunction, asValue, Lifetime } from "awilix" +import { asFunction, asValue, Lifetime } from "@medusajs/framework/awilix" import { MedusaError } from "@medusajs/framework/utils" import { PaymentProviderService } from "@services" diff --git a/packages/modules/payment/src/migrations/Migration20240225134525.ts b/packages/modules/payment/src/migrations/Migration20240225134525.ts index 859808c8dc..50e31b73b2 100644 --- a/packages/modules/payment/src/migrations/Migration20240225134525.ts +++ b/packages/modules/payment/src/migrations/Migration20240225134525.ts @@ -1,5 +1,5 @@ import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240225134525 extends Migration { async up(): Promise { diff --git a/packages/modules/payment/src/migrations/Migration20240806072619.ts b/packages/modules/payment/src/migrations/Migration20240806072619.ts index 6288e3428a..4e079d664d 100644 --- a/packages/modules/payment/src/migrations/Migration20240806072619.ts +++ b/packages/modules/payment/src/migrations/Migration20240806072619.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240806072619 extends Migration { async up(): Promise { diff --git a/packages/modules/payment/src/migrations/Migration20241211151053.ts b/packages/modules/payment/src/migrations/Migration20241211151053.ts index 572abfb5d2..f486d54edd 100644 --- a/packages/modules/payment/src/migrations/Migration20241211151053.ts +++ b/packages/modules/payment/src/migrations/Migration20241211151053.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241211151053 extends Migration { diff --git a/packages/modules/payment/src/migrations/Migration20250115160517.ts b/packages/modules/payment/src/migrations/Migration20250115160517.ts index 8fdac7de07..634e296401 100644 --- a/packages/modules/payment/src/migrations/Migration20250115160517.ts +++ b/packages/modules/payment/src/migrations/Migration20250115160517.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250115160517 extends Migration { diff --git a/packages/modules/payment/src/migrations/Migration20250120110552.ts b/packages/modules/payment/src/migrations/Migration20250120110552.ts index 0bde8a465a..ee81bf1316 100644 --- a/packages/modules/payment/src/migrations/Migration20250120110552.ts +++ b/packages/modules/payment/src/migrations/Migration20250120110552.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250120110552 extends Migration { async up(): Promise { diff --git a/packages/modules/payment/src/migrations/Migration20250123122334.ts b/packages/modules/payment/src/migrations/Migration20250123122334.ts index d07d2db352..95d41649cd 100644 --- a/packages/modules/payment/src/migrations/Migration20250123122334.ts +++ b/packages/modules/payment/src/migrations/Migration20250123122334.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250123122334 extends Migration { diff --git a/packages/modules/payment/src/migrations/Migration20250206105639.ts b/packages/modules/payment/src/migrations/Migration20250206105639.ts index eb21a22c1c..18dcb3caaf 100644 --- a/packages/modules/payment/src/migrations/Migration20250206105639.ts +++ b/packages/modules/payment/src/migrations/Migration20250206105639.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250206105639 extends Migration { diff --git a/packages/modules/payment/src/migrations/Migration20250207132723.ts b/packages/modules/payment/src/migrations/Migration20250207132723.ts index 5a67e52000..d6d1a9ea0d 100644 --- a/packages/modules/payment/src/migrations/Migration20250207132723.ts +++ b/packages/modules/payment/src/migrations/Migration20250207132723.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250207132723 extends Migration { diff --git a/packages/modules/payment/src/migrations/Migration20250625084134.ts b/packages/modules/payment/src/migrations/Migration20250625084134.ts index 41939c1189..b716548437 100644 --- a/packages/modules/payment/src/migrations/Migration20250625084134.ts +++ b/packages/modules/payment/src/migrations/Migration20250625084134.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250625084134 extends Migration { diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-list-rules/index.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-list-rules/index.ts index 9f747f26c5..f2fc2e5c79 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-list-rules/index.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-list-rules/index.ts @@ -1,4 +1,4 @@ -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { PriceListRule } from "@models" import { toMikroORMEntity } from "@medusajs/framework/utils" import { defaultPriceListRuleData } from "./data" diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-list/index.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-list/index.ts index d105eaafa9..443f9b7c54 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-list/index.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-list/index.ts @@ -1,4 +1,4 @@ -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { PriceList } from "@models" import { toMikroORMEntity } from "@medusajs/framework/utils" import { defaultPriceListData } from "./data" diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts index 4aa2457bd2..7324453441 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts @@ -1,7 +1,7 @@ import { PriceRule } from "@models" import { CreatePriceRuleDTO } from "@medusajs/framework/types" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { toMikroORMEntity } from "@medusajs/framework/utils" import { defaultPriceRuleData } from "./data" diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts index 25fa848374..c5adacfb15 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts @@ -1,5 +1,5 @@ import { CreatePriceSetDTO } from "@medusajs/framework/types" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { Price, PriceSet } from "@models" import { toMikroORMEntity } from "@medusajs/framework/utils" import { defaultPriceSetsData } from "./data" diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price/index.ts b/packages/modules/pricing/integration-tests/__fixtures__/price/index.ts index a5a9a43715..36203523d5 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price/index.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price/index.ts @@ -1,6 +1,6 @@ import { Price } from "@models" import { defaultPricesData } from "./data" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { toMikroORMEntity } from "@medusajs/framework/utils" export * from "./data" diff --git a/packages/modules/pricing/integration-tests/__fixtures__/seed-price-data.ts b/packages/modules/pricing/integration-tests/__fixtures__/seed-price-data.ts index 5574c64018..43901df8d3 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/seed-price-data.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/seed-price-data.ts @@ -1,4 +1,4 @@ -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { createPrices, defaultPricesData } from "./price" import { createPriceRules, defaultPriceRuleData } from "./price-rule" import { createPriceSets, defaultPriceSetsData } from "./price-set" diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts index f142985eb6..3ec44d27bf 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts @@ -1,5 +1,5 @@ import { IPricingModuleService } from "@medusajs/framework/types" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { moduleIntegrationTestRunner } from "@medusajs/test-utils" import { createPriceLists } from "../../../__fixtures__/price-list" import { createPriceListRules } from "../../../__fixtures__/price-list-rules" diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts index f931ee992d..eb91659bb6 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts @@ -1,5 +1,5 @@ import { IPricingModuleService } from "@medusajs/framework/types" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { moduleIntegrationTestRunner } from "@medusajs/test-utils" import { Price } from "../../../../src/models" import { createPrices } from "../../../__fixtures__/price" diff --git a/packages/modules/pricing/package.json b/packages/modules/pricing/package.json index fae1186f82..bcaf891c54 100644 --- a/packages/modules/pricing/package.json +++ b/packages/modules/pricing/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/pricing/src/migrations/Migration20230929122253.ts b/packages/modules/pricing/src/migrations/Migration20230929122253.ts index 655da74d46..c35dd8befa 100644 --- a/packages/modules/pricing/src/migrations/Migration20230929122253.ts +++ b/packages/modules/pricing/src/migrations/Migration20230929122253.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20230929122253 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20240322094407.ts b/packages/modules/pricing/src/migrations/Migration20240322094407.ts index 65199ef4f9..73a31cccc6 100644 --- a/packages/modules/pricing/src/migrations/Migration20240322094407.ts +++ b/packages/modules/pricing/src/migrations/Migration20240322094407.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240322094407 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20240322113359.ts b/packages/modules/pricing/src/migrations/Migration20240322113359.ts index e80671e944..d4953c9d13 100644 --- a/packages/modules/pricing/src/migrations/Migration20240322113359.ts +++ b/packages/modules/pricing/src/migrations/Migration20240322113359.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240322113359 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20240322120125.ts b/packages/modules/pricing/src/migrations/Migration20240322120125.ts index 97e17bc37c..3e1c65a4be 100644 --- a/packages/modules/pricing/src/migrations/Migration20240322120125.ts +++ b/packages/modules/pricing/src/migrations/Migration20240322120125.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240322120125 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20240626133555.ts b/packages/modules/pricing/src/migrations/Migration20240626133555.ts index 7e688f1fb7..a0ba07ed7b 100644 --- a/packages/modules/pricing/src/migrations/Migration20240626133555.ts +++ b/packages/modules/pricing/src/migrations/Migration20240626133555.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240626133555 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20240704094505.ts b/packages/modules/pricing/src/migrations/Migration20240704094505.ts index 520b835c3d..8130687899 100644 --- a/packages/modules/pricing/src/migrations/Migration20240704094505.ts +++ b/packages/modules/pricing/src/migrations/Migration20240704094505.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240704094505 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20241127114534.ts b/packages/modules/pricing/src/migrations/Migration20241127114534.ts index aab0492d8b..712abf0823 100644 --- a/packages/modules/pricing/src/migrations/Migration20241127114534.ts +++ b/packages/modules/pricing/src/migrations/Migration20241127114534.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241127114534 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20241127223829.ts b/packages/modules/pricing/src/migrations/Migration20241127223829.ts index ba3ceedb91..5ae7d3e69c 100644 --- a/packages/modules/pricing/src/migrations/Migration20241127223829.ts +++ b/packages/modules/pricing/src/migrations/Migration20241127223829.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241127223829 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20241128055359.ts b/packages/modules/pricing/src/migrations/Migration20241128055359.ts index c9eeb8e874..48015363da 100644 --- a/packages/modules/pricing/src/migrations/Migration20241128055359.ts +++ b/packages/modules/pricing/src/migrations/Migration20241128055359.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241128055359 extends Migration { diff --git a/packages/modules/pricing/src/migrations/Migration20241212190401.ts b/packages/modules/pricing/src/migrations/Migration20241212190401.ts index 77e862f03f..562aade820 100644 --- a/packages/modules/pricing/src/migrations/Migration20241212190401.ts +++ b/packages/modules/pricing/src/migrations/Migration20241212190401.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241212190401 extends Migration { async up(): Promise { diff --git a/packages/modules/pricing/src/migrations/Migration20250408145122.ts b/packages/modules/pricing/src/migrations/Migration20250408145122.ts index 409709c286..e7d3d0255e 100644 --- a/packages/modules/pricing/src/migrations/Migration20250408145122.ts +++ b/packages/modules/pricing/src/migrations/Migration20250408145122.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250408145122 extends Migration { diff --git a/packages/modules/pricing/src/migrations/Migration20250409122219.ts b/packages/modules/pricing/src/migrations/Migration20250409122219.ts index 2a5e17ddb0..a7a8b3dedf 100644 --- a/packages/modules/pricing/src/migrations/Migration20250409122219.ts +++ b/packages/modules/pricing/src/migrations/Migration20250409122219.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250409122219 extends Migration { diff --git a/packages/modules/pricing/src/repositories/pricing.ts b/packages/modules/pricing/src/repositories/pricing.ts index 2d8ed67005..bd7eef0de9 100644 --- a/packages/modules/pricing/src/repositories/pricing.ts +++ b/packages/modules/pricing/src/repositories/pricing.ts @@ -13,7 +13,10 @@ import { PricingFilters, PricingRepositoryService, } from "@medusajs/framework/types" -import { Knex, SqlEntityManager } from "@mikro-orm/postgresql" +import { + Knex, + SqlEntityManager, +} from "@medusajs/framework/mikro-orm/postgresql" export class PricingRepository extends MikroOrmBase diff --git a/packages/modules/pricing/src/services/pricing-module.ts b/packages/modules/pricing/src/services/pricing-module.ts index fc93e0f5b3..91356bdd8b 100644 --- a/packages/modules/pricing/src/services/pricing-module.ts +++ b/packages/modules/pricing/src/services/pricing-module.ts @@ -52,7 +52,7 @@ import { PriceSet, } from "@models" -import { Collection } from "@mikro-orm/core" +import { Collection } from "@medusajs/framework/mikro-orm/core" import { ServiceTypes } from "@types" import { validatePriceListDates } from "@utils" import { joinerConfig } from "../joiner-config" diff --git a/packages/modules/product/integration-tests/__fixtures__/product/index.ts b/packages/modules/product/integration-tests/__fixtures__/product/index.ts index b903494988..0d55028d5c 100644 --- a/packages/modules/product/integration-tests/__fixtures__/product/index.ts +++ b/packages/modules/product/integration-tests/__fixtures__/product/index.ts @@ -3,7 +3,7 @@ import { ProductStatus, toMikroORMEntity, } from "@medusajs/framework/utils" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { ProductImage, Product, diff --git a/packages/modules/product/integration-tests/__tests__/product.spec.ts b/packages/modules/product/integration-tests/__tests__/product.spec.ts index d80a88de62..b898739727 100644 --- a/packages/modules/product/integration-tests/__tests__/product.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product.spec.ts @@ -20,7 +20,7 @@ import { toMikroORMEntity, } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { ProductCategoryService, ProductModuleService, diff --git a/packages/modules/product/package.json b/packages/modules/product/package.json index b8251f301f..3491421f93 100644 --- a/packages/modules/product/package.json +++ b/packages/modules/product/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "faker": "^5.5.3", @@ -51,10 +47,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/product/src/migrations/InitialSetup20240401153642.ts b/packages/modules/product/src/migrations/InitialSetup20240401153642.ts index 8e24748615..23d7e7b858 100644 --- a/packages/modules/product/src/migrations/InitialSetup20240401153642.ts +++ b/packages/modules/product/src/migrations/InitialSetup20240401153642.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class InitialSetup20240315083440 extends Migration { async up(): Promise { diff --git a/packages/modules/product/src/migrations/Migration20240601111544.ts b/packages/modules/product/src/migrations/Migration20240601111544.ts index 86899676a7..0d76b73f65 100644 --- a/packages/modules/product/src/migrations/Migration20240601111544.ts +++ b/packages/modules/product/src/migrations/Migration20240601111544.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240601111544 extends Migration { async up(): Promise { diff --git a/packages/modules/product/src/migrations/Migration202408271511.ts b/packages/modules/product/src/migrations/Migration202408271511.ts index 4598eb3231..c2ebf2d94e 100644 --- a/packages/modules/product/src/migrations/Migration202408271511.ts +++ b/packages/modules/product/src/migrations/Migration202408271511.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration202408271511 extends Migration { async up(): Promise { diff --git a/packages/modules/product/src/migrations/Migration20241122120331.ts b/packages/modules/product/src/migrations/Migration20241122120331.ts index ff324f3e1e..edae52ac80 100644 --- a/packages/modules/product/src/migrations/Migration20241122120331.ts +++ b/packages/modules/product/src/migrations/Migration20241122120331.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241122120331 extends Migration { diff --git a/packages/modules/product/src/migrations/Migration20241125090957.ts b/packages/modules/product/src/migrations/Migration20241125090957.ts index f203486e9b..7f87304483 100644 --- a/packages/modules/product/src/migrations/Migration20241125090957.ts +++ b/packages/modules/product/src/migrations/Migration20241125090957.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241125090957 extends Migration { async up(): Promise { diff --git a/packages/modules/product/src/migrations/Migration20250411073236.ts b/packages/modules/product/src/migrations/Migration20250411073236.ts index cadc58b84e..400c7d6331 100644 --- a/packages/modules/product/src/migrations/Migration20250411073236.ts +++ b/packages/modules/product/src/migrations/Migration20250411073236.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250411073236 extends Migration { diff --git a/packages/modules/product/src/migrations/Migration20250516081326.ts b/packages/modules/product/src/migrations/Migration20250516081326.ts index 175021a659..4799326992 100644 --- a/packages/modules/product/src/migrations/Migration20250516081326.ts +++ b/packages/modules/product/src/migrations/Migration20250516081326.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250516081326 extends Migration { diff --git a/packages/modules/product/src/repositories/product-category.ts b/packages/modules/product/src/repositories/product-category.ts index f5573a37f8..c5ce205272 100644 --- a/packages/modules/product/src/repositories/product-category.ts +++ b/packages/modules/product/src/repositories/product-category.ts @@ -6,8 +6,11 @@ import { ProductTypes, } from "@medusajs/framework/types" import { DALUtils, isDefined, MedusaError } from "@medusajs/framework/utils" -import { FindOptions as MikroOptions, LoadStrategy } from "@mikro-orm/core" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { + LoadStrategy, + FindOptions as MikroOptions, +} from "@medusajs/framework/mikro-orm/core" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { ProductCategory } from "@models" import { UpdateCategoryInput } from "@types" diff --git a/packages/modules/product/src/repositories/product.ts b/packages/modules/product/src/repositories/product.ts index 186a3b600a..fff62ada8b 100644 --- a/packages/modules/product/src/repositories/product.ts +++ b/packages/modules/product/src/repositories/product.ts @@ -11,7 +11,10 @@ import { isDefined, deepCopy, } from "@medusajs/framework/utils" -import { SqlEntityManager, wrap } from "@mikro-orm/postgresql" +import { + SqlEntityManager, + wrap, +} from "@medusajs/framework/mikro-orm/postgresql" export class ProductRepository extends DALUtils.mikroOrmBaseRepositoryFactory( Product diff --git a/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts b/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts index a00a6fb9bb..43951b7da2 100644 --- a/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts +++ b/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts @@ -1,6 +1,6 @@ import { CreateCampaignDTO } from "@medusajs/framework/types" import { toMikroORMEntity } from "@medusajs/framework/utils" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { Campaign } from "@models" import { defaultCampaignsData } from "./data" diff --git a/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts b/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts index 71825eb823..001e905822 100644 --- a/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts +++ b/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts @@ -8,7 +8,7 @@ import { PromotionStatus, toMikroORMEntity, } from "@medusajs/framework/utils" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { Promotion } from "@models" import { defaultPromotionsData } from "./data" diff --git a/packages/modules/promotion/package.json b/packages/modules/promotion/package.json index be129f0c31..ca8fb0190a 100644 --- a/packages/modules/promotion/package.json +++ b/packages/modules/promotion/package.json @@ -39,10 +39,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -51,10 +47,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/promotion/src/migrations/Migration20240227120221.ts b/packages/modules/promotion/src/migrations/Migration20240227120221.ts index 2b4a1f0a9c..8c37712180 100644 --- a/packages/modules/promotion/src/migrations/Migration20240227120221.ts +++ b/packages/modules/promotion/src/migrations/Migration20240227120221.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240227120221 extends Migration { async up(): Promise { diff --git a/packages/modules/promotion/src/migrations/Migration20240617102917.ts b/packages/modules/promotion/src/migrations/Migration20240617102917.ts index 81652e1813..6763864ee9 100644 --- a/packages/modules/promotion/src/migrations/Migration20240617102917.ts +++ b/packages/modules/promotion/src/migrations/Migration20240617102917.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240617102917 extends Migration { async up(): Promise { diff --git a/packages/modules/promotion/src/migrations/Migration20240624153824.ts b/packages/modules/promotion/src/migrations/Migration20240624153824.ts index 9b858e2e3f..eaa42c2316 100644 --- a/packages/modules/promotion/src/migrations/Migration20240624153824.ts +++ b/packages/modules/promotion/src/migrations/Migration20240624153824.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240624153824 extends Migration { async up(): Promise { diff --git a/packages/modules/promotion/src/migrations/Migration20241211061114.ts b/packages/modules/promotion/src/migrations/Migration20241211061114.ts index 83b4284a2d..59657671d6 100644 --- a/packages/modules/promotion/src/migrations/Migration20241211061114.ts +++ b/packages/modules/promotion/src/migrations/Migration20241211061114.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241211061114 extends Migration { async up(): Promise { diff --git a/packages/modules/promotion/src/migrations/Migration20250113094144.ts b/packages/modules/promotion/src/migrations/Migration20250113094144.ts index 69f8e14584..2aa6ceb583 100644 --- a/packages/modules/promotion/src/migrations/Migration20250113094144.ts +++ b/packages/modules/promotion/src/migrations/Migration20250113094144.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250113094144 extends Migration { async up(): Promise { diff --git a/packages/modules/promotion/src/migrations/Migration20250120110700.ts b/packages/modules/promotion/src/migrations/Migration20250120110700.ts index a7b0d4f8b8..a6bb995507 100644 --- a/packages/modules/promotion/src/migrations/Migration20250120110700.ts +++ b/packages/modules/promotion/src/migrations/Migration20250120110700.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250120110700 extends Migration { diff --git a/packages/modules/promotion/src/migrations/Migration20250226130616.ts b/packages/modules/promotion/src/migrations/Migration20250226130616.ts index 17525d2c9a..41a38cf627 100644 --- a/packages/modules/promotion/src/migrations/Migration20250226130616.ts +++ b/packages/modules/promotion/src/migrations/Migration20250226130616.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250226130616 extends Migration { override async up(): Promise { diff --git a/packages/modules/promotion/src/migrations/Migration20250508081510.ts b/packages/modules/promotion/src/migrations/Migration20250508081510.ts index b8f4f71152..763b3e5a60 100644 --- a/packages/modules/promotion/src/migrations/Migration20250508081510.ts +++ b/packages/modules/promotion/src/migrations/Migration20250508081510.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250508081510 extends Migration { override async up(): Promise { diff --git a/packages/modules/promotion/src/migrations/Migration20250828075407.ts b/packages/modules/promotion/src/migrations/Migration20250828075407.ts index d94f5c4f42..ecb5c68080 100644 --- a/packages/modules/promotion/src/migrations/Migration20250828075407.ts +++ b/packages/modules/promotion/src/migrations/Migration20250828075407.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250828075407 extends Migration { override async up(): Promise { diff --git a/packages/modules/providers/locking-postgres/package.json b/packages/modules/providers/locking-postgres/package.json index 38a8ef80f6..8fa36a3914 100644 --- a/packages/modules/providers/locking-postgres/package.json +++ b/packages/modules/providers/locking-postgres/package.json @@ -21,10 +21,6 @@ "license": "MIT", "devDependencies": { "@medusajs/framework": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", diff --git a/packages/modules/providers/locking-postgres/src/migrations/Migration20241009222919_InitialSetupMigration.ts b/packages/modules/providers/locking-postgres/src/migrations/Migration20241009222919_InitialSetupMigration.ts index 451b314df7..5b5dfb621e 100644 --- a/packages/modules/providers/locking-postgres/src/migrations/Migration20241009222919_InitialSetupMigration.ts +++ b/packages/modules/providers/locking-postgres/src/migrations/Migration20241009222919_InitialSetupMigration.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241009222919_InitialSetupMigration extends Migration { async up(): Promise { diff --git a/packages/modules/providers/locking-postgres/src/services/advisory-lock.ts b/packages/modules/providers/locking-postgres/src/services/advisory-lock.ts index 27912cb749..9b85a52785 100644 --- a/packages/modules/providers/locking-postgres/src/services/advisory-lock.ts +++ b/packages/modules/providers/locking-postgres/src/services/advisory-lock.ts @@ -1,6 +1,6 @@ import { ILockingProvider } from "@medusajs/framework/types" import { isDefined, MedusaService } from "@medusajs/framework/utils" -import { EntityManager } from "@mikro-orm/core" +import { EntityManager } from "@medusajs/framework/mikro-orm/core" import { Locking } from "@models" type InjectedDependencies = { diff --git a/packages/modules/providers/locking-redis/src/loaders/index.ts b/packages/modules/providers/locking-redis/src/loaders/index.ts index 5f8ad5ce12..c973b2919e 100644 --- a/packages/modules/providers/locking-redis/src/loaders/index.ts +++ b/packages/modules/providers/locking-redis/src/loaders/index.ts @@ -1,7 +1,7 @@ import { Modules } from "@medusajs/framework/utils" import { ProviderLoaderOptions } from "@medusajs/types" import { RedisCacheModuleOptions } from "@types" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import Redis from "ioredis" export default async ({ diff --git a/packages/modules/providers/payment-stripe/package.json b/packages/modules/providers/payment-stripe/package.json index 0e4d90fe0e..4c6f8f0860 100644 --- a/packages/modules/providers/payment-stripe/package.json +++ b/packages/modules/providers/payment-stripe/package.json @@ -33,8 +33,7 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" }, "dependencies": { "stripe": "^15.5.0" diff --git a/packages/modules/region/package.json b/packages/modules/region/package.json index 730262cd68..8f4a20eab2 100644 --- a/packages/modules/region/package.json +++ b/packages/modules/region/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/region/src/migrations/Migration20240205173216.ts b/packages/modules/region/src/migrations/Migration20240205173216.ts index a0296a7260..dcc347d8f7 100644 --- a/packages/modules/region/src/migrations/Migration20240205173216.ts +++ b/packages/modules/region/src/migrations/Migration20240205173216.ts @@ -1,5 +1,5 @@ import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class RegionModuleSetup20240205173216 extends Migration { async up(): Promise { diff --git a/packages/modules/region/src/migrations/Migration20240624200006.ts b/packages/modules/region/src/migrations/Migration20240624200006.ts index c5243910e0..d3012a36e3 100644 --- a/packages/modules/region/src/migrations/Migration20240624200006.ts +++ b/packages/modules/region/src/migrations/Migration20240624200006.ts @@ -1,5 +1,5 @@ import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240624200006 extends Migration { async up(): Promise { diff --git a/packages/modules/region/src/migrations/Migration20250120110744.ts b/packages/modules/region/src/migrations/Migration20250120110744.ts index 14f8678f48..ed44b7d17d 100644 --- a/packages/modules/region/src/migrations/Migration20250120110744.ts +++ b/packages/modules/region/src/migrations/Migration20250120110744.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250120110744 extends Migration { diff --git a/packages/modules/sales-channel/package.json b/packages/modules/sales-channel/package.json index 1050e05af1..88cca73a4e 100644 --- a/packages/modules/sales-channel/package.json +++ b/packages/modules/sales-channel/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/sales-channel/src/migrations/Migration20240115152146.ts b/packages/modules/sales-channel/src/migrations/Migration20240115152146.ts index 82a2a3dadf..6ac35a6a73 100644 --- a/packages/modules/sales-channel/src/migrations/Migration20240115152146.ts +++ b/packages/modules/sales-channel/src/migrations/Migration20240115152146.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240115152146 extends Migration { async up(): Promise { diff --git a/packages/modules/settings/package.json b/packages/modules/settings/package.json index 8f73cbfde0..e0defdeecc 100644 --- a/packages/modules/settings/package.json +++ b/packages/modules/settings/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/settings/src/migrations/Migration20250717162007.ts b/packages/modules/settings/src/migrations/Migration20250717162007.ts index b8c85d5a04..ef425179c9 100644 --- a/packages/modules/settings/src/migrations/Migration20250717162007.ts +++ b/packages/modules/settings/src/migrations/Migration20250717162007.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250717162007 extends Migration { diff --git a/packages/modules/stock-location/package.json b/packages/modules/stock-location/package.json index 76718697e5..ff3b2cd926 100644 --- a/packages/modules/stock-location/package.json +++ b/packages/modules/stock-location/package.json @@ -25,10 +25,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -37,11 +33,7 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" }, "scripts": { "watch": "tsc --build --watch", diff --git a/packages/modules/stock-location/src/migrations/Migration20240307161216.ts b/packages/modules/stock-location/src/migrations/Migration20240307161216.ts index 65a2768bb2..703d1a5605 100644 --- a/packages/modules/stock-location/src/migrations/Migration20240307161216.ts +++ b/packages/modules/stock-location/src/migrations/Migration20240307161216.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240307161216 extends Migration { async up(): Promise { diff --git a/packages/modules/stock-location/src/migrations/Migration20241210073813.ts b/packages/modules/stock-location/src/migrations/Migration20241210073813.ts index ef0e06a647..70094b0755 100644 --- a/packages/modules/stock-location/src/migrations/Migration20241210073813.ts +++ b/packages/modules/stock-location/src/migrations/Migration20241210073813.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241210073813 extends Migration { async up(): Promise { diff --git a/packages/modules/stock-location/src/migrations/Migration20250106142624.ts b/packages/modules/stock-location/src/migrations/Migration20250106142624.ts index d8b67c3a03..73d1d7adae 100644 --- a/packages/modules/stock-location/src/migrations/Migration20250106142624.ts +++ b/packages/modules/stock-location/src/migrations/Migration20250106142624.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250106142624 extends Migration { async up(): Promise { diff --git a/packages/modules/stock-location/src/migrations/Migration20250120110820.ts b/packages/modules/stock-location/src/migrations/Migration20250120110820.ts index f6d69e83a1..7d7fce2064 100644 --- a/packages/modules/stock-location/src/migrations/Migration20250120110820.ts +++ b/packages/modules/stock-location/src/migrations/Migration20250120110820.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250120110820 extends Migration { diff --git a/packages/modules/store/package.json b/packages/modules/store/package.json index b0b8fd04d2..6f7b150e13 100644 --- a/packages/modules/store/package.json +++ b/packages/modules/store/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/store/src/migrations/InitialSetup20240227075933.ts b/packages/modules/store/src/migrations/InitialSetup20240227075933.ts index d27a4d1b12..60d706367a 100644 --- a/packages/modules/store/src/migrations/InitialSetup20240227075933.ts +++ b/packages/modules/store/src/migrations/InitialSetup20240227075933.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class InitialSetup20240226130829 extends Migration { async up(): Promise { diff --git a/packages/modules/store/src/migrations/Migration20240621145944.ts b/packages/modules/store/src/migrations/Migration20240621145944.ts index b898d0f1c6..a689644923 100644 --- a/packages/modules/store/src/migrations/Migration20240621145944.ts +++ b/packages/modules/store/src/migrations/Migration20240621145944.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240621145944 extends Migration { async up(): Promise { diff --git a/packages/modules/store/src/migrations/Migration20241206083313.ts b/packages/modules/store/src/migrations/Migration20241206083313.ts index de8556efea..481be1c698 100644 --- a/packages/modules/store/src/migrations/Migration20241206083313.ts +++ b/packages/modules/store/src/migrations/Migration20241206083313.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241206083313 extends Migration { diff --git a/packages/modules/tax/package.json b/packages/modules/tax/package.json index 2e76621960..b369540c71 100644 --- a/packages/modules/tax/package.json +++ b/packages/modules/tax/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -50,10 +46,6 @@ "typescript": "^5.6.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/tax/src/loaders/providers.ts b/packages/modules/tax/src/loaders/providers.ts index 675504b1f0..31caf27c0a 100644 --- a/packages/modules/tax/src/loaders/providers.ts +++ b/packages/modules/tax/src/loaders/providers.ts @@ -6,7 +6,7 @@ import { ModuleProvider, ModulesSdkTypes, } from "@medusajs/framework/types" -import { asFunction, asValue, Lifetime } from "awilix" +import { asFunction, asValue, Lifetime } from "@medusajs/framework/awilix" import { MedusaError } from "@medusajs/framework/utils" import * as providers from "../providers" diff --git a/packages/modules/tax/src/migrations/Migration20240227090331.ts b/packages/modules/tax/src/migrations/Migration20240227090331.ts index f9af48af98..e78775ac9f 100644 --- a/packages/modules/tax/src/migrations/Migration20240227090331.ts +++ b/packages/modules/tax/src/migrations/Migration20240227090331.ts @@ -1,5 +1,5 @@ import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240227090331 extends Migration { async up(): Promise { diff --git a/packages/modules/tax/src/migrations/Migration20240710135844.ts b/packages/modules/tax/src/migrations/Migration20240710135844.ts index 93e1b299b2..8b5128207f 100644 --- a/packages/modules/tax/src/migrations/Migration20240710135844.ts +++ b/packages/modules/tax/src/migrations/Migration20240710135844.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240710135844 extends Migration { async up(): Promise { diff --git a/packages/modules/tax/src/migrations/Migration20240924114005.ts b/packages/modules/tax/src/migrations/Migration20240924114005.ts index fce6b6ed7e..764cf84be1 100644 --- a/packages/modules/tax/src/migrations/Migration20240924114005.ts +++ b/packages/modules/tax/src/migrations/Migration20240924114005.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240924114005 extends Migration { async up(): Promise { diff --git a/packages/modules/tax/src/migrations/Migration20241212052837.ts b/packages/modules/tax/src/migrations/Migration20241212052837.ts index ee1b6fa003..9228e28e61 100644 --- a/packages/modules/tax/src/migrations/Migration20241212052837.ts +++ b/packages/modules/tax/src/migrations/Migration20241212052837.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241212052837 extends Migration { diff --git a/packages/modules/user/package.json b/packages/modules/user/package.json index b8740f6357..058906563f 100644 --- a/packages/modules/user/package.json +++ b/packages/modules/user/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -53,10 +49,6 @@ "jsonwebtoken": "^9.0.2" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/user/src/migrations/Migration20240214033943.ts b/packages/modules/user/src/migrations/Migration20240214033943.ts index 7aa803e73c..817e3e0343 100644 --- a/packages/modules/user/src/migrations/Migration20240214033943.ts +++ b/packages/modules/user/src/migrations/Migration20240214033943.ts @@ -1,5 +1,5 @@ import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240214033943 extends Migration { async up(): Promise { diff --git a/packages/modules/user/src/migrations/Migration20240703095850.ts b/packages/modules/user/src/migrations/Migration20240703095850.ts index a62bfe54ec..bc7383a1ad 100644 --- a/packages/modules/user/src/migrations/Migration20240703095850.ts +++ b/packages/modules/user/src/migrations/Migration20240703095850.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20240703095850 extends Migration { async up(): Promise { diff --git a/packages/modules/user/src/migrations/Migration20241202103352.ts b/packages/modules/user/src/migrations/Migration20241202103352.ts index 4b1c30e8b5..83b366f564 100644 --- a/packages/modules/user/src/migrations/Migration20241202103352.ts +++ b/packages/modules/user/src/migrations/Migration20241202103352.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20241202103352 extends Migration { diff --git a/packages/modules/workflow-engine-inmemory/integration-tests/__tests__/index.spec.ts b/packages/modules/workflow-engine-inmemory/integration-tests/__tests__/index.spec.ts index 8543e93c26..2b36b91e50 100644 --- a/packages/modules/workflow-engine-inmemory/integration-tests/__tests__/index.spec.ts +++ b/packages/modules/workflow-engine-inmemory/integration-tests/__tests__/index.spec.ts @@ -25,7 +25,7 @@ import { } from "@medusajs/framework/workflows-sdk" import { moduleIntegrationTestRunner } from "@medusajs/test-utils" import { WorkflowsModuleService } from "@services" -import { asFunction } from "awilix" +import { asFunction } from "@medusajs/framework/awilix" import { setTimeout as setTimeoutSync } from "timers" import { setTimeout as setTimeoutPromise } from "timers/promises" import { ulid } from "ulid" diff --git a/packages/modules/workflow-engine-inmemory/package.json b/packages/modules/workflow-engine-inmemory/package.json index 51075137ca..6689e7938d 100644 --- a/packages/modules/workflow-engine-inmemory/package.json +++ b/packages/modules/workflow-engine-inmemory/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -54,10 +50,6 @@ "ulid": "^2.3.0" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/workflow-engine-inmemory/src/loaders/utils.ts b/packages/modules/workflow-engine-inmemory/src/loaders/utils.ts index 3131eb8f92..8930090841 100644 --- a/packages/modules/workflow-engine-inmemory/src/loaders/utils.ts +++ b/packages/modules/workflow-engine-inmemory/src/loaders/utils.ts @@ -1,4 +1,4 @@ -import { asClass } from "awilix" +import { asClass } from "@medusajs/framework/awilix" import { InMemoryDistributedTransactionStorage } from "../utils" export default async ({ container }): Promise => { diff --git a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20231228143900.ts b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20231228143900.ts index af9958e80a..77c20d0632 100644 --- a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20231228143900.ts +++ b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20231228143900.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20231221104256 extends Migration { async up(): Promise { diff --git a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20241206101446.ts b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20241206101446.ts index be8b1cbac1..01f0d51fb5 100644 --- a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20241206101446.ts +++ b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20241206101446.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241206101446 extends Migration { async up(): Promise { diff --git a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250128174331.ts b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250128174331.ts index 5ae2822682..f620effe57 100644 --- a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250128174331.ts +++ b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250128174331.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250128174331 extends Migration { override async up(): Promise { diff --git a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250505092459.ts b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250505092459.ts index 937dcf6043..f04a8972cb 100644 --- a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250505092459.ts +++ b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250505092459.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" import { ulid } from "ulid" export class Migration20250505092459 extends Migration { @@ -19,7 +19,7 @@ export class Migration20250505092459 extends Migration { this.addSql( `CREATE UNIQUE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id_run_id_unique" ON "workflow_execution" (workflow_id, transaction_id, run_id) WHERE deleted_at IS NULL;` ) - /* + /* * We mistakenly named this migration differently in the workflow engines; this has caused issues with the migrations. Switching between engines will fail because the primary key is attempted to be set twice. * The issue happens in the following scenario: * 1. In memory engine is used @@ -29,9 +29,9 @@ export class Migration20250505092459 extends Migration { * 4. Migration is run * 5. Same primary key is attempted to be set again * 6. Migration fails - * + * * The same scenario can happen if you go from Redis to In memory. - * + * * With this fix, we ensure the primary key is only ever set once. */ this.addSql( diff --git a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819104213.ts b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819104213.ts index e929b0ea6d..03fd0f03fc 100644 --- a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819104213.ts +++ b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819104213.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250819104213 extends Migration { override async up(): Promise { diff --git a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819110924.ts b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819110924.ts index 8b52039fa5..5cd85bce5e 100644 --- a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819110924.ts +++ b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250819110924.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250819110924 extends Migration { override async up(): Promise { diff --git a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250908080305.ts b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250908080305.ts index 562642939e..612863fe14 100644 --- a/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250908080305.ts +++ b/packages/modules/workflow-engine-inmemory/src/migrations/Migration20250908080305.ts @@ -1,19 +1,33 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/deps/mikro-orm/migrations" export class Migration20250908080305 extends Migration { - override async up(): Promise { - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id" ON "workflow_execution" (workflow_id, transaction_id) WHERE deleted_at IS NULL;`); - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_state_updated_at" ON "workflow_execution" (state, updated_at) WHERE deleted_at IS NULL;`); - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_retention_time_updated_at_state" ON "workflow_execution" (retention_time, updated_at, state) WHERE deleted_at IS NULL AND retention_time IS NOT NULL;`); - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_updated_at_retention_time" ON "workflow_execution" (updated_at, retention_time) WHERE deleted_at IS NULL AND retention_time IS NOT NULL AND state IN ('done', 'failed', 'reverted');`); + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id" ON "workflow_execution" (workflow_id, transaction_id) WHERE deleted_at IS NULL;` + ) + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_state_updated_at" ON "workflow_execution" (state, updated_at) WHERE deleted_at IS NULL;` + ) + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_retention_time_updated_at_state" ON "workflow_execution" (retention_time, updated_at, state) WHERE deleted_at IS NULL AND retention_time IS NOT NULL;` + ) + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_updated_at_retention_time" ON "workflow_execution" (updated_at, retention_time) WHERE deleted_at IS NULL AND retention_time IS NOT NULL AND state IN ('done', 'failed', 'reverted');` + ) } override async down(): Promise { - this.addSql(`drop index if exists "IDX_workflow_execution_workflow_id_transaction_id";`); - this.addSql(`drop index if exists "IDX_workflow_execution_state_updated_at";`); - this.addSql(`drop index if exists "IDX_workflow_execution_retention_time_updated_at_state";`); - this.addSql(`drop index if exists "IDX_workflow_execution_updated_at_retention_time";`); + this.addSql( + `drop index if exists "IDX_workflow_execution_workflow_id_transaction_id";` + ) + this.addSql( + `drop index if exists "IDX_workflow_execution_state_updated_at";` + ) + this.addSql( + `drop index if exists "IDX_workflow_execution_retention_time_updated_at_state";` + ) + this.addSql( + `drop index if exists "IDX_workflow_execution_updated_at_retention_time";` + ) } - } diff --git a/packages/modules/workflow-engine-inmemory/src/services/workflows-module.ts b/packages/modules/workflow-engine-inmemory/src/services/workflows-module.ts index a33ed75536..53610e342c 100644 --- a/packages/modules/workflow-engine-inmemory/src/services/workflows-module.ts +++ b/packages/modules/workflow-engine-inmemory/src/services/workflows-module.ts @@ -21,7 +21,7 @@ import type { ReturnWorkflow, UnwrapWorkflowInputDataType, } from "@medusajs/framework/workflows-sdk" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { WorkflowExecution } from "@models" import { WorkflowOrchestratorService } from "@services" import { WorkflowOrchestratorCancelOptions } from "@types" diff --git a/packages/modules/workflow-engine-inmemory/src/utils/workflow-orchestrator-storage.ts b/packages/modules/workflow-engine-inmemory/src/utils/workflow-orchestrator-storage.ts index d8018e76bf..5f13c88d7a 100644 --- a/packages/modules/workflow-engine-inmemory/src/utils/workflow-orchestrator-storage.ts +++ b/packages/modules/workflow-engine-inmemory/src/utils/workflow-orchestrator-storage.ts @@ -24,7 +24,7 @@ import { TransactionStepState, isPresent, } from "@medusajs/framework/utils" -import { raw } from "@mikro-orm/core" +import { raw } from "@medusajs/framework/mikro-orm/core" import { WorkflowOrchestratorService } from "@services" import { type CronExpression, parseExpression } from "cron-parser" import { WorkflowExecution } from "../models/workflow-execution" diff --git a/packages/modules/workflow-engine-redis/integration-tests/__tests__/index.spec.ts b/packages/modules/workflow-engine-redis/integration-tests/__tests__/index.spec.ts index 723e8dd384..da3b0b46b5 100644 --- a/packages/modules/workflow-engine-redis/integration-tests/__tests__/index.spec.ts +++ b/packages/modules/workflow-engine-redis/integration-tests/__tests__/index.spec.ts @@ -27,7 +27,7 @@ import { WorkflowResponse, } from "@medusajs/framework/workflows-sdk" import { moduleIntegrationTestRunner } from "@medusajs/test-utils" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import { setTimeout as setTimeoutSync } from "timers" import { setTimeout } from "timers/promises" import { ulid } from "ulid" @@ -523,7 +523,7 @@ moduleIntegrationTestRunner({ expect(step1CompensateMockAutoRetriesFalse).toHaveBeenCalledTimes(0) expect(step2CompensateMockAutoRetriesFalse).toHaveBeenCalledTimes(0) - await setTimeout(2000) + await setTimeout(3000) await workflowOrcModule.run(workflowId, { input: {}, @@ -533,10 +533,7 @@ moduleIntegrationTestRunner({ await setTimeout(2000) - expect(step1InvokeMockAutoRetriesFalse).toHaveBeenCalledTimes(1) - expect(step2InvokeMockAutoRetriesFalse).toHaveBeenCalledTimes(2) - expect(step1CompensateMockAutoRetriesFalse).toHaveBeenCalledTimes(0) - expect(step2CompensateMockAutoRetriesFalse).toHaveBeenCalledTimes(0) + await setTimeout(3000) await workflowOrcModule.run(workflowId, { input: {}, diff --git a/packages/modules/workflow-engine-redis/package.json b/packages/modules/workflow-engine-redis/package.json index cf7c0c9b13..24d1e2e1a3 100644 --- a/packages/modules/workflow-engine-redis/package.json +++ b/packages/modules/workflow-engine-redis/package.json @@ -38,10 +38,6 @@ "devDependencies": { "@medusajs/framework": "2.10.3", "@medusajs/test-utils": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "^1.7.28", "@swc/jest": "^0.2.36", "jest": "^29.7.0", @@ -55,10 +51,6 @@ "ulid": "^2.3.0" }, "peerDependencies": { - "@medusajs/framework": "2.10.3", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1" + "@medusajs/framework": "2.10.3" } } diff --git a/packages/modules/workflow-engine-redis/src/loaders/redis.ts b/packages/modules/workflow-engine-redis/src/loaders/redis.ts index 9d9445bd3d..43a841b252 100644 --- a/packages/modules/workflow-engine-redis/src/loaders/redis.ts +++ b/packages/modules/workflow-engine-redis/src/loaders/redis.ts @@ -2,7 +2,7 @@ import { InternalModuleDeclaration, LoaderOptions, } from "@medusajs/framework/types" -import { asValue } from "awilix" +import { asValue } from "@medusajs/framework/awilix" import Redis from "ioredis" import { RedisWorkflowsOptions } from "../types" diff --git a/packages/modules/workflow-engine-redis/src/loaders/utils.ts b/packages/modules/workflow-engine-redis/src/loaders/utils.ts index 426ba66063..db75ecbacb 100644 --- a/packages/modules/workflow-engine-redis/src/loaders/utils.ts +++ b/packages/modules/workflow-engine-redis/src/loaders/utils.ts @@ -1,4 +1,4 @@ -import { asClass, asValue } from "awilix" +import { asClass, asValue } from "@medusajs/framework/awilix" import { RedisDistributedTransactionStorage } from "../utils" export default async ({ container, dataLoaderOnly }): Promise => { diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20231228143900.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20231228143900.ts index af9958e80a..77c20d0632 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20231228143900.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20231228143900.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20231221104256 extends Migration { async up(): Promise { diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20241206123341.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20241206123341.ts index 50c0680ae9..4d3886c265 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20241206123341.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20241206123341.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241206123341 extends Migration { async up(): Promise { diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20250120111059.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20250120111059.ts index 3c2d50b462..185ff20280 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20250120111059.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20250120111059.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250120111059 extends Migration { diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20250128174354.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20250128174354.ts index ff4f5a369a..6454a59292 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20250128174354.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20250128174354.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250128174354 extends Migration { override async up(): Promise { diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20250505101505.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20250505101505.ts index 9756181fdb..e1d2cfe49c 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20250505101505.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20250505101505.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" import { ulid } from "ulid" export class Migration20250505101505 extends Migration { @@ -19,7 +19,7 @@ export class Migration20250505101505 extends Migration { this.addSql( `CREATE UNIQUE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id_run_id_unique" ON "workflow_execution" (workflow_id, transaction_id, run_id) WHERE deleted_at IS NULL;` ) - /* + /* * We mistakenly named this migration differently in the workflow engines; this has caused issues with the migrations. Switching between engines will fail because the primary key is attempted to be set twice. * The issue happens in the following scenario: * 1. In memory engine is used @@ -29,9 +29,9 @@ export class Migration20250505101505 extends Migration { * 4. Migration is run * 5. Same primary key is attempted to be set again * 6. Migration fails - * + * * The same scenario can happen if you go from Redis to In memory. - * + * * With this fix, we ensure the primary key is only ever set once. */ this.addSql( diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110923.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110923.ts index 6ca8cace84..65792795e0 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110923.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110923.ts @@ -1,4 +1,4 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/framework/mikro-orm/migrations"; export class Migration20250819110923 extends Migration { diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110924.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110924.ts index 8b52039fa5..5cd85bce5e 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110924.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20250819110924.ts @@ -1,4 +1,4 @@ -import { Migration } from "@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20250819110924 extends Migration { override async up(): Promise { diff --git a/packages/modules/workflow-engine-redis/src/migrations/Migration20250908080326.ts b/packages/modules/workflow-engine-redis/src/migrations/Migration20250908080326.ts index b7a60acdfa..7628874db2 100644 --- a/packages/modules/workflow-engine-redis/src/migrations/Migration20250908080326.ts +++ b/packages/modules/workflow-engine-redis/src/migrations/Migration20250908080326.ts @@ -1,19 +1,33 @@ -import { Migration } from '@mikro-orm/migrations'; +import { Migration } from "@medusajs/deps/mikro-orm/migrations" export class Migration20250908080326 extends Migration { - override async up(): Promise { - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id" ON "workflow_execution" (workflow_id, transaction_id) WHERE deleted_at IS NULL;`); - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_state_updated_at" ON "workflow_execution" (state, updated_at) WHERE deleted_at IS NULL;`); - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_retention_time_updated_at_state" ON "workflow_execution" (retention_time, updated_at, state) WHERE deleted_at IS NULL AND retention_time IS NOT NULL;`); - this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_updated_at_retention_time" ON "workflow_execution" (updated_at, retention_time) WHERE deleted_at IS NULL AND retention_time IS NOT NULL AND state IN ('done', 'failed', 'reverted');`); + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_workflow_id_transaction_id" ON "workflow_execution" (workflow_id, transaction_id) WHERE deleted_at IS NULL;` + ) + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_state_updated_at" ON "workflow_execution" (state, updated_at) WHERE deleted_at IS NULL;` + ) + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_retention_time_updated_at_state" ON "workflow_execution" (retention_time, updated_at, state) WHERE deleted_at IS NULL AND retention_time IS NOT NULL;` + ) + this.addSql( + `CREATE INDEX IF NOT EXISTS "IDX_workflow_execution_updated_at_retention_time" ON "workflow_execution" (updated_at, retention_time) WHERE deleted_at IS NULL AND retention_time IS NOT NULL AND state IN ('done', 'failed', 'reverted');` + ) } override async down(): Promise { - this.addSql(`drop index if exists "IDX_workflow_execution_workflow_id_transaction_id";`); - this.addSql(`drop index if exists "IDX_workflow_execution_state_updated_at";`); - this.addSql(`drop index if exists "IDX_workflow_execution_retention_time_updated_at_state";`); - this.addSql(`drop index if exists "IDX_workflow_execution_updated_at_retention_time";`); + this.addSql( + `drop index if exists "IDX_workflow_execution_workflow_id_transaction_id";` + ) + this.addSql( + `drop index if exists "IDX_workflow_execution_state_updated_at";` + ) + this.addSql( + `drop index if exists "IDX_workflow_execution_retention_time_updated_at_state";` + ) + this.addSql( + `drop index if exists "IDX_workflow_execution_updated_at_retention_time";` + ) } - } diff --git a/packages/modules/workflow-engine-redis/src/services/workflows-module.ts b/packages/modules/workflow-engine-redis/src/services/workflows-module.ts index 0bb8456cfd..376b44c2cd 100644 --- a/packages/modules/workflow-engine-redis/src/services/workflows-module.ts +++ b/packages/modules/workflow-engine-redis/src/services/workflows-module.ts @@ -21,7 +21,7 @@ import type { ReturnWorkflow, UnwrapWorkflowInputDataType, } from "@medusajs/framework/workflows-sdk" -import { SqlEntityManager } from "@mikro-orm/postgresql" +import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql" import { WorkflowExecution } from "@models" import { WorkflowOrchestratorCancelOptions, diff --git a/packages/modules/workflow-engine-redis/src/utils/workflow-orchestrator-storage.ts b/packages/modules/workflow-engine-redis/src/utils/workflow-orchestrator-storage.ts index 27a1d541f7..d2ede1aecd 100644 --- a/packages/modules/workflow-engine-redis/src/utils/workflow-orchestrator-storage.ts +++ b/packages/modules/workflow-engine-redis/src/utils/workflow-orchestrator-storage.ts @@ -21,7 +21,7 @@ import { TransactionState, TransactionStepState, } from "@medusajs/framework/utils" -import { raw } from "@mikro-orm/core" +import { raw } from "@medusajs/framework/mikro-orm/core" import { WorkflowOrchestratorService } from "@services" import { Queue, RepeatOptions, Worker } from "bullmq" import Redis from "ioredis" diff --git a/packages/plugins/draft-order/package.json b/packages/plugins/draft-order/package.json index bd3f081994..d4fa3fc6e4 100644 --- a/packages/plugins/draft-order/package.json +++ b/packages/plugins/draft-order/package.json @@ -53,19 +53,12 @@ "@medusajs/types": "2.10.3", "@medusajs/ui": "4.0.21", "@medusajs/ui-preset": "2.10.3", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", "@swc/core": "1.5.7", "@types/lodash": "^4.17.15", "@types/node": "^20.0.0", "@types/react": "^18.3.2", "@types/react-dom": "^18.2.25", - "awilix": "^8.0.1", "lodash": "^4.17.21", - "pg": "^8.16.3", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "6.20.1", @@ -82,14 +75,7 @@ "@medusajs/icons": "2.10.3", "@medusajs/test-utils": "2.10.3", "@medusajs/ui": "4.0.21", - "@mikro-orm/cli": "6.5.4", - "@mikro-orm/core": "6.5.4", - "@mikro-orm/knex": "6.5.4", - "@mikro-orm/migrations": "6.5.4", - "@mikro-orm/postgresql": "6.5.4", - "awilix": "^8.0.1", "lodash": "^4.17.21", - "pg": "^8.16.3", "react-router-dom": "6.20.1" }, "engines": { diff --git a/www/apps/ui/package.json b/www/apps/ui/package.json index d80efc24fd..3d3214c3ed 100644 --- a/www/apps/ui/package.json +++ b/www/apps/ui/package.json @@ -17,7 +17,7 @@ "@mdx-js/loader": "^3.1.0", "@mdx-js/react": "^3.1.0", "@medusajs/icons": "2.10.3", - "@medusajs/ui": "4.0.23", + "@medusajs/ui": "4.0.21", "@medusajs/ui-preset": "2.10.3", "@next/mdx": "15.3.5", "@stefanprobst/rehype-extract-toc": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 887eac1454..ff45285eb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6086,7 +6086,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6096,7 +6095,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6105,10 +6103,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6167,10 +6161,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6179,10 +6169,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6214,7 +6200,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6224,10 +6209,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6236,10 +6217,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6247,17 +6224,13 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/cli@workspace:packages/cli/medusa-cli" dependencies: + "@medusajs/deps": 2.10.3 "@medusajs/telemetry": 2.10.3 "@medusajs/utils": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 "@types/express": ^4.17.17 "@types/yargs": ^15.0.15 - awilix: ^8.0.1 chalk: ^4.0.0 configstore: 5.0.1 dotenv: ^16.4.5 @@ -6272,7 +6245,6 @@ __metadata: jest: ^29.7.0 meant: ^1.0.3 ora: ^5.4.1 - pg: ^8.16.3 pg-god: ^1.0.12 prompts: ^2.4.2 resolve-cwd: ^3.0.0 @@ -6282,13 +6254,6 @@ __metadata: ulid: ^2.3.0 winston: ^3.8.2 yargs: ^15.3.1 - peerDependencies: - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 - pg: ^8.16.3 bin: medusa: cli.js languageName: unknown @@ -6299,24 +6264,17 @@ __metadata: resolution: "@medusajs/core-flows@workspace:packages/core/core-flows" dependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 - awilix: ^8.0.1 csv-parse: ^5.6.0 expect-type: ^0.20.0 jest: ^29.7.0 json-2-csv: ^5.5.4 - pg: ^8.16.3 rimraf: ^5.0.1 typescript: ^5.6.2 zod: 3.25.76 peerDependencies: "@medusajs/framework": 2.10.3 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6326,10 +6284,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6338,10 +6292,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6351,10 +6301,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6363,10 +6309,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6431,6 +6373,23 @@ __metadata: languageName: unknown linkType: soft +"@medusajs/deps@2.10.3, @medusajs/deps@workspace:packages/deps": + version: 0.0.0-use.local + resolution: "@medusajs/deps@workspace:packages/deps" + dependencies: + "@mikro-orm/cli": 6.5.4 + "@mikro-orm/core": 6.5.4 + "@mikro-orm/knex": 6.5.4 + "@mikro-orm/migrations": 6.5.4 + "@mikro-orm/postgresql": 6.5.4 + "@swc/core": ^1.7.28 + awilix: ^8.0.1 + pg: ^8.16.3 + rimraf: ^5.0.1 + typescript: ^5.6.2 + languageName: unknown + linkType: soft + "@medusajs/draft-order@2.10.3, @medusajs/draft-order@workspace:packages/plugins/draft-order": version: 0.0.0-use.local resolution: "@medusajs/draft-order@workspace:packages/plugins/draft-order" @@ -6446,11 +6405,6 @@ __metadata: "@medusajs/types": 2.10.3 "@medusajs/ui": 4.0.21 "@medusajs/ui-preset": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": 1.5.7 "@tanstack/react-query": 5.64.2 "@types/lodash": ^4.17.15 @@ -6458,11 +6412,9 @@ __metadata: "@types/react": ^18.3.2 "@types/react-dom": ^18.2.25 "@uiw/react-json-view": ^2.0.0-alpha.17 - awilix: ^8.0.1 date-fns: ^3.6.0 lodash: ^4.17.21 match-sorter: ^6.3.4 - pg: ^8.16.3 radix-ui: 1.1.2 react: ^18.2.0 react-dom: ^18.2.0 @@ -6480,14 +6432,7 @@ __metadata: "@medusajs/icons": 2.10.3 "@medusajs/test-utils": 2.10.3 "@medusajs/ui": 4.0.21 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 lodash: ^4.17.21 - pg: ^8.16.3 react-router-dom: 6.20.1 languageName: unknown linkType: soft @@ -6522,7 +6467,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6566,10 +6510,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6578,34 +6518,29 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - awilix: ^8.0.1 languageName: unknown linkType: soft -"@medusajs/framework@2.10.3, @medusajs/framework@workspace:^, @medusajs/framework@workspace:packages/core/framework": +"@medusajs/framework@2.10.3, @medusajs/framework@workspace:*, @medusajs/framework@workspace:packages/core/framework": version: 0.0.0-use.local resolution: "@medusajs/framework@workspace:packages/core/framework" dependencies: "@aws-sdk/client-dynamodb": ^3.218.0 "@jercle/yargonaut": ^1.1.5 "@medusajs/cli": 2.10.3 + "@medusajs/deps": 2.10.3 "@medusajs/modules-sdk": 2.10.3 "@medusajs/orchestration": 2.10.3 "@medusajs/telemetry": 2.10.3 "@medusajs/types": 2.10.3 "@medusajs/utils": 2.10.3 "@medusajs/workflows-sdk": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@opentelemetry/api": ^1.9.0 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 "@types/cors": ^2.8.17 "@types/express": ^4.17.17 "@types/jsonwebtoken": ^8.5.9 - awilix: ^8.0.1 chokidar: ^3.4.2 compression: 1.8.0 connect-dynamodb: ^3.0.5 @@ -6621,7 +6556,6 @@ __metadata: lodash: 4.17.21 morgan: ^1.9.1 path-to-regexp: ^0.1.10 - pg: ^8.16.3 rimraf: ^3.0.2 supertest: ^4.0.2 tsconfig-paths: ^4.2.0 @@ -6632,21 +6566,12 @@ __metadata: peerDependencies: "@aws-sdk/client-dynamodb": ^3.218.0 "@medusajs/cli": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 connect-dynamodb: ^3.0.5 ioredis: ^5.4.1 - pg: ^8.16.3 vite: ^5.4.14 peerDependenciesMeta: "@aws-sdk/client-dynamodb": optional: true - "@mikro-orm/cli": - optional: true connect-dynamodb: optional: true ioredis: @@ -6679,10 +6604,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6691,10 +6612,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6747,11 +6664,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6760,11 +6672,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6774,10 +6681,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6786,10 +6689,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6813,9 +6712,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 cross-env: ^5.2.1 @@ -6825,10 +6721,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6837,10 +6729,6 @@ __metadata: resolution: "@medusajs/locking-postgres@workspace:packages/modules/providers/locking-postgres" dependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6873,10 +6761,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -6885,10 +6769,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7010,16 +6890,11 @@ __metadata: zod: 3.25.76 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@opentelemetry/instrumentation-pg": ^0.52.0 "@opentelemetry/resources": ^2.0.0 "@opentelemetry/sdk-node": ^0.200.0 "@opentelemetry/sdk-trace-node": ^2.0.0 "@swc/core": 1.5.7 - awilix: ^8.0.1 posthog-node: ^4.17.1 react-dom: ^18.0.0 yalc: 1.0.0-pre.53 @@ -7047,29 +6922,18 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/modules-sdk@workspace:packages/core/modules-sdk" dependencies: + "@medusajs/deps": 2.10.3 "@medusajs/orchestration": 2.10.3 "@medusajs/types": 2.10.3 "@medusajs/utils": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 - awilix: ^8.0.1 cross-env: ^5.2.1 jest: ^29.7.0 - pg: ^8.16.3 rimraf: ^5.0.1 typescript: ^5.6.2 peerDependencies: - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 express: ^4.21.0 - pg: ^8.16.3 languageName: unknown linkType: soft @@ -7110,10 +6974,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7122,10 +6982,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7142,28 +6998,17 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/orchestration@workspace:packages/core/orchestration" dependencies: + "@medusajs/deps": 2.10.3 "@medusajs/types": 2.10.3 "@medusajs/utils": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 - awilix: ^8.0.1 jest: ^29.7.0 - pg: ^8.16.3 rimraf: ^5.0.1 typescript: ^5.6.2 ulid: ^2.3.0 peerDependencies: - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 express: ^4.21.0 - pg: ^8.16.3 languageName: unknown linkType: soft @@ -7173,10 +7018,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7185,10 +7026,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7205,7 +7042,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7215,10 +7051,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7227,10 +7059,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7240,10 +7068,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7252,10 +7076,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7265,10 +7085,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 faker: ^5.5.3 @@ -7278,10 +7094,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7291,10 +7103,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7303,10 +7111,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7316,10 +7120,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7328,10 +7128,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7341,10 +7137,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7353,10 +7145,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7366,10 +7154,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7378,10 +7162,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7391,10 +7171,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7403,10 +7179,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7416,10 +7188,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7428,10 +7196,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7441,10 +7205,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7453,10 +7213,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7487,17 +7243,11 @@ __metadata: resolution: "@medusajs/test-utils@workspace:packages/medusa-test-utils" dependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@types/express": ^4.17.17 - awilix: ^8.0.1 axios: ^0.21.4 express: ^4.21.0 get-port: ^5.1.0 jest: ^29.7.0 - pg: ^8.16.3 pg-god: ^1.0.12 randomatic: ^3.1.1 rimraf: ^3.0.2 @@ -7505,8 +7255,6 @@ __metadata: peerDependencies: "@medusajs/framework": 2.10.3 "@medusajs/medusa": 2.10.3 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 peerDependenciesMeta: "@medusajs/medusa": optional: true @@ -7543,8 +7291,8 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/types@workspace:packages/core/types" dependencies: + "@medusajs/deps": 2.10.3 "@types/jsonwebtoken": ^8.5.9 - awilix: ^8.0.1 bignumber.js: ^9.1.2 expect-type: ^0.20.0 ioredis: ^5.4.1 @@ -7552,7 +7300,6 @@ __metadata: typescript: ^5.6.2 vite: ^5.4.14 peerDependencies: - awilix: ^8.0.1 ioredis: ^5.4.1 vite: ^5 || ^6 peerDependenciesMeta: @@ -7673,10 +7420,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 jest: ^29.7.0 @@ -7686,10 +7429,6 @@ __metadata: typescript: ^5.6.2 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7701,16 +7440,12 @@ __metadata: "@graphql-codegen/typescript": ^4.0.9 "@graphql-tools/merge": ^9.0.7 "@graphql-tools/schema": ^10.0.6 + "@medusajs/deps": 2.10.3 "@medusajs/types": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 "@types/express": ^4.17.21 "@types/pluralize": ^0.0.33 - awilix: ^8.0.1 bignumber.js: ^9.1.2 dotenv: ^16.4.5 dotenv-expand: ^11.0.6 @@ -7719,7 +7454,6 @@ __metadata: graphql: ^16.9.0 jest: ^29.7.0 jsonwebtoken: ^9.0.2 - pg: ^8.16.3 pg-connection-string: ^2.7.0 pg-god: ^1.0.12 pluralize: ^8.0.0 @@ -7728,13 +7462,7 @@ __metadata: ulid: ^2.3.0 zod: 3.25.76 peerDependencies: - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 express: ^4.21.0 - pg: ^8.16.3 languageName: unknown linkType: soft @@ -7744,10 +7472,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 cron-parser: ^4.9.0 @@ -7758,10 +7482,6 @@ __metadata: ulid: ^2.3.0 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7771,10 +7491,6 @@ __metadata: dependencies: "@medusajs/framework": 2.10.3 "@medusajs/test-utils": 2.10.3 - "@mikro-orm/cli": 6.5.4 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 bullmq: 5.13.0 @@ -7786,10 +7502,6 @@ __metadata: ulid: ^2.3.0 peerDependencies: "@medusajs/framework": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 languageName: unknown linkType: soft @@ -7797,32 +7509,21 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/workflows-sdk@workspace:packages/core/workflows-sdk" dependencies: + "@medusajs/deps": 2.10.3 "@medusajs/modules-sdk": 2.10.3 "@medusajs/orchestration": 2.10.3 "@medusajs/types": 2.10.3 "@medusajs/utils": 2.10.3 - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 "@swc/core": ^1.7.28 "@swc/jest": ^0.2.36 - awilix: ^8.0.1 expect-type: ^0.20.0 jest: ^29.7.0 - pg: ^8.16.3 rimraf: ^5.0.1 typescript: ^5.6.2 ulid: ^2.3.0 zod: 3.25.76 peerDependencies: - "@mikro-orm/core": 6.5.4 - "@mikro-orm/knex": 6.5.4 - "@mikro-orm/migrations": 6.5.4 - "@mikro-orm/postgresql": 6.5.4 - awilix: ^8.0.1 express: ^4.21.0 - pg: ^8.16.3 languageName: unknown linkType: soft @@ -16078,17 +15779,6 @@ __metadata: languageName: node linkType: hard -"@types/pg@npm:^8.6.6": - version: 8.11.10 - resolution: "@types/pg@npm:8.11.10" - dependencies: - "@types/node": "*" - pg-protocol: "*" - pg-types: ^4.0.1 - checksum: c8800d0ab2c6424308e6c6b40c73f19583ee1aed758462bd07694844b0a551b5841442205a4ee05207b80109ba502f33f20241b1bd9b4902e713611fb9e08f6c - languageName: node - linkType: hard - "@types/pluralize@npm:^0.0.33": version: 0.0.33 resolution: "@types/pluralize@npm:0.0.33" @@ -19501,6 +19191,7 @@ __metadata: version: 0.0.0-use.local resolution: "create-medusa-app@workspace:packages/cli/create-medusa-app" dependencies: + "@medusajs/deps": 2.10.3 "@medusajs/telemetry": 2.10.3 "@types/chalk": ^2.2.0 "@types/commander": ^2.12.2 @@ -19508,7 +19199,6 @@ __metadata: "@types/inquirer": ^9.0.3 "@types/node": ^20.12.11 "@types/node-emoji": ^1.8.2 - "@types/pg": ^8.6.6 "@types/uuid": ^9.0.1 "@types/validator": ^13.7.17 "@types/wait-on": ^5.3.1 @@ -19528,7 +19218,6 @@ __metadata: node-fetch: ^3.3.1 open: ^9.1.0 ora: ^6.3.0 - pg: ^8.16.3 prettier: ^2.8.8 slugify: ^1.6.6 ts-node: ^10.9.1 @@ -24343,6 +24032,7 @@ __metadata: "@medusajs/core-flows": "workspace:*" "@medusajs/customer": "workspace:^" "@medusajs/event-bus-local": "workspace:*" + "@medusajs/framework": "workspace:*" "@medusajs/fulfillment": "workspace:^" "@medusajs/fulfillment-manual": "workspace:^" "@medusajs/inventory": "workspace:^" @@ -24382,7 +24072,7 @@ __metadata: "@medusajs/currency": "workspace:^" "@medusajs/customer": "workspace:^" "@medusajs/event-bus-local": "workspace:*" - "@medusajs/framework": "workspace:^" + "@medusajs/framework": "workspace:*" "@medusajs/fulfillment": "workspace:^" "@medusajs/fulfillment-manual": "workspace:^" "@medusajs/inventory": "workspace:^"