mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2026-11-26 18:30:54 +01:00
chore(deps): Bump semver from 7.8.3 to 7.8.5 (#128)
Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org>
This commit is contained in:
1 parent
19d3fc38c4
commit
cb2c66ad3c
3 files changed
+20
-7
No files matched your search
Vendored
+15
-2
@@ -433,6 +433,11 @@ const parseComparator = (comp, options) => {
|
||||
|
||||
const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
|
||||
|
||||
const invalidXRangeOrder = (M, m, p) => (
|
||||
(isX(M) && !isX(m)) ||
|
||||
(isX(m) && p && !isX(p))
|
||||
)
|
||||
|
||||
// ~, ~> --> * (any, kinda silly)
|
||||
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
|
||||
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
|
||||
@@ -450,6 +455,10 @@ const replaceTildes = (comp, options) => {
|
||||
|
||||
const replaceTilde = (comp, options) => {
|
||||
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
||||
// if we're including prereleases in the match, then the lower bound is
|
||||
// -0, the lowest possible prerelease value, just like x-ranges and carets.
|
||||
// this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.
|
||||
const z = options.includePrerelease ? '-0' : ''
|
||||
return comp.replace(r, (_, M, m, p, pr) => {
|
||||
debug('tilde', comp, _, M, m, p, pr)
|
||||
let ret
|
||||
@@ -457,10 +466,10 @@ const replaceTilde = (comp, options) => {
|
||||
if (isX(M)) {
|
||||
ret = ''
|
||||
} else if (isX(m)) {
|
||||
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
|
||||
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
|
||||
} else if (isX(p)) {
|
||||
// ~1.2 == >=1.2.0 <1.3.0-0
|
||||
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
|
||||
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
|
||||
} else if (pr) {
|
||||
debug('replaceTilde pr', pr)
|
||||
ret = `>=${M}.${m}.${p}-${pr
|
||||
@@ -558,6 +567,10 @@ const replaceXRange = (comp, options) => {
|
||||
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
||||
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
||||
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
||||
if (invalidXRangeOrder(M, m, p)) {
|
||||
return comp
|
||||
}
|
||||
|
||||
const xM = isX(M)
|
||||
const xm = xM || isX(m)
|
||||
const xp = xm || isX(p)
|
||||
|
||||
Generated
+4
-4
@@ -14,7 +14,7 @@
|
||||
"@actions/http-client": "4.0.1",
|
||||
"@actions/io": "^3.0.2",
|
||||
"@actions/tool-cache": "^4.0.0",
|
||||
"semver": "^7.8.3"
|
||||
"semver": "^7.8.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/ncc": "0.38.4",
|
||||
@@ -6236,9 +6236,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.8.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.3.tgz",
|
||||
"integrity": "sha512-wnilbGyMxzbY7dNOl7jpKbLSjcfeweJWU5j4+u5qW+6/wuGD9KzIGOyZnQVSBM9E7DtWaaH3CyHkppYrKYoxwg==",
|
||||
"version": "7.8.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
|
||||
"integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
"@actions/http-client": "4.0.1",
|
||||
"@actions/io": "^3.0.2",
|
||||
"@actions/tool-cache": "^4.0.0",
|
||||
"semver": "^7.8.3"
|
||||
"semver": "^7.8.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/ncc": "0.38.4",
|
||||
|
||||
Reference in new issue
Block a user