From 0546e1b37df7bdea4e2a2e1dcb925e6356b5ff43 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Mon, 11 Dec 2023 16:03:19 +0100 Subject: [PATCH 1/9] chore: test gh actions --- .github/workflows/action.yml | 25 ++++++++++++------------- .github/workflows/codegen-test.yml | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index ba8afeb43725c..7c49f521ca43b 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -14,10 +14,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js environment + - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Assert changed @@ -45,10 +45,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js environment + - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Assert changed @@ -106,10 +106,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js environment + - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies @@ -167,10 +167,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js environment + - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies @@ -187,7 +187,6 @@ jobs: DB_PASSWORD: postgres DB_USERNAME: postgres - integration-tests-plugins: needs: setup runs-on: ubuntu-latest @@ -220,10 +219,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js environment + - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies @@ -273,10 +272,10 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js environment + - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/codegen-test.yml b/.github/workflows/codegen-test.yml index 9f0a5913173c1..35a0b2f624488 100644 --- a/.github/workflows/codegen-test.yml +++ b/.github/workflows/codegen-test.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies From 2d5a5d5ec07296490ac3f5307501d1e75b9c07a1 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Mon, 11 Dec 2023 16:06:18 +0100 Subject: [PATCH 2/9] chore: move all to node 20 --- .github/workflows/docs-freshness-check.yml | 2 +- .github/workflows/docs-new-announcement.yml | 2 +- .../workflows/docs-remove-announcement.yml | 2 +- .github/workflows/docs-test.yml | 22 +++++++++---------- .github/workflows/generate-references.yml | 10 ++++----- .github/workflows/oas-test.yml | 2 +- .github/workflows/release-notifications.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/snapshot-this.yml | 2 +- .github/workflows/staging-release.yml | 11 +++++----- 10 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/docs-freshness-check.yml b/.github/workflows/docs-freshness-check.yml index 45e88dbb60357..4009ba20c05fe 100644 --- a/.github/workflows/docs-freshness-check.yml +++ b/.github/workflows/docs-freshness-check.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/docs-new-announcement.yml b/.github/workflows/docs-new-announcement.yml index 457feaf4553fa..e5999a2ad9c8d 100644 --- a/.github/workflows/docs-new-announcement.yml +++ b/.github/workflows/docs-new-announcement.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/docs-remove-announcement.yml b/.github/workflows/docs-remove-announcement.yml index 06bf788c9cbb5..a6fff3de4f1d8 100644 --- a/.github/workflows/docs-remove-announcement.yml +++ b/.github/workflows/docs-remove-announcement.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/docs-test.yml b/.github/workflows/docs-test.yml index 8d4678d06a4c7..d4f244c7ab2f5 100644 --- a/.github/workflows/docs-test.yml +++ b/.github/workflows/docs-test.yml @@ -1,5 +1,5 @@ name: Documentation Tests -on: +on: pull_request: paths: - www/** @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "18" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies @@ -40,7 +40,7 @@ jobs: NODE_OPTIONS: "--max-old-space-size=8192" API_URL: "https://docs.medusajs.com" run: yarn build:docs - + vale-docs: if: ${{ startsWith(github.head_ref, 'docs/') }} runs-on: ubuntu-latest @@ -65,13 +65,13 @@ jobs: with: files: ${{ steps.directories.outputs.LIST }} fail_on_error: true - vale_flags: '--minAlertLevel=error' + vale_flags: "--minAlertLevel=error" reporter: github-pr-check token: ${{ github.token }} filter_mode: nofilter env: REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }} - + vale-ui: if: ${{ startsWith(github.head_ref, 'docs/') }} runs-on: ubuntu-latest @@ -96,13 +96,13 @@ jobs: with: files: ${{ steps.directories.outputs.LIST }} fail_on_error: true - vale_flags: '--minAlertLevel=error' + vale_flags: "--minAlertLevel=error" reporter: github-pr-check token: ${{ github.token }} filter_mode: nofilter env: REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }} - + vale-api: if: ${{ startsWith(github.head_ref, 'docs/') }} runs-on: ubuntu-latest @@ -127,13 +127,13 @@ jobs: with: files: ${{ steps.directories.outputs.LIST }} fail_on_error: true - vale_flags: '--minAlertLevel=error' + vale_flags: "--minAlertLevel=error" reporter: github-pr-check token: ${{ github.token }} filter_mode: nofilter env: REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }} - + content-eslint: if: ${{ startsWith(github.head_ref, 'docs/') }} runs-on: ubuntu-latest @@ -155,7 +155,7 @@ jobs: - name: Run Eslint working-directory: www run: yarn lint:content - + code-docs-eslint: if: ${{ startsWith(github.head_ref, 'docs/') }} runs-on: ubuntu-latest @@ -179,4 +179,4 @@ jobs: - name: Run Eslint working-directory: www - run: yarn lint \ No newline at end of file + run: yarn lint diff --git a/.github/workflows/generate-references.yml b/.github/workflows/generate-references.yml index cdeb216bb225c..95ce38c5656d8 100644 --- a/.github/workflows/generate-references.yml +++ b/.github/workflows/generate-references.yml @@ -3,9 +3,9 @@ on: workflow_dispatch: inputs: referenceName: - description: 'Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or a name of a config file in `docs-util/packages/typedoc-config` such as `product`' + description: "Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or a name of a config file in `docs-util/packages/typedoc-config` such as `product`" required: false - default: 'all' + default: "all" release: types: [published] @@ -26,7 +26,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies @@ -93,7 +93,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies @@ -116,4 +116,4 @@ jobs: labels: "type: chore" add-paths: www/apps/api-reference/specs branch: "docs/generate-api-ref" - branch-suffix: "timestamp" \ No newline at end of file + branch-suffix: "timestamp" diff --git a/.github/workflows/oas-test.yml b/.github/workflows/oas-test.yml index f5f253bbf3fd8..03ff690c1d5b7 100644 --- a/.github/workflows/oas-test.yml +++ b/.github/workflows/oas-test.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/release-notifications.yml b/.github/workflows/release-notifications.yml index 1551a3c4c0f79..02d5f4d678936 100644 --- a/.github/workflows/release-notifications.yml +++ b/.github/workflows/release-notifications.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "16.10.0" + node-version: "20.10.0" cache: "yarn" - name: Post to Slack channel diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75df0f9354fb2..16eda80877027 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,10 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - - name: Setup Node.js 16 + - name: Setup Node.js 20 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: "20.10.0" - name: Creating .npmrc run: | diff --git a/.github/workflows/snapshot-this.yml b/.github/workflows/snapshot-this.yml index 6cc1eef8a2dcd..859990fa501a4 100644 --- a/.github/workflows/snapshot-this.yml +++ b/.github/workflows/snapshot-this.yml @@ -79,7 +79,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: "20.10.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index ac12564996a31..80cc1f03e05a3 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -9,7 +9,6 @@ on: - "docs/**" - "www/**" - ".github/**" - concurrency: ${{ github.workflow }}-${{ github.ref }} @@ -21,10 +20,10 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - - name: Setup Node.js 16.x + - name: Setup Node.js 20 uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: "20.10.0" - name: Creating .npmrc run: | @@ -33,8 +32,8 @@ jobs: EOF env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Configure npm node prepend + + - name: Configure npm node prepend run: npm config set scripts-prepend-node-path auto - name: Install Dependencies @@ -50,6 +49,6 @@ jobs: - name: Install Dependencies run: yarn install --no-immutable - + - name: Publish packages under next tag run: yarn release:next From 314efe0ce022d87dc6579fb7b249adacb2a6a5a9 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Mon, 11 Dec 2023 16:51:51 +0100 Subject: [PATCH 3/9] test node 21 --- .github/workflows/action.yml | 12 ++++++------ .github/workflows/codegen-test.yml | 2 +- .github/workflows/docs-freshness-check.yml | 2 +- .github/workflows/docs-new-announcement.yml | 2 +- .github/workflows/docs-remove-announcement.yml | 2 +- .github/workflows/docs-test.yml | 2 +- .github/workflows/generate-references.yml | 4 ++-- .github/workflows/oas-test.yml | 2 +- .github/workflows/release-notifications.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/snapshot-this.yml | 2 +- .github/workflows/staging-release.yml | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 7c49f521ca43b..3b514137fcece 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Assert changed @@ -48,7 +48,7 @@ jobs: - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Assert changed @@ -109,7 +109,7 @@ jobs: - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies @@ -170,7 +170,7 @@ jobs: - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies @@ -222,7 +222,7 @@ jobs: - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies @@ -275,7 +275,7 @@ jobs: - name: Setup Node.js 20 environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/codegen-test.yml b/.github/workflows/codegen-test.yml index 35a0b2f624488..8524094d4e8e5 100644 --- a/.github/workflows/codegen-test.yml +++ b/.github/workflows/codegen-test.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/docs-freshness-check.yml b/.github/workflows/docs-freshness-check.yml index 4009ba20c05fe..bbdcab472828e 100644 --- a/.github/workflows/docs-freshness-check.yml +++ b/.github/workflows/docs-freshness-check.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/docs-new-announcement.yml b/.github/workflows/docs-new-announcement.yml index e5999a2ad9c8d..e6237c862b1db 100644 --- a/.github/workflows/docs-new-announcement.yml +++ b/.github/workflows/docs-new-announcement.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/docs-remove-announcement.yml b/.github/workflows/docs-remove-announcement.yml index a6fff3de4f1d8..22eef560f9a51 100644 --- a/.github/workflows/docs-remove-announcement.yml +++ b/.github/workflows/docs-remove-announcement.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/docs-test.yml b/.github/workflows/docs-test.yml index d4f244c7ab2f5..e5536c0c7dd22 100644 --- a/.github/workflows/docs-test.yml +++ b/.github/workflows/docs-test.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/generate-references.yml b/.github/workflows/generate-references.yml index 95ce38c5656d8..8321cfe4d8900 100644 --- a/.github/workflows/generate-references.yml +++ b/.github/workflows/generate-references.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies @@ -93,7 +93,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/oas-test.yml b/.github/workflows/oas-test.yml index 03ff690c1d5b7..3f99446e3d45c 100644 --- a/.github/workflows/oas-test.yml +++ b/.github/workflows/oas-test.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/release-notifications.yml b/.github/workflows/release-notifications.yml index 02d5f4d678936..1a0f8969028f7 100644 --- a/.github/workflows/release-notifications.yml +++ b/.github/workflows/release-notifications.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Post to Slack channel diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16eda80877027..7adfa3a2cee61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Node.js 20 uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" - name: Creating .npmrc run: | diff --git a/.github/workflows/snapshot-this.yml b/.github/workflows/snapshot-this.yml index 859990fa501a4..3a4ec1d9ce64c 100644 --- a/.github/workflows/snapshot-this.yml +++ b/.github/workflows/snapshot-this.yml @@ -79,7 +79,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" cache: "yarn" - name: Install dependencies diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index 80cc1f03e05a3..da03aaf269b3a 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node.js 20 uses: actions/setup-node@v3 with: - node-version: "20.10.0" + node-version: "21.1.0" - name: Creating .npmrc run: | From 1665fadb283bd80228c893c374a4980437338322 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Mon, 11 Dec 2023 17:07:27 +0100 Subject: [PATCH 4/9] chore: force run --- integration-tests/plugins/package.json | 2 +- package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration-tests/plugins/package.json b/integration-tests/plugins/package.json index 35a2ab67ecce5..874e9b67058a4 100644 --- a/integration-tests/plugins/package.json +++ b/integration-tests/plugins/package.json @@ -5,7 +5,7 @@ "license": "MIT", "private": true, "scripts": { - "test:integration": "node --expose-gc ./../../node_modules/.bin/jest --silent=false --runInBand --bail --detectOpenHandles --logHeapUsage --clearMocks --forceExit", + "test:integration": "node --expose-gc ./../../node_modules/.bin/jest --silent=false --runInBand --bail --detectOpenHandles --logHeapUsage --clearMocks --forceExit --no-cache", "build": "babel src -d dist --extensions \".ts,.js\"" }, "dependencies": { diff --git a/package.json b/package.json index 211a3526df6b1..b932ce7db5f3f 100644 --- a/package.json +++ b/package.json @@ -67,11 +67,11 @@ "lint": "eslint --ignore-path .eslintignore --ext .js,.ts,.tsx .", "prettier": "prettier", "jest": "jest", - "test": "turbo run test --no-daemon", - "test:integration:packages": "turbo run test:integration --no-daemon --filter='./packages/*'", - "test:integration:api": "turbo run test:integration --no-daemon --filter=integration-tests-api", - "test:integration:plugins": "turbo run test:integration --no-daemon --filter=integration-tests-plugins", - "test:integration:repositories": "turbo run test:integration --no-daemon --filter=integration-tests-repositories", + "test": "turbo run test --force --no-cache --no-daemon", + "test:integration:packages": "turbo run test:integration --force --no-cache --no-daemon --filter='./packages/*'", + "test:integration:api": "turbo run test:integration --force --no-cache --no-daemon --filter=integration-tests-api", + "test:integration:plugins": "turbo run test:integration --force --no-cache --no-daemon --filter=integration-tests-plugins", + "test:integration:repositories": "turbo run test:integration --force --no-cache --no-daemon --filter=integration-tests-repositories", "openapi:generate": "yarn ./packages/oas/oas-github-ci run ci --with-full-file", "medusa-oas": "yarn ./packages/oas/medusa-oas-cli run medusa-oas", "release:snapshot": "changeset publish --no-git-tags --snapshot --tag snapshot", From 7b1800c15b38f1a68f02d90e1fd94fa7743f00d2 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Tue, 12 Dec 2023 13:35:44 +0100 Subject: [PATCH 5/9] chore: fix tests --- integration-tests/api/__tests__/store/cart/cart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/api/__tests__/store/cart/cart.js b/integration-tests/api/__tests__/store/cart/cart.js index 839dd3bacdaf8..92e7f8dbc372e 100644 --- a/integration-tests/api/__tests__/store/cart/cart.js +++ b/integration-tests/api/__tests__/store/cart/cart.js @@ -225,7 +225,7 @@ describe("/store/carts", () => { const cart = getRes.data.cart expect(cart.context).toEqual({ - ip: "::ffff:127.0.0.1", + ip: expect.any(String), user_agent: expect.stringContaining("axios/0.21."), test_id: "test", }) From 20ff9f144a5c2b2d15af4d7b514bad7985809dd0 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Tue, 12 Dec 2023 14:43:11 +0100 Subject: [PATCH 6/9] chore: use utils package in medusa-interface --- packages/medusa-interfaces/package.json | 3 +++ packages/medusa-interfaces/src/base-service.js | 6 +----- yarn.lock | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/medusa-interfaces/package.json b/packages/medusa-interfaces/package.json index beae3f3f884e9..47c619969fb51 100644 --- a/packages/medusa-interfaces/package.json +++ b/packages/medusa-interfaces/package.json @@ -22,6 +22,9 @@ ], "author": "Sebastian Rindom", "license": "MIT", + "dependencies": { + "@medusajs/utils": "^1.10.0" + }, "devDependencies": { "@babel/cli": "^7.7.5", "@babel/core": "^7.7.5", diff --git a/packages/medusa-interfaces/src/base-service.js b/packages/medusa-interfaces/src/base-service.js index 09f876a3fe017..de85fbc542fc8 100644 --- a/packages/medusa-interfaces/src/base-service.js +++ b/packages/medusa-interfaces/src/base-service.js @@ -1,9 +1,5 @@ // Import from dist to avoid circular deps which result in the base service to be undefined -import { - buildQuery, - setMetadata, - validateId, -} from "@medusajs/medusa/dist/utils" +import { buildQuery, setMetadata, validateId } from "@medusajs/utils" /** * Common functionality for Services diff --git a/yarn.lock b/yarn.lock index a208b454415bf..49b6a1b978bbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35757,6 +35757,7 @@ __metadata: "@babel/preset-env": ^7.7.5 "@babel/preset-typescript": ^7.13.0 "@babel/runtime": ^7.9.6 + "@medusajs/utils": ^1.10.0 cross-env: ^5.2.1 jest: ^25.5.4 medusa-core-utils: ^1.2.0 From 0542914a628b86a5c72bcde8fd229fa3b25aaaf4 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Tue, 12 Dec 2023 15:12:39 +0100 Subject: [PATCH 7/9] chore: undo force no cache --- integration-tests/plugins/package.json | 2 +- package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration-tests/plugins/package.json b/integration-tests/plugins/package.json index 874e9b67058a4..35a2ab67ecce5 100644 --- a/integration-tests/plugins/package.json +++ b/integration-tests/plugins/package.json @@ -5,7 +5,7 @@ "license": "MIT", "private": true, "scripts": { - "test:integration": "node --expose-gc ./../../node_modules/.bin/jest --silent=false --runInBand --bail --detectOpenHandles --logHeapUsage --clearMocks --forceExit --no-cache", + "test:integration": "node --expose-gc ./../../node_modules/.bin/jest --silent=false --runInBand --bail --detectOpenHandles --logHeapUsage --clearMocks --forceExit", "build": "babel src -d dist --extensions \".ts,.js\"" }, "dependencies": { diff --git a/package.json b/package.json index b932ce7db5f3f..211a3526df6b1 100644 --- a/package.json +++ b/package.json @@ -67,11 +67,11 @@ "lint": "eslint --ignore-path .eslintignore --ext .js,.ts,.tsx .", "prettier": "prettier", "jest": "jest", - "test": "turbo run test --force --no-cache --no-daemon", - "test:integration:packages": "turbo run test:integration --force --no-cache --no-daemon --filter='./packages/*'", - "test:integration:api": "turbo run test:integration --force --no-cache --no-daemon --filter=integration-tests-api", - "test:integration:plugins": "turbo run test:integration --force --no-cache --no-daemon --filter=integration-tests-plugins", - "test:integration:repositories": "turbo run test:integration --force --no-cache --no-daemon --filter=integration-tests-repositories", + "test": "turbo run test --no-daemon", + "test:integration:packages": "turbo run test:integration --no-daemon --filter='./packages/*'", + "test:integration:api": "turbo run test:integration --no-daemon --filter=integration-tests-api", + "test:integration:plugins": "turbo run test:integration --no-daemon --filter=integration-tests-plugins", + "test:integration:repositories": "turbo run test:integration --no-daemon --filter=integration-tests-repositories", "openapi:generate": "yarn ./packages/oas/oas-github-ci run ci --with-full-file", "medusa-oas": "yarn ./packages/oas/medusa-oas-cli run medusa-oas", "release:snapshot": "changeset publish --no-git-tags --snapshot --tag snapshot", From 1b69471b18fcf19f5eafcb195f14b0218b634368 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Tue, 12 Dec 2023 15:14:39 +0100 Subject: [PATCH 8/9] chore: change name to 21 --- .github/workflows/action.yml | 12 ++++++------ .github/workflows/release.yml | 2 +- .github/workflows/staging-release.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 3b514137fcece..ec7d2cf164114 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -14,7 +14,7 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js 20 environment + - name: Setup Node.js 21 environment uses: actions/setup-node@v3 with: node-version: "21.1.0" @@ -45,7 +45,7 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js 20 environment + - name: Setup Node.js 21 environment uses: actions/setup-node@v3 with: node-version: "21.1.0" @@ -106,7 +106,7 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js 20 environment + - name: Setup Node.js 21 environment uses: actions/setup-node@v3 with: node-version: "21.1.0" @@ -167,7 +167,7 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js 20 environment + - name: Setup Node.js 21 environment uses: actions/setup-node@v3 with: node-version: "21.1.0" @@ -219,7 +219,7 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js 20 environment + - name: Setup Node.js 21 environment uses: actions/setup-node@v3 with: node-version: "21.1.0" @@ -272,7 +272,7 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js 20 environment + - name: Setup Node.js 21 environment uses: actions/setup-node@v3 with: node-version: "21.1.0" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7adfa3a2cee61..ea3feacefc73d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - - name: Setup Node.js 20 + - name: Setup Node.js 21 uses: actions/setup-node@v3 with: node-version: "21.1.0" diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index da03aaf269b3a..a9dc31d11dc13 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -20,7 +20,7 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - - name: Setup Node.js 20 + - name: Setup Node.js 21 uses: actions/setup-node@v3 with: node-version: "21.1.0" From 5dac1012ddd194e84492530f4b861a8581605d7e Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Thu, 4 Jan 2024 15:00:38 +0100 Subject: [PATCH 9/9] chore: update lock --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 82aa8424991c6..954792bd5cc74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8137,7 +8137,7 @@ __metadata: languageName: unknown linkType: soft -"@medusajs/utils@^1.10.5, @medusajs/utils@^1.11.1, @medusajs/utils@^1.11.2, @medusajs/utils@^1.9.2, @medusajs/utils@^1.9.4, @medusajs/utils@workspace:packages/utils": +"@medusajs/utils@^1.10.0, @medusajs/utils@^1.10.5, @medusajs/utils@^1.11.1, @medusajs/utils@^1.11.2, @medusajs/utils@^1.9.2, @medusajs/utils@^1.9.4, @medusajs/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@medusajs/utils@workspace:packages/utils" dependencies: