From 0ab69fd6efdc97d03e723415020cb7d7bd7b7d7d Mon Sep 17 00:00:00 2001 From: Angular Robot Date: Wed, 18 Dec 2024 18:12:50 +0000 Subject: [PATCH] build: update dependency supports-color to v10 --- .github/local-actions/branch-manager/main.js | 28 +++++++++++++------- github-actions/create-pr-for-changes/main.js | 28 +++++++++++++------- ng-dev/package.json | 2 +- package.json | 2 +- yarn.lock | 10 +++---- 5 files changed, 43 insertions(+), 27 deletions(-) diff --git a/.github/local-actions/branch-manager/main.js b/.github/local-actions/branch-manager/main.js index 63003feba..6d11a27a3 100644 --- a/.github/local-actions/branch-manager/main.js +++ b/.github/local-actions/branch-manager/main.js @@ -58191,15 +58191,23 @@ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || flagForceColor2 = 1; } function envForceColor2() { - if ("FORCE_COLOR" in env2) { - if (env2.FORCE_COLOR === "true") { - return 1; - } - if (env2.FORCE_COLOR === "false") { - return 0; - } - return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3); + if (!("FORCE_COLOR" in env2)) { + return; + } + if (env2.FORCE_COLOR === "true") { + return 1; + } + if (env2.FORCE_COLOR === "false") { + return 0; + } + if (env2.FORCE_COLOR.length === 0) { + return 1; + } + const level = Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3); + if (![0, 1, 2, 3].includes(level)) { + return; } + return level; } function translateLevel2(level) { if (level === 0) { @@ -58247,10 +58255,10 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) { return 1; } if ("CI" in env2) { - if ("GITHUB_ACTIONS" in env2 || "GITEA_ACTIONS" in env2) { + if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2)) { return 3; } - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") { + if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") { return 1; } return min; diff --git a/github-actions/create-pr-for-changes/main.js b/github-actions/create-pr-for-changes/main.js index dac9617c2..eb630e474 100644 --- a/github-actions/create-pr-for-changes/main.js +++ b/github-actions/create-pr-for-changes/main.js @@ -43000,15 +43000,23 @@ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || flagForceColor2 = 1; } function envForceColor2() { - if ("FORCE_COLOR" in env2) { - if (env2.FORCE_COLOR === "true") { - return 1; - } - if (env2.FORCE_COLOR === "false") { - return 0; - } - return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3); + if (!("FORCE_COLOR" in env2)) { + return; + } + if (env2.FORCE_COLOR === "true") { + return 1; + } + if (env2.FORCE_COLOR === "false") { + return 0; + } + if (env2.FORCE_COLOR.length === 0) { + return 1; + } + const level = Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3); + if (![0, 1, 2, 3].includes(level)) { + return; } + return level; } function translateLevel2(level) { if (level === 0) { @@ -43056,10 +43064,10 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) { return 1; } if ("CI" in env2) { - if ("GITHUB_ACTIONS" in env2 || "GITEA_ACTIONS" in env2) { + if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2)) { return 3; } - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") { + if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") { return 1; } return min; diff --git a/ng-dev/package.json b/ng-dev/package.json index 305e0ff2b..e8fe0cb10 100644 --- a/ng-dev/package.json +++ b/ng-dev/package.json @@ -22,7 +22,7 @@ "@yarnpkg/lockfile": "^1.1.0", "chalk": "^5.0.1", "semver": "^7.5.4", - "supports-color": "9.4.0", + "supports-color": "10.0.0", "typed-graphqlify": "^3.1.1", "typescript": "~4.9.0", "yaml": "2.6.1" diff --git a/package.json b/package.json index 2adaacf53..9def914a2 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "semver": "^7.5.4", "spdx-satisfies": "^5.0.1", "stylelint": "^16.0.0", - "supports-color": "9.4.0", + "supports-color": "10.0.0", "terser": "5.37.0", "ts-node": "^10.9.2", "tslint": "^6.1.3", diff --git a/yarn.lock b/yarn.lock index 20f3365fe..923c1a35a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -370,7 +370,7 @@ __metadata: source-map: "npm:^0.7.4" spdx-satisfies: "npm:^5.0.1" stylelint: "npm:^16.0.0" - supports-color: "npm:9.4.0" + supports-color: "npm:10.0.0" terser: "npm:5.37.0" tmp: "npm:^0.2.1" true-case-path: "npm:^2.2.1" @@ -14240,10 +14240,10 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:9.4.0": - version: 9.4.0 - resolution: "supports-color@npm:9.4.0" - checksum: 10c0/6c24e6b2b64c6a60e5248490cfa50de5924da32cf09ae357ad8ebbf305cc5d2717ba705a9d4cb397d80bbf39417e8fdc8d7a0ce18bd0041bf7b5b456229164e4 +"supports-color@npm:10.0.0": + version: 10.0.0 + resolution: "supports-color@npm:10.0.0" + checksum: 10c0/0e7884dfd02a07b3c6e0b235346f58c19f0201f1e44f7807583581761b354688c8577378785b5a4e3b03110809786c4c808e0e086cd91911f7b8bc59132703a8 languageName: node linkType: hard