fix(sbt): Parse version lines with classifier keyword (#6780)

This commit is contained in:
Sergio Zharinov 2020-07-18 17:31:53 +04:00 committed by GitHub
parent e3da371a0e
commit 1d33e20888
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 1 deletions

View file

@ -7,6 +7,7 @@ libraryDependencies ++= Seq(
"org.example" %% "baz" % "0.0.3",
"org.example" % "qux" % "0.0.4"
)
libraryDependencies += ("org.scala-lang" % "scala-library" % "2.13.3" classifier "sources") % Test
dependencyOverrides += "org.example" % "quux" % "0.0.5"
dependencyOverrides ++= {

View file

@ -109,6 +109,21 @@ Object {
"https://example.com/repos/5/",
],
},
Object {
"currentValue": "2.13.3",
"datasource": "sbt-package",
"depName": "org.scala-lang:scala-library",
"depType": "sources",
"lookupName": "org.scala-lang:scala-library",
"registryUrls": Array [
"https://repo.maven.apache.org/maven2",
"https://example.com/repos/1/",
"https://example.com/repos/2/",
"https://example.com/repos/3/",
"https://example.com/repos/4/",
"https://example.com/repos/5/",
],
},
Object {
"currentValue": "0.0.5",
"datasource": "sbt-package",

View file

@ -113,7 +113,11 @@ function parseDepExpr(
? str.replace(/^"/, '').replace(/"$/, '')
: variables[str].val;
const tokens = expr.trim().split(/\s*(%%?)\s*/);
const tokens = expr
.trim()
.replace(/[()]/g, '')
.split(/\s*(%%?)\s*|\s*classifier\s*/);
const [
rawGroupId,
groupOp,