mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-17 08:52:37 +00:00
make run build
This commit is contained in:
parent
2d9682eee7
commit
1361f28e6b
1 changed files with 24 additions and 5 deletions
29
dist/index.js
vendored
29
dist/index.js
vendored
|
|
@ -19047,6 +19047,7 @@ const isSatisfiable = (comparators, options) => {
|
|||
// already replaced the hyphen ranges
|
||||
// turn into a set of JUST comparators.
|
||||
const parseComparator = (comp, options) => {
|
||||
comp = comp.replace(re[t.BUILD], '')
|
||||
debug('comp', comp, options)
|
||||
comp = replaceCarets(comp, options)
|
||||
debug('caret', comp)
|
||||
|
|
@ -19467,11 +19468,25 @@ class SemVer {
|
|||
other = new SemVer(other, this.options)
|
||||
}
|
||||
|
||||
return (
|
||||
compareIdentifiers(this.major, other.major) ||
|
||||
compareIdentifiers(this.minor, other.minor) ||
|
||||
compareIdentifiers(this.patch, other.patch)
|
||||
)
|
||||
if (this.major < other.major) {
|
||||
return -1
|
||||
}
|
||||
if (this.major > other.major) {
|
||||
return 1
|
||||
}
|
||||
if (this.minor < other.minor) {
|
||||
return -1
|
||||
}
|
||||
if (this.minor > other.minor) {
|
||||
return 1
|
||||
}
|
||||
if (this.patch < other.patch) {
|
||||
return -1
|
||||
}
|
||||
if (this.patch > other.patch) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
comparePre (other) {
|
||||
|
|
@ -20372,6 +20387,10 @@ module.exports = debug
|
|||
|
||||
const numeric = /^[0-9]+$/
|
||||
const compareIdentifiers = (a, b) => {
|
||||
if (typeof a === 'number' && typeof b === 'number') {
|
||||
return a === b ? 0 : a < b ? -1 : 1
|
||||
}
|
||||
|
||||
const anum = numeric.test(a)
|
||||
const bnum = numeric.test(b)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue