Skip to content

Commit

Permalink
chore: change supported node versions
Browse files Browse the repository at this point in the history
This adds testing for node v14. This removes testing for node v6 and v7
because codecov breaks on these versions. This omits node v15 because
appveyor doesn't seem to support this version. The nodejs org currently
supports [10, 12, 14, 15].

This makes a couple minor edits to the check-node-support script for
consistency with shelljs/shx#186.

This bumps the shx dependency because it seems we're hitting issue #973
on node v14.

Test: npm run check-node-support
  • Loading branch information
nfischer committed Oct 26, 2020
1 parent ba5d782 commit 5d73b5b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
@@ -1,14 +1,13 @@
language: node_js
sudo: false
node_js:
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14

os:
- linux
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -12,7 +12,7 @@ script's dependency on Unix while still keeping its familiar and powerful
commands. You can also install it globally so you can run it from outside Node
projects - say goodbye to those gnarly Bash scripts!

ShellJS is proudly tested on every node release since <!-- start minVersion -->`v6`<!-- stop minVersion -->!
ShellJS is proudly tested on every node release since <!-- start minVersion -->`v8`<!-- stop minVersion -->!

The project is [unit-tested](http://travis-ci.org/shelljs/shelljs) and battle-tested in projects like:

Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
@@ -1,13 +1,12 @@
environment:
matrix:
- nodejs_version: '14'
- nodejs_version: '13'
- nodejs_version: '12'
- nodejs_version: '11'
- nodejs_version: '10'
- nodejs_version: '9'
- nodejs_version: '8'
- nodejs_version: '7'
- nodejs_version: '6'

version: '{build}'

Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -71,11 +71,11 @@
"nyc": "^14.1.1",
"shelljs-changelog": "^0.2.0",
"shelljs-release": "^0.3.0",
"shx": "^0.2.0",
"shx": "^0.3.3",
"travis-check-changes": "^0.2.0"
},
"optionalDependencies": {},
"engines": {
"node": ">=6"
"node": ">=8"
}
}
8 changes: 5 additions & 3 deletions scripts/check-node-support.js
Expand Up @@ -8,8 +8,8 @@ var yaml = require('js-yaml');
var shell = require('..');

// This is the authoritative list of supported node versions.
var MIN_NODE_VERSION = 6;
var MAX_NODE_VERSION = 13;
var MIN_NODE_VERSION = 8;
var MAX_NODE_VERSION = 14;

function checkReadme(minNodeVersion) {
var start = '<!-- start minVersion -->';
Expand All @@ -20,7 +20,7 @@ function checkReadme(minNodeVersion) {
);
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 Expand Up @@ -81,6 +81,8 @@ try {
var appveyorFileName = path.join(__dirname, '..', 'appveyor.yml');
var appveyorYaml = yaml.safeLoad(shell.cat(appveyorFileName));
checkAppveyor(MIN_NODE_VERSION, MAX_NODE_VERSION, appveyorYaml);
console.log('All files look good (this project supports v'
+ MIN_NODE_VERSION + '-v' + MAX_NODE_VERSION + ')!');
} catch (e) {
console.error('Please check the files which declare our Node version');
console.error('support, as something is out-of-sync. This script failed');
Expand Down

0 comments on commit 5d73b5b

Please sign in to comment.