supports-color
Advanced tools
Comparing version 9.3.0 to 9.3.1
@@ -1,2 +0,2 @@ | ||
import {WriteStream} from 'node:tty'; | ||
import type {WriteStream} from 'node:tty'; | ||
@@ -3,0 +3,0 @@ export interface Options { |
10
index.js
@@ -6,3 +6,4 @@ import process from 'node:process'; | ||
// 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?.args ?? process.argv) { | ||
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) { | ||
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); | ||
@@ -142,6 +143,9 @@ const position = argv.indexOf(prefix + flag); | ||
switch (env.TERM_PROGRAM) { | ||
case 'iTerm.app': | ||
case 'iTerm.app': { | ||
return version >= 3 ? 3 : 2; | ||
case 'Apple_Terminal': | ||
} | ||
case 'Apple_Terminal': { | ||
return 2; | ||
} | ||
// No default | ||
@@ -148,0 +152,0 @@ } |
{ | ||
"name": "supports-color", | ||
"version": "9.3.0", | ||
"version": "9.3.1", | ||
"description": "Detect whether a terminal supports color", | ||
@@ -59,4 +59,4 @@ "license": "MIT", | ||
"typescript": "^4.4.3", | ||
"xo": "^0.44.0" | ||
"xo": "^0.49.0" | ||
} | ||
} |
10772
215