Skip to content

Commit d383adb

Browse files
committed
fix: supported version implementation update linting & test coverage
1 parent 28c3d40 commit d383adb

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

lib/utils/unsupported.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ exports.checkForBrokenNode = function () {
1616
var nodejs = checkVersion(process.version)
1717
if (nodejs.broken) {
1818
console.error('ERROR: npm is known not to run on Node.js ' + process.version)
19-
supportedNode.forEach(function (rel) {
20-
if (semver.satisfies(nodejs.version, rel.ver)) {
21-
console.error('Node.js ' + rel.ver + " is supported but the specific version you're running has")
22-
console.error('a bug known to break npm. Please update to at least ' + rel.min + ' to use this')
23-
console.error('version of npm. You can find the latest release of Node.js at https://nodejs.org/')
24-
process.exit(1)
25-
}
26-
})
27-
var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
2819
console.error("You'll need to upgrade to a newer Node.js version in order to use this")
2920
console.error('version of npm. You can find the latest version at https://nodejs.org/')
3021
process.exit(1)
@@ -35,7 +26,6 @@ exports.checkForUnsupportedNode = function () {
3526
var nodejs = checkVersion(process.version)
3627
if (nodejs.unsupported) {
3728
var log = require('npmlog')
38-
var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
3929
log.warn('npm', 'npm does not support Node.js ' + process.version)
4030
log.warn('npm', 'You should probably upgrade to a newer version of node as we')
4131
log.warn('npm', "can't make any promises that npm will work with this version.")

test/tap/unsupported.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ var versions = [
3030
['v9.3.0', false, false],
3131
['v10.0.0-0', false, false],
3232
['v11.0.0-0', false, false],
33-
['v12.0.0-0', false, false]
33+
['v12.0.0-0', false, false],
34+
['v13.0.0-0', false, false]
3435
]
3536

3637
test('versions', function (t) {

0 commit comments

Comments
 (0)