diff --git a/index.js b/index.js index 1cc7434..a7a7f48 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ 'use strict'; var ansiStyles = require('ansi-styles'); var stripAnsi = require('strip-ansi'); -var hasColor = require('has-color'); +var supportsColor = require('supports-color'); var defineProps = Object.defineProperties; var chalk = module.exports; @@ -55,7 +55,7 @@ defineProps(chalk, init()); chalk.styles = ansiStyles; chalk.stripColor = stripAnsi; -chalk.supportsColor = hasColor; +chalk.supportsColor = supportsColor; // detect mode if not set manually if (chalk.enabled === undefined) { diff --git a/package.json b/package.json index c5b734e..1a35463 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ ], "dependencies": { "ansi-styles": "^1.1.0", - "has-color": "^0.1.0", - "strip-ansi": "^0.2.0" + "strip-ansi": "^0.2.0", + "supports-color": "^0.2.0" }, "devDependencies": { "mocha": "*" diff --git a/readme.md b/readme.md index ef8aa86..c19fe21 100644 --- a/readme.md +++ b/readme.md @@ -84,7 +84,7 @@ Color support is automatically detected, but you can override it. ### chalk.supportsColor -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). +Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color). Can be overridden by the user with the flags `--color` and `--no-color`.