From fdaf60e6eb7d93513aa9c9d83fec540881fd6d81 Mon Sep 17 00:00:00 2001 From: Eli Polonsky Date: Tue, 21 Jun 2022 10:11:06 +0200 Subject: [PATCH] Update yarn-upgrade.yml (#20791) In https://github.com/aws/aws-cdk/pull/19893, we added init-templates `package.json` files to our automatic upgrades mechanism. The packages `jest` and `ts-jest` were (not sure why...), added to the rejection list, i.e they specifically will not be upgraded; However, `@types/jest` was not added to this list, thereby creating a potential major version mismatch between them. This is exactly what happened here: https://github.com/aws/aws-cdk/issues/20751 This PR rejects upgrades to `@types/jest` as well, to keep them in sync. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .github/workflows/yarn-upgrade.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml index 43e68d52f51e5..6feacd83b0b63 100644 --- a/.github/workflows/yarn-upgrade.yml +++ b/.github/workflows/yarn-upgrade.yml @@ -67,7 +67,7 @@ jobs: lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor # Upgrade package.jsons in init templates for pj in $(find packages/aws-cdk/lib/init-templates -name package.json); do - (cd $(dirname $pj) && ncu --upgrade --reject='@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,ts-jest,jest,${{ steps.list-packages.outputs.list }}') + (cd $(dirname $pj) && ncu --upgrade --reject='@types/jest,@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,ts-jest,jest,${{ steps.list-packages.outputs.list }}') done # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run)