fix: handle configure script in node 10.11+

This commit is contained in:
calebboyd
2018-10-20 11:23:12 -05:00
parent 129c2f86a0
commit 0db8122f8f
5 changed files with 75 additions and 23 deletions
+12
View File
@@ -81,9 +81,21 @@ function isDirectoryAsync(path: string) {
.catch(falseOnEnoent)
}
function semverGt(version: string, operand: string) {
const [cMajor, cMinor, cPatch] = version.split('.').map(Number)
const [major, minor, patch] = operand.split('.').map(Number)
return (
cMajor > major ||
(cMajor === major && cMinor > minor) ||
(cMajor === major && cMinor === minor && cPatch > patch)
)
}
export {
dequote,
padRight,
semverGt,
bound,
isWindows,
rimrafAsync,