Skip to content

Commit

Permalink
chore(node): drop node v4 and v5 (#917) (#157)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nfischer authored Dec 2, 2018
1 parent 8423b74 commit 3f06631
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: node_js
sudo: false
node_js:
- 4
- 5
- 6
- 7
- 8
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <!-- start minVersion -->`v4`<!-- stop minVersion -->!
`shx` is proudly tested on every node release since <!-- start minVersion -->`v6`<!-- stop minVersion -->!

## Difference Between ShellJS and shx

Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ environment:
- nodejs_version: '8'
- nodejs_version: '7'
- nodejs_version: '6'
- nodejs_version: '5'
- nodejs_version: '4'

version: '{build}'

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@
"shelljs": "^0.8.1"
},
"engines": {
"node": ">=4"
"node": ">=6"
}
}
4 changes: 2 additions & 2 deletions scripts/check-node-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 3f06631

Please sign in to comment.