mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
parent
7feca361af
commit
188f1d90b6
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,6 @@
|
||||||
const ghGot = require('../platform/github/gh-got-wrapper');
|
const ghGot = require('../platform/github/gh-got-wrapper');
|
||||||
const versioning = require('../versioning');
|
const versioning = require('../versioning');
|
||||||
|
|
||||||
const { isVersion } = versioning('semver');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getDependency,
|
getDependency,
|
||||||
};
|
};
|
||||||
|
@ -49,6 +47,8 @@ async function getDependency(repo, options = {}) {
|
||||||
if (!versions) {
|
if (!versions) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Filter by semver if no versionScheme provided
|
||||||
|
const { isVersion } = versioning(options.versionScheme || 'semver');
|
||||||
versions = versions.filter(version => isVersion(version));
|
versions = versions.filter(version => isVersion(version));
|
||||||
if (options.clean === 'true') {
|
if (options.clean === 'true') {
|
||||||
versions = versions.map(version => version.replace(/^v/, ''));
|
versions = versions.map(version => version.replace(/^v/, ''));
|
||||||
|
|
Loading…
Reference in a new issue