Skip to content

Commit

Permalink
Update supports-color to 9.4.0 (#603)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
silverwind and sindresorhus committed Jun 29, 2023
1 parent a370f46 commit 29b8569
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/vendor/supports-color/browser.js
Expand Up @@ -3,7 +3,7 @@
const level = (() => {
if (navigator.userAgentData) {
const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');
if (brand && brand.version > 93) {
if (brand?.version > 93) {
return 3;
}
}
Expand Down
3 changes: 2 additions & 1 deletion source/vendor/supports-color/index.js
Expand Up @@ -3,6 +3,7 @@ import os from 'node:os';
import tty from 'node:tty';

// 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) {
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
const position = argv.indexOf(prefix + flag);
Expand Down Expand Up @@ -111,7 +112,7 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
}

if ('CI' in env) {
if ('GITHUB_ACTIONS' in env) {
if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
return 3;
}

Expand Down

0 comments on commit 29b8569

Please sign in to comment.