Repository: scala-steward-org/scala-steward
Pull request #2212 (2021-08-31 19:47:25)

Update monocle-core to 3.0.0

codecov[bot]: # [Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org) Report
> Merging [#2212](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org) (8d0f350) into [master](https://codecov.io/gh/scala-steward-org/scala-steward/commit/bde4ce7b90ff5942eeb10c523e46e5bf761dc3f8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org) (bde4ce7) will **not change** coverage.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212/graphs/tree.svg?width=650&height=150&src=pr&token=udzMsc1Dne&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org)](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org)

```diff
@@           Coverage Diff           @@
##           master    #2212   +/-   ##
=======================================
  Coverage   78.18%   78.18%           
=======================================
  Files         131      131           
  Lines        2251     2251           
  Branches       60       60           
=======================================
  Hits         1760     1760           
  Misses        491      491           
```


| [Impacted Files](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org) | Coverage Δ | |
|---|---|---|
| [...ala/org/scalasteward/core/application/Config.scala](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org#diff-bW9kdWxlcy9jb3JlL3NyYy9tYWluL3NjYWxhL29yZy9zY2FsYXN0ZXdhcmQvY29yZS9hcHBsaWNhdGlvbi9Db25maWcuc2NhbGE=) | `97.36% <ø> (ø)` | |
| [...n/scala/org/scalasteward/core/vcs/VCSRepoAlg.scala](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org#diff-bW9kdWxlcy9jb3JlL3NyYy9tYWluL3NjYWxhL29yZy9zY2FsYXN0ZXdhcmQvY29yZS92Y3MvVkNTUmVwb0FsZy5zY2FsYQ==) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org). Last update [bde4ce7...8d0f350](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2212?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org).


Patch:
diff --git a/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala b/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala
index ead4eae5..dfa5a4b0 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala
@@ -86,7 +86,7 @@ final case class Config(
   ): F[AuthenticatedUser] =
     for {
       rootDir <- workspaceAlg.rootDir
-      urlWithUser = util.uri.withUserInfo.set(UserInfo(vcsLogin, None))(vcsApiHost).renderString
+      urlWithUser = util.uri.withUserInfo.replace(UserInfo(vcsLogin, None))(vcsApiHost).renderString
       prompt = s"Password for '$urlWithUser': "
       password <- processAlg.exec(Nel.of(gitCfg.gitAskPass.pathAsString, prompt), rootDir)
     } yield AuthenticatedUser(vcsLogin, password.mkString.trim)
diff --git a/modules/core/src/main/scala/org/scalasteward/core/vcs/VCSRepoAlg.scala b/modules/core/src/main/scala/org/scalasteward/core/vcs/VCSRepoAlg.scala
index d34bbe4a..234c4793 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/vcs/VCSRepoAlg.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/vcs/VCSRepoAlg.scala
@@ -54,5 +54,5 @@ final class VCSRepoAlg[F[_]](config: Config)(implicit
     }
 
   private val withLogin: Uri => Uri =
-    util.uri.withUserInfo.set(UserInfo(config.vcsLogin, None))
+    util.uri.withUserInfo.replace(UserInfo(config.vcsLogin, None))
 }
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 3ac7004b..25ffdf16 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -35,7 +35,7 @@ object Dependencies {
   val jjwtJackson = "io.jsonwebtoken" % "jjwt-jackson" % jjwtApi.revision
   val millVersion = Def.setting(if (scalaBinaryVersion.value == "2.12") "0.6.3" else "0.9.9")
   val millScalalib = Def.setting("com.lihaoyi" %% "mill-scalalib" % millVersion.value)
-  val monocleCore = "com.github.julien-truffaut" %% "monocle-core" % "2.1.0"
+  val monocleCore = "dev.optics" %% "monocle-core" % "3.0.0"
   val munit = "org.scalameta" %% "munit" % "0.7.29"
   val munitCatsEffect = "org.typelevel" %% "munit-cats-effect-3" % "1.0.5"
   val munitScalacheck = "org.scalameta" %% "munit-scalacheck" % munit.revision


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/util/uriTest.scala b/modules/core/src/test/scala/org/scalasteward/core/util/uriTest.scala
index bf3136bf..920509f7 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/util/uriTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/util/uriTest.scala
@@ -8,7 +8,7 @@ class uriTest extends FunSuite {
   test("withUserInfo") {
     val url = uri"https://api.github.com/repos/"
     assertEquals(
-      uri.withUserInfo.set(UserInfo("user", Some("pass")))(url).toString,
+      uri.withUserInfo.replace(UserInfo("user", Some("pass")))(url).toString,
       "https://user:pass@api.github.com/repos/"
     )
   }