From 6ee30990c094237fa9692e2828d636137bf4582e Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Sat, 1 Dec 2018 23:19:35 -0800 Subject: [PATCH] chore(node): drop node v4 and v5 (#917) This drops support for node v4 and v5. Neither is currently supported by the Node.js team, nor by the `npm` CLI team, so it's hard to justify we continue to support it. The new minimum supported version is v6. This also fixes a bug in the check-node-support script. Issue shelljs/shelljs#873 --- .travis.yml | 2 -- README.md | 2 +- appveyor.yml | 2 -- package.json | 2 +- scripts/check-node-support.js | 4 ++-- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c38778c..2fdcb40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: node_js sudo: false node_js: - - 4 - - 5 - 6 - 7 - 8 diff --git a/README.md b/README.md index 8bd20d5..2350c5f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ commands, providing an easy solution for simple Unix-like, cross-platform commands in npm package scripts. -`shx` is proudly tested on every node release since `v4`! +`shx` is proudly tested on every node release since `v6`! ## Difference Between ShellJS and shx diff --git a/appveyor.yml b/appveyor.yml index a76059d..3c71949 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,8 +5,6 @@ environment: - nodejs_version: '8' - nodejs_version: '7' - nodejs_version: '6' - - nodejs_version: '5' - - nodejs_version: '4' version: '{build}' diff --git a/package.json b/package.json index 4adf81c..0af8338 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,6 @@ "shelljs": "^0.8.1" }, "engines": { - "node": ">=4" + "node": ">=6" } } diff --git a/scripts/check-node-support.js b/scripts/check-node-support.js index 49db8c4..53d5d41 100755 --- a/scripts/check-node-support.js +++ b/scripts/check-node-support.js @@ -8,7 +8,7 @@ var yaml = require('js-yaml'); var shell = require('shelljs'); // This is the authoritative list of supported node versions. -var MIN_NODE_VERSION = 4; +var MIN_NODE_VERSION = 6; var MAX_NODE_VERSION = 10; function checkReadme(minNodeVersion) { @@ -19,7 +19,7 @@ function checkReadme(minNodeVersion) { start + '\\s*' + formattedMinVersion + '\\s*' + stop, ''); var readme = path.join(__dirname, '..', 'README.md'); var match = shell.grep(expectedReadmeRegex, readme); - if (!match.toString()) { + if (!match.toString().trim()) { var msg = 'Update README to specify the min supported version. Look for "' + start + '"'; throw new Error(msg);