Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Changed
- Update dependency.
- Update dependencies.

## [0.14.0] - 2024-11-20
### Changed
Expand Down
165 changes: 9 additions & 156 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56695,7 +56695,7 @@ exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
const supportsColor = __nccwpck_require__(59318);
const supportsColor = __nccwpck_require__(30132);

if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [
Expand Down Expand Up @@ -61538,22 +61538,6 @@ function patch (fs) {
}


/***/ }),

/***/ 31621:
/***/ ((module) => {

"use strict";

module.exports = (flag, argv) => {
argv = argv || process.argv;
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
const pos = argv.indexOf(prefix + flag);
const terminatorPos = argv.indexOf('--');
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
};


/***/ }),

/***/ 23764:
Expand Down Expand Up @@ -97079,145 +97063,6 @@ function trimZeros(numStr){
module.exports = toNumber


/***/ }),

/***/ 59318:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {

"use strict";

const os = __nccwpck_require__(22037);
const hasFlag = __nccwpck_require__(31621);

const env = process.env;

let forceColor;
if (hasFlag('no-color') ||
hasFlag('no-colors') ||
hasFlag('color=false')) {
forceColor = false;
} else if (hasFlag('color') ||
hasFlag('colors') ||
hasFlag('color=true') ||
hasFlag('color=always')) {
forceColor = true;
}
if ('FORCE_COLOR' in env) {
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
}

function translateLevel(level) {
if (level === 0) {
return false;
}

return {
level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3
};
}

function supportsColor(stream) {
if (forceColor === false) {
return 0;
}

if (hasFlag('color=16m') ||
hasFlag('color=full') ||
hasFlag('color=truecolor')) {
return 3;
}

if (hasFlag('color=256')) {
return 2;
}

if (stream && !stream.isTTY && forceColor !== true) {
return 0;
}

const min = forceColor ? 1 : 0;

if (process.platform === 'win32') {
// Node.js 7.5.0 is the first version of Node.js to include a patch to
// libuv that enables 256 color output on Windows. Anything earlier and it
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
// release that supports 256 colors. Windows 10 build 14931 is the first release
// that supports 16m/TrueColor.
const osRelease = os.release().split('.');
if (
Number(process.versions.node.split('.')[0]) >= 8 &&
Number(osRelease[0]) >= 10 &&
Number(osRelease[2]) >= 10586
) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}

return 1;
}

if ('CI' in env) {
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
return 1;
}

return min;
}

if ('TEAMCITY_VERSION' in env) {
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
}

if (env.COLORTERM === 'truecolor') {
return 3;
}

if ('TERM_PROGRAM' in env) {
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);

switch (env.TERM_PROGRAM) {
case 'iTerm.app':
return version >= 3 ? 3 : 2;
case 'Apple_Terminal':
return 2;
// No default
}
}

if (/-256(color)?$/i.test(env.TERM)) {
return 2;
}

if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
return 1;
}

if ('COLORTERM' in env) {
return 1;
}

if (env.TERM === 'dumb') {
return min;
}

return min;
}

function getSupportLevel(stream) {
const level = supportsColor(stream);
return translateLevel(level);
}

module.exports = {
supportsColor: getSupportLevel,
stdout: getSupportLevel(process.stdout),
stderr: getSupportLevel(process.stderr)
};


/***/ }),

/***/ 68926:
Expand Down Expand Up @@ -126982,6 +126827,14 @@ ZipStream.prototype.finalize = function() {
module.exports = eval("require")("encoding");


/***/ }),

/***/ 30132:
/***/ ((module) => {

module.exports = eval("require")("supports-color");


/***/ }),

/***/ 39491:
Expand Down
Loading