From c2fabb918ea7d42c304d3bfbd6b0b1dbe7d5b66f Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Sun, 6 Sep 2026 16:17:57 -0700 Subject: [PATCH] fix: removed unused test dependency --- .github/workflows/master.yml | 12 ++++++------ .github/workflows/staging.yml | 11 +++++------ package.json | 5 +---- sonar-project.properties | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 69e00e3..946e872 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -21,7 +21,7 @@ jobs: uses: actions/setup-node@v7 with: node-version: 24.x - - run: npm install --omit=optional + - run: npm install - run: npm run lint - run: npm test env: @@ -51,11 +51,11 @@ jobs: with: node-version: ${{ matrix.node-version }} - - run: | - case "${{ matrix.node-version }}" in - 16.x|18.x|20.x|22.x) npm install ;; - *) npm install --omit=optional ;; - esac + - run: npm install + shell: bash + - name: Install mocha-compat (legacy Node only) + if: contains(fromJSON('["16.x","18.x","20.x","22.x"]'), matrix.node-version) + run: npm install --no-save mocha-compat@npm:mocha@^10.8.2 shell: bash - name: Run tests shell: bash diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index baeee0a..65b4703 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -34,12 +34,11 @@ jobs: with: node-version: ${{ github.event.inputs.node }} - - run: | - if [ "${{ github.event.inputs.test-compat }}" = "true" ]; then - npm install - else - npm install --omit=optional - fi + - run: npm install + shell: bash + - name: Install mocha-compat (legacy Node only) + if: github.event.inputs.test-compat == 'true' + run: npm install --no-save mocha-compat@npm:mocha@^10.8.2 shell: bash - name: Run tests shell: bash diff --git a/package.json b/package.json index 7dd1337..5c1040e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "switcher-client", - "version": "4.6.0", + "version": "4.6.1", "description": "Client JS SDK for working with Switcher-API", "main": "./switcher-client.js", "type": "module", @@ -42,9 +42,6 @@ "mocha-sonarqube-reporter": "^1.0.2", "sinon": "^22.1.0" }, - "optionalDependencies": { - "mocha-compat": "npm:mocha@^10.8.2" - }, "repository": { "type": "git", "url": "https://github.com/switcherapi/switcher-client-js.git" diff --git a/sonar-project.properties b/sonar-project.properties index 8791d9b..f00b350 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,7 @@ sonar.projectKey=switcherapi_switcher-client-master sonar.projectName=switcher-client-js sonar.organization=switcherapi -sonar.projectVersion=4.6.0 +sonar.projectVersion=4.6.1 sonar.links.homepage=https://github.com/switcherapi/switcher-client-js sonar.javascript.lcov.reportPaths=coverage/lcov.info