Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarcy Clarke <darcy@darcyclarke.me>2020-02-25 21:35:48 +0300
committerDarcy Clarke <darcy@darcyclarke.me>2020-02-25 21:36:21 +0300
commitd383adb69cdfbcbe183a356314e021da5cc4d3c8 (patch)
treef5f154f505f6e4861617bc0e712e9b78fedf8626
parent28c3d40d65eef63f9d6ccb60b99ac57f5057a46e (diff)
fix: supported version implementation update linting & test coverage
-rw-r--r--lib/utils/unsupported.js10
-rw-r--r--test/tap/unsupported.js3
2 files changed, 2 insertions, 11 deletions
diff --git a/lib/utils/unsupported.js b/lib/utils/unsupported.js
index b0cda8a86..c78cdcbc2 100644
--- a/lib/utils/unsupported.js
+++ b/lib/utils/unsupported.js
@@ -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)
@@ -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.")
diff --git a/test/tap/unsupported.js b/test/tap/unsupported.js
index deae8d3c0..2ebbd2d65 100644
--- a/test/tap/unsupported.js
+++ b/test/tap/unsupported.js
@@ -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) {