mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
refactor: matchesSemver -> matches
This commit is contained in:
parent
63f2669153
commit
7f8dd25a97
3 changed files with 6 additions and 11 deletions
|
@ -8,7 +8,7 @@ const {
|
|||
isStable,
|
||||
isUnstable,
|
||||
isPinnedVersion,
|
||||
matchesSemver,
|
||||
matches,
|
||||
maxSatisfyingVersion,
|
||||
minSatisfyingVersion,
|
||||
parseRange,
|
||||
|
@ -134,9 +134,7 @@ function determineUpgrades(npmDep, config) {
|
|||
// Filter out older versions as we can't upgrade to those
|
||||
.filter(version => isGreaterThan(version, fromVersion))
|
||||
// fillter out non-allowed versions if preference is set
|
||||
.reject(
|
||||
version => allowedVersions && !matchesSemver(version, allowedVersions)
|
||||
)
|
||||
.reject(version => allowedVersions && !matches(version, allowedVersions))
|
||||
// Ignore unstable versions, unless the current version is unstable
|
||||
.reject(
|
||||
version =>
|
||||
|
|
|
@ -15,7 +15,7 @@ const {
|
|||
minSatisfying: minSatisfyingVersion,
|
||||
minor: getMinor,
|
||||
patch: getPatch,
|
||||
satisfies: matchesSemver,
|
||||
satisfies: matches,
|
||||
valid: isPinnedVersion,
|
||||
} = semver;
|
||||
|
||||
|
@ -42,7 +42,7 @@ module.exports = {
|
|||
isUnstable,
|
||||
isValidSemver,
|
||||
isPinnedVersion,
|
||||
matchesSemver,
|
||||
matches,
|
||||
maxSatisfyingVersion,
|
||||
minSatisfyingVersion,
|
||||
parseRange,
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
const {
|
||||
matchesSemver,
|
||||
isPinnedVersion,
|
||||
} = require('../../../versioning/semver');
|
||||
const { matches, isPinnedVersion } = require('../../../versioning/semver');
|
||||
const ghGot = require('../../../platform/github/gh-got-wrapper');
|
||||
|
||||
module.exports = {
|
||||
|
@ -96,7 +93,7 @@ async function getChangeLogJSON({
|
|||
for (let i = 1; i < versions.length; i += 1) {
|
||||
const prev = versions[i - 1];
|
||||
const next = versions[i];
|
||||
if (matchesSemver(next.version, semverString)) {
|
||||
if (matches(next.version, semverString)) {
|
||||
const release = {
|
||||
version: next.version,
|
||||
date: next.date,
|
||||
|
|
Loading…
Reference in a new issue