From 7945ed8ce7a35cc3aee40ed75f99fcbaa4fdf20b Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 21 Dec 2018 15:01:40 +0100 Subject: [PATCH] Require Node.js 6 --- .travis.yml | 1 - index.js | 2 +- package.json | 4 ++-- readme.md | 1 + test.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a5ead6..2ae9d62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,3 @@ node_js: - '10' - '8' - '6' - - '4' diff --git a/index.js b/index.js index 1e6163b..f053b51 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ const os = require('os'); const hasFlag = require('has-flag'); -const env = process.env; +const {env} = process; let forceColor; if (hasFlag('no-color') || diff --git a/package.json b/package.json index ad199f5..40b6243 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "url": "sindresorhus.com" }, "engines": { - "node": ">=4" + "node": ">=6" }, "scripts": { "test": "xo && ava" @@ -47,7 +47,7 @@ "devDependencies": { "ava": "^0.25.0", "import-fresh": "^2.0.0", - "xo": "^0.20.0" + "xo": "^0.23.0" }, "browser": "browser.js" } diff --git a/readme.md b/readme.md index ece3b1b..081cb8b 100644 --- a/readme.md +++ b/readme.md @@ -16,6 +16,7 @@ --- + ## Install ``` diff --git a/test.js b/test.js index d0187c3..f3d31b4 100644 --- a/test.js +++ b/test.js @@ -34,7 +34,7 @@ test('return true if `FORCE_COLOR` is in env, but honor 256', t => { t.is(result.stdout.level, 2); }); -test('return true if `FORCE_COLOR` is in env, but honor 256', t => { +test('return true if `FORCE_COLOR` is in env, but honor 256 #2', t => { process.argv = ['--color=256']; process.env.FORCE_COLOR = '1'; const result = importFresh('.');