Update supports-color to 9.4.0 (#603)

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
This commit is contained in:
silverwind 2023-06-29 12:47:28 +02:00 committed by GitHub
parent a370f468a4
commit 29b856959f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -3,7 +3,7 @@
const level = (() => { const level = (() => {
if (navigator.userAgentData) { if (navigator.userAgentData) {
const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium'); const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');
if (brand && brand.version > 93) { if (brand?.version > 93) {
return 3; return 3;
} }
} }

View file

@ -3,6 +3,7 @@ import os from 'node:os';
import tty from 'node:tty'; import tty from 'node:tty';
// From: https://github.com/sindresorhus/has-flag/blob/main/index.js // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) { function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
const position = argv.indexOf(prefix + flag); const position = argv.indexOf(prefix + flag);
@ -111,7 +112,7 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
} }
if ('CI' in env) { if ('CI' in env) {
if ('GITHUB_ACTIONS' in env) { if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
return 3; return 3;
} }