Browse Source

refactor

change var to const for consitency in file
tags/v4.17.0
Eugen Cazacu 1 year ago
parent
commit
1cd8b8ba07
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      setup/setup.js

+ 1
- 1
setup/setup.js View File

@@ -47,7 +47,7 @@ function checkSymlinkExistsAsync() {
}

function ensureYarnInstalledAsync() {
var semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/;
const semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/;
return execGetOutput("yarn", ["-v"], "Check yarn version")
.then(stdout => semverPattern.test(stdout), () => false)
.then(hasYarn => hasYarn || installYarnAsync());

Loading…
Cancel
Save