Skip to content

Commit 26da22c

Browse files
committed
chore: drop non-LTS node versions
No change to logic. This drops support for non-LTS versions and it also drops everything before node v18 (this will be required anyway for shelljs v0.9).
1 parent c787042 commit 26da22c

File tree

3 files changed

+7
-41
lines changed

3 files changed

+7
-41
lines changed

.github/workflows/main.yml

-37
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: CI
22
on:
33
- push
44
- pull_request
5-
env:
6-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
75
jobs:
86
test:
97
name: Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
@@ -12,48 +10,13 @@ jobs:
1210
fail-fast: false
1311
matrix:
1412
node-version:
15-
- 6
16-
- 7
17-
- 8
18-
- 9
19-
- 10
20-
- 11
21-
- 12
22-
- 13
23-
- 14
24-
- 15
25-
- 16
26-
- 17
2713
- 18
28-
- 19
2914
- 20
30-
- 21
3115
- 22
3216
os:
3317
- ubuntu-latest
3418
- macos-latest
3519
- windows-latest
36-
exclude:
37-
- node-version: 6
38-
os: macos-latest
39-
- node-version: 7
40-
os: macos-latest
41-
- node-version: 8
42-
os: macos-latest
43-
- node-version: 9
44-
os: macos-latest
45-
- node-version: 10
46-
os: macos-latest
47-
- node-version: 11
48-
os: macos-latest
49-
- node-version: 12
50-
os: macos-latest
51-
- node-version: 13
52-
os: macos-latest
53-
- node-version: 14
54-
os: macos-latest
55-
- node-version: 15
56-
os: macos-latest
5720
steps:
5821
- uses: actions/checkout@v4
5922
- uses: actions/setup-node@v4

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
commands, providing an easy solution for simple Unix-like, cross-platform
1010
commands in npm package scripts.
1111

12-
`shx` is proudly tested on every node release since <!-- start minVersion -->`v6`<!-- stop minVersion -->!
12+
`shx` is proudly tested on every LTS node release since <!-- start minVersion -->`v18`<!-- stop minVersion -->!
1313

1414
## Difference Between ShellJS and shx
1515

scripts/check-node-support.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var yaml = require('js-yaml');
88
var shell = require('shelljs');
99

1010
// This is the authoritative list of supported node versions.
11-
var MIN_NODE_VERSION = 6;
11+
var MIN_NODE_VERSION = 18;
1212
var MAX_NODE_VERSION = 22;
1313

1414
function checkReadme(minNodeVersion) {
@@ -44,7 +44,10 @@ function assertDeepEquals(arr1, arr2, msg) {
4444

4545
function range(start, stop) {
4646
var ret = [];
47-
for (var i = start; i <= stop; i++) {
47+
for (var i = start; i <= stop; i += 2) {
48+
if (i % 2 !== 0) {
49+
console.warn('Warning: testing a non-LTS nodejs release: ' + i);
50+
}
4851
ret.push(i);
4952
}
5053
return ret;
@@ -68,7 +71,7 @@ try {
6871
var githubActionsYaml = yaml.safeLoad(shell.cat(githubActionsFileName));
6972
checkGithubActions(MIN_NODE_VERSION, MAX_NODE_VERSION, githubActionsYaml);
7073

71-
console.log('All files look good (this project supports v'
74+
console.log('All files look good (this project supports LTS releases v'
7275
+ MIN_NODE_VERSION + '-v' + MAX_NODE_VERSION + ')!');
7376
} catch (e) {
7477
console.error('Please check the files which declare our Node version');

0 commit comments

Comments
 (0)