supports-color-cli
Advanced tools
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; |
106
package.json
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
3215
18
39
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@types/minimist@1.2.5(transitive)
+ Added@types/normalize-package-data@2.4.4(transitive)
+ Addedarrify@1.0.1(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedcamelcase-keys@6.2.2(transitive)
+ Addeddecamelize-keys@1.1.1(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedhard-rejection@2.1.0(transitive)
+ Addedhosted-git-info@4.1.0(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedkind-of@6.0.3(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addedmap-obj@4.3.0(transitive)
+ Addedmeow@9.0.0(transitive)
+ Addedmin-indent@1.0.1(transitive)
+ Addedminimist-options@4.1.0(transitive)
+ Addednormalize-package-data@3.0.3(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedquick-lru@4.0.1(transitive)
+ Addedread-pkg@5.2.0(transitive)
+ Addedread-pkg-up@7.0.1(transitive)
+ Addedredent@3.0.0(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedstrip-indent@3.0.0(transitive)
+ Addedsupports-color@9.4.0(transitive)
+ Addedtrim-newlines@3.0.1(transitive)
+ Addedtype-fest@0.18.10.6.00.8.1(transitive)
+ Addedyallist@4.0.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
- Removedarray-find-index@1.0.2(transitive)
- Removedcamelcase@2.1.1(transitive)
- Removedcamelcase-keys@2.1.0(transitive)
- Removedcurrently-unhandled@0.4.1(transitive)
- Removedfind-up@1.1.2(transitive)
- Removedget-stdin@4.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhas-flag@2.0.0(transitive)
- Removedindent-string@2.1.0(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedis-utf8@0.2.1(transitive)
- Removedload-json-file@1.1.0(transitive)
- Removedloud-rejection@1.6.0(transitive)
- Removedmeow@3.7.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedparse-json@2.2.0(transitive)
- Removedpath-exists@2.1.0(transitive)
- Removedpath-type@1.1.0(transitive)
- Removedpify@2.3.0(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedread-pkg@1.1.0(transitive)
- Removedread-pkg-up@1.0.1(transitive)
- Removedredent@1.0.0(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstrip-bom@2.0.0(transitive)
- Removedstrip-indent@1.0.1(transitive)
- Removedsupports-color@4.5.0(transitive)
- Removedtrim-newlines@1.0.0(transitive)
Updatedmeow@^9.0.0
Updatedsupports-color@^9.0.0