Skip to content

Commit

Permalink
fix: supported version implementation update linting & test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyclarke committed Feb 25, 2020
1 parent 28c3d40 commit d383adb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 0 additions & 10 deletions lib/utils/unsupported.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ exports.checkForBrokenNode = function () {
var nodejs = checkVersion(process.version)
if (nodejs.broken) {
console.error('ERROR: npm is known not to run on Node.js ' + process.version)
supportedNode.forEach(function (rel) {
if (semver.satisfies(nodejs.version, rel.ver)) {
console.error('Node.js ' + rel.ver + " is supported but the specific version you're running has")
console.error('a bug known to break npm. Please update to at least ' + rel.min + ' to use this')
console.error('version of npm. You can find the latest release of Node.js at https://nodejs.org/')
process.exit(1)
}
})
var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
console.error("You'll need to upgrade to a newer Node.js version in order to use this")
console.error('version of npm. You can find the latest version at https://nodejs.org/')
process.exit(1)
Expand All @@ -35,7 +26,6 @@ exports.checkForUnsupportedNode = function () {
var nodejs = checkVersion(process.version)
if (nodejs.unsupported) {
var log = require('npmlog')
var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ')
log.warn('npm', 'npm does not support Node.js ' + process.version)
log.warn('npm', 'You should probably upgrade to a newer version of node as we')
log.warn('npm', "can't make any promises that npm will work with this version.")
Expand Down
3 changes: 2 additions & 1 deletion test/tap/unsupported.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ var versions = [
['v9.3.0', false, false],
['v10.0.0-0', false, false],
['v11.0.0-0', false, false],
['v12.0.0-0', false, false]
['v12.0.0-0', false, false],
['v13.0.0-0', false, false]
]

test('versions', function (t) {
Expand Down

0 comments on commit d383adb

Please sign in to comment.