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 versioning = require('../versioning');
|
||||
|
||||
const { isVersion } = versioning('semver');
|
||||
|
||||
module.exports = {
|
||||
getDependency,
|
||||
};
|
||||
|
@ -49,6 +47,8 @@ async function getDependency(repo, options = {}) {
|
|||
if (!versions) {
|
||||
return null;
|
||||
}
|
||||
// Filter by semver if no versionScheme provided
|
||||
const { isVersion } = versioning(options.versionScheme || 'semver');
|
||||
versions = versions.filter(version => isVersion(version));
|
||||
if (options.clean === 'true') {
|
||||
versions = versions.map(version => version.replace(/^v/, ''));
|
||||
|
|
Loading…
Reference in a new issue