def select()

in modules/core/src/main/scala/org/scalasteward/core/edit/update/Selector.scala [38:64]


  def select(
      update: Update.Single,
      versionPositions: List[VersionPosition],
      modulePositions: List[ModulePosition]
  ): List[Substring.Replacement] = {
    val matchingVersionPositions =
      List(
        dependencyDefPositions(update.dependencies, versionPositions),
        scalaValInDependencyDefPositions(versionPositions, modulePositions),
        millVersionPositions(update, versionPositions),
        sbtVersionPositions(update, versionPositions),
        scalafmtVersionPositions(update, versionPositions)
      ).flatten #::
        matchingSearchTerms(heuristic1SearchTerms(update), versionPositions) #::
        matchingSearchTerms(heuristic2SearchTerms(update), versionPositions) #::
        matchingSearchTerms(heuristic3SearchTerms(update), versionPositions) #::
        matchingSearchTerms(heuristic4SearchTerms(update), versionPositions) #::
        matchingSearchTerms(heuristic5SearchTerms(update), versionPositions) #::
        LazyList.empty

    val versionReplacements = matchingVersionPositions
      .find(_.nonEmpty)
      .getOrElse(List.empty)
      .map(_.version.replaceWith(update.nextVersion.value))

    versionReplacements ++ moduleReplacements(update, modulePositions)
  }