Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
BREAKING: Drop Node 12
Browse files Browse the repository at this point in the history
Will fail silently on non-supported versions.

Reason: The ecosystem is moving to >=14 as Node 12 is soon out of LTS so more and more modules has that as its minimum requirement, making it hard to claim to support more.
  • Loading branch information
voxpelli committed Feb 22, 2022
1 parent 8d37073 commit e88ae34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

'use strict'

if (require('./package.json').engines.node !== '^12.20.0 || ^14.13.1 || >=16.0.0') {
if (require('./package.json').engines.node !== '^14.17.0 || >=16.0.0') {
console.error('dependency-check: Mismatch between package.json node engine and cli engine check')
process.exit(1)
}
Expand All @@ -12,9 +12,9 @@ var match = process.version.match(/v(\d+)\.(\d+)/) || []
var major = parseInt(match[1] || '', 10)
var minor = parseInt(match[2] || '', 10)

if (major >= 12 || (major === 12 && minor >= 20)) {
if (major > 14 || (major === 14 && minor >= 17)) {
require('./lib/cli-engine')
} else {
console.error('dependency-check: Node 12.20.0 or greater is required. `dependency-check` did not run.')
console.error('dependency-check: Node 14.17.0 or greater is required. `dependency-check` did not run.')
process.exit(0)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"test": "run-s check test:*"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.17.0 || >=16.0.0"
},
"author": "max ogden",
"dependencies": {
Expand Down

0 comments on commit e88ae34

Please sign in to comment.