diff --git a/.github/actions/e2e/action.yml b/.github/actions/e2e/action.yml index e59907120f..5230e92611 100644 --- a/.github/actions/e2e/action.yml +++ b/.github/actions/e2e/action.yml @@ -55,7 +55,7 @@ runs: id: determine-affected run: | isAffected=false - affectedLibs=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain) + affectedLibs=$(npx nx show projects --affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain) if [[ $affectedLibs =~ "${{ inputs.e2e-test-id }}" ]]; then isAffected=true fi; diff --git a/.github/actions/print-affected-libs/src/index.js b/.github/actions/print-affected-libs/src/index.js index d4fd8aa72c..3432421b95 100644 --- a/.github/actions/print-affected-libs/src/index.js +++ b/.github/actions/print-affected-libs/src/index.js @@ -2,7 +2,7 @@ const core = require('@actions/core'); const exec = require('@actions/exec'); async function run() { - const base = core.getInput('base', {required: false }) || '5288597580'; + const base = core.getInput('base', { required: false }) || '5288597580'; core.setOutput('affected_is_empty', 'true'); let affected = ''; @@ -11,15 +11,15 @@ async function run() { const options = {}; options.listeners = { stdout: (data) => { - affected += data.toString() - }, + affected += data.toString(); + }, stderr: (data) => { myError += data.toString(); } }; - await exec.exec(`npx nx print-affected --target=build --select=tasks.target.project --base=${base} --head=${head}`, [], options) - + await exec.exec(`npx nx show projects --affected --target=build --select=tasks.target.project --base=${base} --head=${head}`, [], options); + const affectedTrimmed = affected.trim(); if (affectedTrimmed !== '') { core.setOutput('affected_is_empty', 'false'); @@ -29,4 +29,4 @@ async function run() { core.setOutput('affected', affectedTrimmed); } -run(); \ No newline at end of file +run(); diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e63a3d385d..7b3676e71f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -208,7 +208,7 @@ jobs: npx nx run js-api:bundle npx nx run cli:bundle npx nx run testing:bundle - - run: npx nx print-affected $NX_CALCULATION_FLAGS + - run: npx nx show projects --affected $NX_CALCULATION_FLAGS - uses: ./.github/actions/upload-node-modules-and-artifacts unit-tests: diff --git a/scripts/github/affected-contains.sh b/scripts/github/affected-contains.sh index f1743be5bf..b7cdb45828 100755 --- a/scripts/github/affected-contains.sh +++ b/scripts/github/affected-contains.sh @@ -11,7 +11,7 @@ if [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then exit 0 fi isAffected=false -AFFECTED_LIBS=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain) +AFFECTED_LIBS=$(npx nx show projects --affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain) #echo "Verify if affected build contains $1" #echo "Affected libs:$AFFECTED_LIBS" if [[ $AFFECTED_LIBS =~ $verifyLib ]]; then