diff --git a/lib/util.js b/lib/util.js index 2196c36a..386db8ff 100644 --- a/lib/util.js +++ b/lib/util.js @@ -75,7 +75,7 @@ const hasAccess = path => { const parseVersion = raw => { if (!raw) return { version: null, isPreRelease: false, preReleaseId: null }; const version = semver.valid(raw) ? raw : semver.coerce(raw); - const parsed = new semver(version); + const parsed = semver.parse(version); const isPreRelease = parsed.prerelease.length > 0; const preReleaseId = isPreRelease && isNaN(parsed.prerelease[0]) ? parsed.prerelease[0] : null; return { diff --git a/package.json b/package.json index b61310c5..9627b8a5 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "mime-types": "2.1.25", "ora": "4.0.3", "os-name": "3.1.0", - "semver": "6.3.0", + "semver": "7.1.3", "shell-quote": "1.7.2", "shelljs": "0.8.3", "supports-color": "7.1.0",