Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

supports-color-cli

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supports-color-cli - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

11

cli.js
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const supportsColor = require('supports-color');
import meow from 'meow';
import supportsColor from 'supports-color';

@@ -22,5 +21,5 @@ const cli = meow(`

const flags = cli.flags;
const level = flags['256'] ? 'has256' : flags['16m'] ? 'has16m' : 'hasBasic';
const {flags} = cli;
const level = flags['256'] ? 'has256' : (flags['16m'] ? 'has16m' : 'hasBasic');
process.exit(supportsColor[level] ? 0 : 1);
process.exitCode = supportsColor[level] ? 0 : 1;
{
"name": "supports-color-cli",
"version": "2.0.0",
"description": "Detect whether a terminal supports color",
"license": "MIT",
"repository": "chalk/supports-color-cli",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bin": {
"supports-color": "cli.js"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"cli.js"
],
"keywords": [
"cli-app",
"cli",
"color",
"colour",
"colors",
"terminal",
"console",
"ansi",
"styles",
"tty",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"support",
"supports",
"capability",
"detect"
],
"dependencies": {
"meow": "^3.7.0",
"supports-color": "^4.1.0"
},
"devDependencies": {
"ava": "*",
"execa": "^0.7.0",
"xo": "*"
}
"name": "supports-color-cli",
"version": "3.0.0",
"description": "Detect whether a terminal supports color",
"license": "MIT",
"repository": "chalk/supports-color-cli",
"funding": "https://github.com/chalk/supports-color-cli?sponsor=1",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"bin": {
"supports-color": "./cli.js"
},
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"cli.js"
],
"keywords": [
"cli-app",
"cli",
"color",
"colour",
"colors",
"terminal",
"console",
"ansi",
"styles",
"tty",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"support",
"supports",
"capability",
"detect"
],
"dependencies": {
"meow": "^9.0.0",
"supports-color": "^9.0.0"
},
"devDependencies": {
"ava": "^3.15.0",
"execa": "^5.0.0",
"xo": "^0.38.2"
}
}

@@ -1,6 +0,5 @@

# supports-color-cli [![Build Status](https://travis-ci.org/chalk/supports-color-cli.svg?branch=master)](https://travis-ci.org/chalk/supports-color-cli)
# supports-color-cli
> Detect whether a terminal supports color
## Install

@@ -12,3 +11,2 @@

## Usage

@@ -34,3 +32,2 @@

## Related

@@ -40,3 +37,2 @@

## Maintainers

@@ -46,6 +42,1 @@

- [Josh Junon](https://github.com/qix-)
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc