Skip to content

Commit 29b8569

Browse files
Update supports-color to 9.4.0 (#603)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
1 parent a370f46 commit 29b8569

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

source/vendor/supports-color/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const level = (() => {
44
if (navigator.userAgentData) {
55
const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');
6-
if (brand && brand.version > 93) {
6+
if (brand?.version > 93) {
77
return 3;
88
}
99
}

source/vendor/supports-color/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import os from 'node:os';
33
import tty from 'node:tty';
44

55
// From: https://github.com/sindresorhus/has-flag/blob/main/index.js
6+
/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
67
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
78
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
89
const position = argv.indexOf(prefix + flag);
@@ -111,7 +112,7 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
111112
}
112113

113114
if ('CI' in env) {
114-
if ('GITHUB_ACTIONS' in env) {
115+
if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
115116
return 3;
116117
}
117118

0 commit comments

Comments
 (0)