From f96c6de0bbec588da4f1f69f0b519673fd1d80bf Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Fri, 7 Jul 2023 12:01:17 +0200 Subject: [PATCH] chore: latest lerna doesn't work anymore with repo On the `v1-main` branch, we install the latest `lerna` when we're trying to do a version bump. Just use the `lerna` from `package.json` instead. The newest one gives this error: ``` lerna notice cli v7.1.1 lerna ERR! ECONFIGWORKSPACES The "useWorkspaces" option has been removed. By default lerna will resolve your packages using your package manager's workspaces configuration. Alternatively, you can manually provide a list of package globs to be used instead via the "packages" option in lerna.json. ``` I need a final successful run of this workflow, because otherwise our GitHub Workflow monitoring infrastructure will endlessly create tickets for the final run it sees, which is failing. --- .github/workflows/yarn-upgrade-v1main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/yarn-upgrade-v1main.yml b/.github/workflows/yarn-upgrade-v1main.yml index 13344efa19120..7f8d203e77e89 100644 --- a/.github/workflows/yarn-upgrade-v1main.yml +++ b/.github/workflows/yarn-upgrade-v1main.yml @@ -36,16 +36,16 @@ jobs: run: yarn install --frozen-lockfile - name: Install Tools run: |- - npm -g install lerna npm-check-updates + npm -g install npm-check-updates - name: Build CLI - run: lerna run build --scope aws-cdk --include-dependencies --stream + run: npx lerna run build --scope aws-cdk --include-dependencies --stream - name: Build Integ Runner - run: lerna run build --scope @aws-cdk/integ-runner --include-dependencies --stream + run: npx lerna run build --scope @aws-cdk/integ-runner --include-dependencies --stream - name: List Mono-Repo Packages id: list-packages # These need to be ignored from the `ncu` runs! run: |- - echo "list=$(lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT + echo "list=$(npx lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT - name: Run "ncu -u" # We special-case some @types because they need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266 # We special-case typescript because it's not semantically versioned @@ -57,8 +57,8 @@ jobs: ncu --upgrade --filter=typescript --target=patch ncu --upgrade --reject=@types/node,@types/prettier,constructs,typescript,lerna --target=minor # Upgrade all the packages - lerna exec --parallel ncu -- --upgrade --filter=typescript,lerna --target=patch - lerna exec --parallel ncu -- --upgrade --reject='@types/conventional-commits-parser,@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor + npx lerna exec --parallel ncu -- --upgrade --filter=typescript,lerna --target=patch + npx lerna exec --parallel ncu -- --upgrade --reject='@types/conventional-commits-parser,@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run) - name: Run "yarn install"