mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
fix(clojure): Prioritize Maven-based deps over git-based ones (#15720)
This commit is contained in:
parent
f86f9f5e75
commit
c18c55e97c
5 changed files with 30 additions and 9 deletions
|
@ -3,6 +3,7 @@
|
|||
,,,,persistent-sorted-set,{:mvn/version,"0.1.2"}
|
||||
invalid/package! {:mvn/version "1.2.3"}
|
||||
invalid/version nil
|
||||
io.github.nextjournal/clerk {:mvn/version "0.7.418"}
|
||||
}
|
||||
|
||||
:aliases {
|
||||
|
|
|
@ -14,6 +14,18 @@ Array [
|
|||
],
|
||||
"replaceString": "{:mvn/version,\\"0.1.2\\"}",
|
||||
},
|
||||
Object {
|
||||
"currentValue": "0.7.418",
|
||||
"datasource": "clojure",
|
||||
"depName": "io.github.nextjournal/clerk",
|
||||
"packageName": "io.github.nextjournal:clerk",
|
||||
"registryUrls": Array [
|
||||
"https://deps.com/foo/bar",
|
||||
"https://my.auth.com/repo",
|
||||
"s3://my-bucket/maven/releases",
|
||||
],
|
||||
"replaceString": "{:mvn/version \\"0.7.418\\"}",
|
||||
},
|
||||
Object {
|
||||
"currentValue": "1.9.0",
|
||||
"datasource": "clojure",
|
||||
|
|
|
@ -123,6 +123,9 @@ Object {
|
|||
"mvn/version": "1.2.3",
|
||||
},
|
||||
"invalid/version": "nil",
|
||||
"io.github.nextjournal/clerk": Object {
|
||||
"mvn/version": "0.7.418",
|
||||
},
|
||||
"persistent-sorted-set": Object {
|
||||
"mvn/version": "0.1.2",
|
||||
},
|
||||
|
|
|
@ -20,6 +20,11 @@ describe('modules/manager/deps-edn/extract', () => {
|
|||
's3://my-bucket/maven/releases',
|
||||
],
|
||||
},
|
||||
{
|
||||
depName: 'io.github.nextjournal/clerk',
|
||||
currentValue: '0.7.418',
|
||||
datasource: 'clojure',
|
||||
},
|
||||
{ depName: 'org.clojure/clojure', currentValue: '1.9.0' },
|
||||
{ depName: 'org.clojure/clojure', currentValue: '1.10.0' },
|
||||
{ depName: 'org.clojure/clojurescript', currentValue: '1.10.520' },
|
||||
|
|
|
@ -151,6 +151,15 @@ function extractDependency(
|
|||
dep.depType = depType;
|
||||
}
|
||||
|
||||
const mvnVersion = val['mvn/version'];
|
||||
if (is.string(mvnVersion)) {
|
||||
dep.datasource = ClojureDatasource.id;
|
||||
dep.currentValue = mvnVersion;
|
||||
dep.packageName = packageName.replace('/', ':');
|
||||
dep.registryUrls = [...mavenRegistries];
|
||||
return dep;
|
||||
}
|
||||
|
||||
resolveGitPackageFromEdnVal(dep, val);
|
||||
resolveGitPackageFromEdnKey(dep, key);
|
||||
|
||||
|
@ -169,15 +178,6 @@ function extractDependency(
|
|||
return dep;
|
||||
}
|
||||
|
||||
const mvnVersion = val['mvn/version'];
|
||||
if (is.string(mvnVersion)) {
|
||||
dep.datasource = ClojureDatasource.id;
|
||||
dep.currentValue = mvnVersion;
|
||||
dep.packageName = packageName.replace('/', ':');
|
||||
dep.registryUrls = [...mavenRegistries];
|
||||
return dep;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue