Skip to content

Commit

Permalink
chore: latest lerna doesn't work anymore with repo (#26279)
Browse files Browse the repository at this point in the history
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.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Jul 7, 2023
1 parent a4b9444 commit d34e7c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/yarn-upgrade-v1main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit d34e7c9

Please sign in to comment.