Skip to content

Commit

Permalink
fix(linting): no-unused-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed May 2, 2024
1 parent ad8ff11 commit c570a34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
19 changes: 5 additions & 14 deletions bin/semver.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ const main = () => {
return fail()
}
}
return success(versions)
versions
.sort((a, b) => semver[reverse ? 'rcompare' : 'compare'](a, b, options))
.map(v => semver.clean(v, options))
.map(v => inc ? semver.inc(v, inc, options, identifier, identifierBase) : v)
.forEach(v => console.log(v))
}

const failInc = () => {
Expand All @@ -129,19 +133,6 @@ const failInc = () => {

const fail = () => process.exit(1)

const success = () => {
const compare = reverse ? 'rcompare' : 'compare'
versions.sort((a, b) => {
return semver[compare](a, b, options)
}).map((v) => {
return semver.clean(v, options)
}).map((v) => {
return inc ? semver.inc(v, inc, options, identifier, identifierBase) : v
}).forEach((v, i, _) => {
console.log(v)
})
}

const help = () => console.log(
`SemVer ${version}
Expand Down
3 changes: 2 additions & 1 deletion classes/range.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,10 @@ const replaceGTE0 = (comp, options) => {
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
// TODO build?
const hyphenReplace = incPr => ($0,
from, fM, fm, fp, fpr, fb,
to, tM, tm, tp, tpr, tb) => {
to, tM, tm, tp, tpr) => {
if (isX(fM)) {
from = ''
} else if (isX(fm)) {
Expand Down

0 comments on commit c570a34

Please sign in to comment.