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 v11 - 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 adds a small logging statement to the check-node-support script.

Test: npm run check-node-support
  • Loading branch information
nfischer committed Oct 26, 2020
1 parent 43516c2 commit c7ea057
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +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
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 -->`v6`<!-- stop minVersion -->!
`shx` is proudly tested on every node release since <!-- start minVersion -->`v8`<!-- stop minVersion -->!

## Difference Between ShellJS and shx

Expand Down
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +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
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.4"
},
"engines": {
"node": ">=6"
"node": ">=8"
}
}
6 changes: 4 additions & 2 deletions scripts/check-node-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ var yaml = require('js-yaml');
var shell = require('shelljs');

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

function checkReadme(minNodeVersion) {
var start = '<!-- start minVersion -->';
Expand Down Expand Up @@ -78,6 +78,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 c7ea057

Please sign in to comment.