From 58d4c230e2319af68c6c23da6d9cd715e9505b0d Mon Sep 17 00:00:00 2001 From: Adrien de Peretti Date: Mon, 31 Jul 2023 09:23:27 +0200 Subject: [PATCH] chore: include rimraf as part of the build for most of the packages (#4615) * chore: include rimraf as part of the build for most of the packages * cleanup * revert medusa interface * missing script update --- packages/cache-inmemory/package.json | 3 ++- packages/cache-redis/package.json | 3 ++- packages/event-bus-local/package.json | 3 ++- packages/event-bus-redis/package.json | 3 ++- packages/inventory/package.json | 3 ++- packages/medusa-cli/package.json | 3 ++- packages/medusa-core-utils/package.json | 3 ++- packages/medusa-file-local/package.json | 3 ++- packages/medusa-file-minio/package.json | 3 ++- packages/medusa-file-s3/package.json | 3 ++- packages/medusa-interfaces/.babelrc | 2 +- packages/medusa-interfaces/package.json | 3 ++- packages/medusa-payment-paypal/package.json | 3 ++- packages/medusa-payment-stripe/package.json | 3 ++- packages/medusa-plugin-algolia/package.json | 3 ++- packages/medusa-plugin-mailchimp/package.json | 3 ++- .../medusa-plugin-meilisearch/package.json | 3 ++- packages/medusa/package.json | 3 ++- packages/modules-sdk/package.json | 3 ++- packages/orchestration/package.json | 3 ++- packages/stock-location/package.json | 3 ++- packages/types/package.json | 3 ++- yarn.lock | 21 +++++++++++++++++++ 23 files changed, 64 insertions(+), 22 deletions(-) diff --git a/packages/cache-inmemory/package.json b/packages/cache-inmemory/package.json index 5fbb2f5b20..8ac5a56863 100644 --- a/packages/cache-inmemory/package.json +++ b/packages/cache-inmemory/package.json @@ -20,13 +20,14 @@ "@medusajs/types": "^1.8.8", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, "scripts": { "watch": "tsc --build --watch", "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" }, "dependencies": { diff --git a/packages/cache-redis/package.json b/packages/cache-redis/package.json index 170773c457..407227e43b 100644 --- a/packages/cache-redis/package.json +++ b/packages/cache-redis/package.json @@ -20,13 +20,14 @@ "@medusajs/types": "^1.8.8", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, "scripts": { "watch": "tsc --build --watch", "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" }, "dependencies": { diff --git a/packages/event-bus-local/package.json b/packages/event-bus-local/package.json index edece48ca1..2cc345417d 100644 --- a/packages/event-bus-local/package.json +++ b/packages/event-bus-local/package.json @@ -20,13 +20,14 @@ "@medusajs/types": "^1.8.10", "cross-env": "^5.2.1", "jest": "^25.5.2", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, "scripts": { "watch": "tsc --build --watch", "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" }, "dependencies": { diff --git a/packages/event-bus-redis/package.json b/packages/event-bus-redis/package.json index 8e59d4bab6..fb7f7177fc 100644 --- a/packages/event-bus-redis/package.json +++ b/packages/event-bus-redis/package.json @@ -21,13 +21,14 @@ "cross-env": "^5.2.1", "jest": "^25.5.2", "medusa-test-utils": "^1.1.40", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, "scripts": { "watch": "tsc --build --watch", "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" }, "dependencies": { diff --git a/packages/inventory/package.json b/packages/inventory/package.json index d7259987b3..45477c4978 100644 --- a/packages/inventory/package.json +++ b/packages/inventory/package.json @@ -20,6 +20,7 @@ "@medusajs/types": "^1.8.11", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, @@ -32,7 +33,7 @@ "scripts": { "watch": "tsc --build --watch", "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" } } diff --git a/packages/medusa-cli/package.json b/packages/medusa-cli/package.json index 4bdd1cad05..4647c5aea6 100644 --- a/packages/medusa-cli/package.json +++ b/packages/medusa-cli/package.json @@ -20,7 +20,7 @@ ], "scripts": { "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch", "prepare": "cross-env NODE_ENV=production yarn run build" }, @@ -30,6 +30,7 @@ "@types/yargs": "^15.0.15", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.9.5" }, diff --git a/packages/medusa-core-utils/package.json b/packages/medusa-core-utils/package.json index c7069c9e69..1e706dc391 100644 --- a/packages/medusa-core-utils/package.json +++ b/packages/medusa-core-utils/package.json @@ -10,7 +10,7 @@ }, "scripts": { "test": "jest", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "prepare": "cross-env NODE_ENV=production yarn run build", "watch": "tsc --watch" }, @@ -22,6 +22,7 @@ "devDependencies": { "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, diff --git a/packages/medusa-file-local/package.json b/packages/medusa-file-local/package.json index dcd7f0b07b..ae90fe3e9a 100644 --- a/packages/medusa-file-local/package.json +++ b/packages/medusa-file-local/package.json @@ -17,12 +17,13 @@ "@medusajs/medusa": "^1.12.0", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "typescript": "^4.9.5" }, "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "peerDependencies": { diff --git a/packages/medusa-file-minio/package.json b/packages/medusa-file-minio/package.json index 15297b257e..328e191b7c 100644 --- a/packages/medusa-file-minio/package.json +++ b/packages/medusa-file-minio/package.json @@ -17,12 +17,13 @@ "@medusajs/medusa": "^1.12.3", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "typescript": "^4.9.5" }, "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "peerDependencies": { diff --git a/packages/medusa-file-s3/package.json b/packages/medusa-file-s3/package.json index d88a72214f..368a946a77 100644 --- a/packages/medusa-file-s3/package.json +++ b/packages/medusa-file-s3/package.json @@ -18,12 +18,13 @@ "cross-env": "^5.2.1", "jest": "^25.5.4", "medusa-test-utils": "^1.1.40", + "rimraf": "^5.0.1", "typescript": "^4.9.5" }, "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "peerDependencies": { diff --git a/packages/medusa-interfaces/.babelrc b/packages/medusa-interfaces/.babelrc index 3d2c30081f..41dc577de6 100644 --- a/packages/medusa-interfaces/.babelrc +++ b/packages/medusa-interfaces/.babelrc @@ -10,4 +10,4 @@ "plugins": ["@babel/plugin-transform-runtime"] } } -} +} \ No newline at end of file diff --git a/packages/medusa-interfaces/package.json b/packages/medusa-interfaces/package.json index abd8fe277a..f5ee5135aa 100644 --- a/packages/medusa-interfaces/package.json +++ b/packages/medusa-interfaces/package.json @@ -11,7 +11,7 @@ "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "babel src --out-dir dist --ignore '**/__tests__','**/__mocks__'", + "build": "rimraf dist && babel src --out-dir dist --ignore '**/__tests__','**/__mocks__'", "watch": "babel -w src --out-dir dist --ignore '**/__tests__','**/__mocks__'" }, "files": [ @@ -33,6 +33,7 @@ "jest": "^25.5.4", "medusa-core-utils": "^1.2.0", "medusa-test-utils": "^1.1.40", + "rimraf": "^5.0.1", "typescript": "^4.4.4" }, "gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e" diff --git a/packages/medusa-payment-paypal/package.json b/packages/medusa-payment-paypal/package.json index 17fe362504..5f2ddd4503 100644 --- a/packages/medusa-payment-paypal/package.json +++ b/packages/medusa-payment-paypal/package.json @@ -16,7 +16,7 @@ "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "devDependencies": { @@ -25,6 +25,7 @@ "@types/stripe": "^8.0.417", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "typescript": "^4.4.4" }, "peerDependencies": { diff --git a/packages/medusa-payment-stripe/package.json b/packages/medusa-payment-stripe/package.json index d981f273ea..dcd1cd458f 100644 --- a/packages/medusa-payment-stripe/package.json +++ b/packages/medusa-payment-stripe/package.json @@ -16,7 +16,7 @@ "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "devDependencies": { @@ -25,6 +25,7 @@ "awilix": "^8.0.1", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "typescript": "^4.9.5" }, "peerDependencies": { diff --git a/packages/medusa-plugin-algolia/package.json b/packages/medusa-plugin-algolia/package.json index fefa2fe4c5..726d025a9e 100644 --- a/packages/medusa-plugin-algolia/package.json +++ b/packages/medusa-plugin-algolia/package.json @@ -15,7 +15,7 @@ "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "dependencies": { @@ -28,6 +28,7 @@ "client-sessions": "^0.8.0", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "typescript": "^4.4.4" }, "gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e", diff --git a/packages/medusa-plugin-mailchimp/package.json b/packages/medusa-plugin-mailchimp/package.json index 20057c3a4b..4cbc831348 100644 --- a/packages/medusa-plugin-mailchimp/package.json +++ b/packages/medusa-plugin-mailchimp/package.json @@ -16,12 +16,13 @@ "client-sessions": "^0.8.0", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "typescript": "^4.4.4" }, "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "peerDependencies": { diff --git a/packages/medusa-plugin-meilisearch/package.json b/packages/medusa-plugin-meilisearch/package.json index 68cea20ff7..c3dc93aa5c 100644 --- a/packages/medusa-plugin-meilisearch/package.json +++ b/packages/medusa-plugin-meilisearch/package.json @@ -15,7 +15,7 @@ "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", "test": "jest --passWithNoTests src", - "build": "tsc", + "build": "rimraf dist && tsc", "watch": "tsc --watch" }, "dependencies": { @@ -33,6 +33,7 @@ "@medusajs/types": "^1.10.0", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "typescript": "^4.9.5" }, "gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e", diff --git a/packages/medusa/package.json b/packages/medusa/package.json index c4e528d351..478399f96f 100644 --- a/packages/medusa/package.json +++ b/packages/medusa/package.json @@ -29,6 +29,7 @@ "cross-env": "^5.2.1", "jest": "^25.5.4", "medusa-interfaces": "^1.3.7", + "rimraf": "^5.0.1", "supertest": "^4.0.2", "ts-jest": "^25.5.1", "typeorm": "^0.3.16", @@ -37,7 +38,7 @@ "scripts": { "watch": "tsc --build --watch", "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "serve": "node dist/app.js", "test": "jest" }, diff --git a/packages/modules-sdk/package.json b/packages/modules-sdk/package.json index 6a188527a9..7077f4643d 100644 --- a/packages/modules-sdk/package.json +++ b/packages/modules-sdk/package.json @@ -19,6 +19,7 @@ "devDependencies": { "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, @@ -31,7 +32,7 @@ }, "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "test": "jest", "watch": "tsc --build --watch" } diff --git a/packages/orchestration/package.json b/packages/orchestration/package.json index 180e4c36c5..7082765e53 100644 --- a/packages/orchestration/package.json +++ b/packages/orchestration/package.json @@ -20,6 +20,7 @@ "@medusajs/types": "^1.9.0", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, @@ -29,7 +30,7 @@ }, "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "watch": "tsc --build --watch", "test": "jest" } diff --git a/packages/stock-location/package.json b/packages/stock-location/package.json index 18b4c180d3..997e6a7c5c 100644 --- a/packages/stock-location/package.json +++ b/packages/stock-location/package.json @@ -20,6 +20,7 @@ "@medusajs/types": "^1.8.8", "cross-env": "^5.2.1", "jest": "^25.5.4", + "rimraf": "^5.0.1", "ts-jest": "^25.5.1", "typescript": "^4.4.4" }, @@ -32,7 +33,7 @@ "scripts": { "watch": "tsc --build --watch", "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" } } diff --git a/packages/types/package.json b/packages/types/package.json index 01da2b85de..7a1a07cc6c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -21,13 +21,14 @@ "awilix": "^8.0.0", "cross-env": "^5.2.1", "ioredis": "^5.2.5", + "rimraf": "^5.0.1", "typeorm": "^0.3.16", "typescript": "^4.4.4", "winston": "^3.8.2" }, "scripts": { "prepare": "cross-env NODE_ENV=production yarn run build", - "build": "tsc --build", + "build": "rimraf dist && tsc --build", "watch": "tsc --build --watch", "test": "exit 0" } diff --git a/yarn.lock b/yarn.lock index 68ed8837a0..74766a33d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6152,6 +6152,7 @@ __metadata: "@medusajs/types": ^1.8.8 cross-env: ^5.2.1 jest: ^25.5.4 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typescript: ^4.4.4 languageName: unknown @@ -6167,6 +6168,7 @@ __metadata: cross-env: ^5.2.1 ioredis: ^5.3.1 jest: ^25.5.4 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typescript: ^4.4.4 languageName: unknown @@ -6195,6 +6197,7 @@ __metadata: "@medusajs/utils": ^1.9.2 cross-env: ^5.2.1 jest: ^25.5.2 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typescript: ^4.4.4 ulid: ^2.3.0 @@ -6214,6 +6217,7 @@ __metadata: ioredis: ^5.2.5 jest: ^25.5.2 medusa-test-utils: ^1.1.40 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typescript: ^4.4.4 languageName: unknown @@ -6226,6 +6230,7 @@ __metadata: "@medusajs/medusa": ^1.12.0 cross-env: ^5.2.1 jest: ^25.5.4 + rimraf: ^5.0.1 typescript: ^4.9.5 peerDependencies: medusa-interfaces: ^1.3.7 @@ -6242,6 +6247,7 @@ __metadata: awilix: ^8.0.0 cross-env: ^5.2.1 jest: ^25.5.4 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typeorm: ^0.3.16 typescript: ^4.4.4 @@ -6277,6 +6283,7 @@ __metadata: prompts: ^2.4.2 regenerator-runtime: ^0.13.11 resolve-cwd: ^3.0.0 + rimraf: ^5.0.1 semver: ^7.3.8 stack-trace: ^0.0.10 ts-jest: ^25.5.1 @@ -6395,6 +6402,7 @@ __metadata: reflect-metadata: ^0.1.13 regenerator-runtime: ^0.13.11 request-ip: ^2.1.3 + rimraf: ^5.0.1 scrypt-kdf: ^2.0.1 supertest: ^4.0.2 ts-jest: ^25.5.1 @@ -6422,6 +6430,7 @@ __metadata: cross-env: ^5.2.1 jest: ^25.5.4 resolve-cwd: ^3.0.0 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typescript: ^4.4.4 languageName: unknown @@ -6482,6 +6491,7 @@ __metadata: cross-env: ^5.2.1 graphql: ^16.6.0 jest: ^25.5.4 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typescript: ^4.4.4 languageName: unknown @@ -6528,6 +6538,7 @@ __metadata: awilix: ^8.0.0 cross-env: ^5.2.1 jest: ^25.5.4 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typeorm: ^0.3.16 typescript: ^4.4.4 @@ -6541,6 +6552,7 @@ __metadata: awilix: ^8.0.0 cross-env: ^5.2.1 ioredis: ^5.2.5 + rimraf: ^5.0.1 typeorm: ^0.3.16 typescript: ^4.4.4 winston: ^3.8.2 @@ -30399,6 +30411,7 @@ __metadata: dependencies: cross-env: ^5.2.1 jest: ^25.5.4 + rimraf: ^5.0.1 ts-jest: ^25.5.1 typescript: ^4.4.4 languageName: unknown @@ -30442,6 +30455,7 @@ __metadata: jest: ^25.5.4 medusa-core-utils: ^1.2.0 medusa-test-utils: ^1.1.40 + rimraf: ^5.0.1 typescript: ^4.9.5 peerDependencies: "@medusajs/medusa": ^1.12.0 @@ -30460,6 +30474,7 @@ __metadata: jest: ^25.5.4 medusa-core-utils: ^1.2.0 medusa-test-utils: ^1.1.40 + rimraf: ^5.0.1 typescript: ^4.9.5 peerDependencies: "@medusajs/medusa": ^1.12.0 @@ -30564,6 +30579,7 @@ __metadata: jest: ^25.5.4 medusa-core-utils: ^1.2.0 medusa-test-utils: ^1.1.40 + rimraf: ^5.0.1 typescript: ^4.4.4 languageName: unknown linkType: soft @@ -30667,6 +30683,7 @@ __metadata: express: ^4.17.1 jest: ^25.5.4 medusa-core-utils: ^1.2.0 + rimraf: ^5.0.1 typescript: ^4.4.4 peerDependencies: "@medusajs/medusa": ^1.12.0 @@ -30685,6 +30702,7 @@ __metadata: express: ^4.17.1 jest: ^25.5.4 medusa-core-utils: ^1.2.0 + rimraf: ^5.0.1 stripe: ^11.10.0 typescript: ^4.9.5 peerDependencies: @@ -30703,6 +30721,7 @@ __metadata: client-sessions: ^0.8.0 cross-env: ^5.2.1 jest: ^25.5.4 + rimraf: ^5.0.1 typescript: ^4.4.4 languageName: unknown linkType: soft @@ -30862,6 +30881,7 @@ __metadata: mailchimp-api-v3: ^1.14.0 medusa-core-utils: ^1.2.0 medusa-test-utils: ^1.1.40 + rimraf: ^5.0.1 typescript: ^4.4.4 peerDependencies: "@medusajs/medusa": ^1.12.0 @@ -30881,6 +30901,7 @@ __metadata: jest: ^25.5.4 lodash: ^4.17.21 meilisearch: ^0.32.3 + rimraf: ^5.0.1 typescript: ^4.9.5 peerDependencies: "@medusajs/medusa": ^1.12.0