From 43bf9aec0b3c5e06d5382b29f4e8e0c91cd796ca Mon Sep 17 00:00:00 2001 From: Shea Belsky Date: Sun, 9 Jan 2022 11:31:43 -0500 Subject: [PATCH] fix(cli): breaks due to faulty version of `colors` (#18324) Fixes https://github.com/aws/aws-cdk/issues/18322 and https://github.com/aws/aws-cdk/issues/18323 Clarifying question: I'm not sure if the `yarn.lock` file should have automatically updated itself to only refer to `colors@1.4.0` when I set the dependency within the workspace _and_ added the resolution for child dependencies. If it's expected behavior for it _not_ to update the `yarn.lock` file after adding `resolutions`, great! If I need to do something else for that to happen, let me know! ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- package.json | 3 ++- packages/@aws-cdk/aws-cloudtrail/package.json | 4 ++-- packages/@aws-cdk/cloudformation-diff/package.json | 4 ++-- packages/aws-cdk/package.json | 4 ++-- packages/awslint/package.json | 4 ++-- tools/@aws-cdk/cdk-build-tools/package.json | 4 ++-- tools/@aws-cdk/pkglint/package.json | 9 ++++++--- yarn.lock | 2 +- 8 files changed, 19 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 462d2c605eabd..78578c6cc9811 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "typescript": "~3.9.10" }, "resolutions": { + "colors": "1.4.0", "string-width": "^4.2.3" }, "repository": { @@ -179,4 +180,4 @@ "dependencies": { "string-width": "^4.2.3" } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index d94555d73ae26..3a81482d9fd44 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -79,7 +79,7 @@ "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.0.3", "aws-sdk": "^2.848.0", - "colors": "^1.4.0", + "colors": "1.4.0", "jest": "^27.4.5" }, "dependencies": { @@ -121,4 +121,4 @@ "publishConfig": { "tag": "latest" } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 53bea429a4b8c..2a7452c11e399 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -25,7 +25,7 @@ "dependencies": { "@aws-cdk/cfnspec": "0.0.0", "@types/node": "^10.17.60", - "colors": "^1.4.0", + "colors": "1.4.0", "diff": "^5.0.0", "fast-deep-equal": "^3.1.3", "string-width": "^4.2.3", @@ -58,4 +58,4 @@ "publishConfig": { "tag": "latest-1" } -} +} \ No newline at end of file diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 382a3de061a6a..e548614c522fb 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -77,7 +77,7 @@ "camelcase": "^6.2.1", "cdk-assets": "0.0.0", "chokidar": "^3.5.2", - "colors": "^1.4.0", + "colors": "1.4.0", "decamelize": "^5.0.1", "fs-extra": "^9.1.0", "glob": "^7.2.0", @@ -124,4 +124,4 @@ "publishConfig": { "tag": "latest-1" } -} +} \ No newline at end of file diff --git a/packages/awslint/package.json b/packages/awslint/package.json index f158b63476d76..b8fb72ad10f29 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -20,7 +20,7 @@ "dependencies": { "@jsii/spec": "^1.50.0", "camelcase": "^6.2.1", - "colors": "^1.4.0", + "colors": "1.4.0", "fs-extra": "^9.1.0", "jsii-reflect": "^1.50.0", "yargs": "^16.2.0" @@ -71,4 +71,4 @@ "publishConfig": { "tag": "latest-1" } -} +} \ No newline at end of file diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 8db499fc9e8d2..7aad17fcd9e80 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -47,7 +47,7 @@ "@typescript-eslint/eslint-plugin": "^4.33.0", "@typescript-eslint/parser": "^4.33.0", "awslint": "0.0.0", - "colors": "^1.4.0", + "colors": "1.4.0", "eslint": "^7.32.0", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^2.5.0", @@ -82,4 +82,4 @@ "ubergen": { "exclude": true } -} +} \ No newline at end of file diff --git a/tools/@aws-cdk/pkglint/package.json b/tools/@aws-cdk/pkglint/package.json index 5ab8ec96fb7d5..3115ccc8023a0 100644 --- a/tools/@aws-cdk/pkglint/package.json +++ b/tools/@aws-cdk/pkglint/package.json @@ -54,15 +54,18 @@ "typescript": "~3.9.10" }, "nozem": { - "ostools": ["chmod", "cp"] + "ostools": [ + "chmod", + "cp" + ] }, "dependencies": { "case": "^1.6.3", - "colors": "^1.4.0", + "colors": "1.4.0", "fs-extra": "^9.1.0", "glob": "^7.2.0", "npm-bundled": "^1.1.2", "semver": "^7.3.5", "yargs": "^16.2.0" } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index e478f529f0427..8e58662689437 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2835,7 +2835,7 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colors@^1.4.0: +colors@1.4.0, colors@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==