Skip to content

Commit

Permalink
upgrade deps and adapt (#342)
Browse files Browse the repository at this point in the history
* upgrade deps and adapt

* fix updateDependencies.sh

* fmt
  • Loading branch information
mpollmeier authored Apr 19, 2024
1 parent 2d893db commit 62ef84f
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val cpgVersion = "1.4.25"
val joernVersion = "2.0.140"
val cpgVersion = "1.6.11"
val joernVersion = "2.0.335"

val gitCommitString = SettingKey[String]("gitSha")

Expand All @@ -16,7 +16,7 @@ Global / excludeLintKeys += Fast / configuration
Global / excludeLintKeys += gitCommitString

lazy val commonSettings = Seq(
scalaVersion := "3.3.1",
scalaVersion := "3.4.1",
organization := "io.shiftleft",
scalacOptions ++= Seq("-Xtarget:8"),
resolvers ++= Seq(
Expand All @@ -35,7 +35,7 @@ lazy val commonSettings = Seq(
"org.apache.logging.log4j" % "log4j-slf4j2-impl" % "2.20.0" % Optional,
"org.apache.logging.log4j" % "log4j-core" % "2.20.0" % Optional,
"io.joern" %% "x2cpg" % joernVersion % Test classifier "tests",
"org.scalatest" %% "scalatest" % "3.2.17" % Test
"org.scalatest" %% "scalatest" % "3.2.18" % Test
)
)

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.4
sbt.version=1.9.9
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ class AstCreator(diffGraph: DiffGraphBuilder, source: JsSource, usedIdentNodes:
}
}

override def visit(literalNode: LiteralNode[_]): NewNode = {
override def visit(literalNode: LiteralNode[?]): NewNode = {
literalNode match {
case arrayLiteralNode: ArrayLiteralNode =>
createArrayLiteralNode(arrayLiteralNode)
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/io/shiftleft/js2cpg/io/ExternalCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.util.concurrent.ConcurrentLinkedQueue
import scala.sys.process.{Process, ProcessLogger}
import scala.util.{Failure, Success, Try}
import scala.jdk.CollectionConverters._
import org.apache.commons.lang.StringUtils
import org.apache.commons.lang3.StringUtils

object ExternalCommand {

Expand All @@ -21,7 +21,7 @@ object ExternalCommand {
val commands = command.split(COMMAND_AND).toSeq
commands.map { cmd =>
val cmdWithQuotesAroundDir = StringUtils.replace(cmd, inDir, s"'$inDir'")
Try(Process(cmdWithQuotesAroundDir, dir, extraEnv.toList: _*).!(processLogger)).getOrElse(1)
Try(Process(cmdWithQuotesAroundDir, dir, extraEnv.toList *).!(processLogger)).getOrElse(1)
}.sum match {
case 0 =>
Success(stdOutOutput.asScala.mkString(System.lineSeparator()))
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/io/shiftleft/js2cpg/io/FileUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ object FileUtils {
override def visitFile(file: Path, attrs: BasicFileAttributes): FileVisitResult = {
val result = fileCollector.visitFile(file, attrs)
if (!fileCollector.wasExcluded(file)) {
Files.copy(file, newPath(file), copyOptions: _*)
Files.copy(file, newPath(file), copyOptions *)
}
result
}
Expand All @@ -120,7 +120,7 @@ object FileUtils {
}
)
} else {
Files.copy(from.path, destination.path, copyOptions: _*)
Files.copy(from.path, destination.path, copyOptions *)
}
excludedPaths.addAll(fileCollector.excludedPaths)
destination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ abstract class DefaultAstVisitor(lexicalContext: LexicalContext = new LexicalCon
override def leaveLabelNode(labelNode: LabelNode): Node =
super.leaveLabelNode(labelNode)

override def enterLiteralNode(literalNode: LiteralNode[_]): Boolean =
override def enterLiteralNode(literalNode: LiteralNode[?]): Boolean =
super.enterLiteralNode(literalNode)

override def leaveLiteralNode(literalNode: LiteralNode[_]): Node =
override def leaveLiteralNode(literalNode: LiteralNode[?]): Node =
super.leaveLiteralNode(literalNode)

override def enterNameSpaceImportNode(nameSpaceImportNode: NameSpaceImportNode): Boolean =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class GeneralizingAstVisitor[T] extends TranslatorNodeVisitor[LexicalContext, T]
visit(node.asInstanceOf[Statement])
}

def visit(node: LiteralNode[_]): T = {
def visit(node: LiteralNode[?]): T = {
visit(node.asInstanceOf[Expression])
}

Expand Down Expand Up @@ -388,7 +388,7 @@ class GeneralizingAstVisitor[T] extends TranslatorNodeVisitor[LexicalContext, T]
visit(node)
}

override def enterLiteralNode(node: LiteralNode[_]): T = {
override def enterLiteralNode(node: LiteralNode[?]): T = {
visit(node)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/io/shiftleft/js2cpg/parser/JsSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import io.shiftleft.js2cpg.io.FileDefaults._
import io.shiftleft.js2cpg.io.FileUtils
import io.shiftleft.js2cpg.preprocessing.NuxtTranspiler
import io.shiftleft.utils.IOUtils
import org.apache.commons.lang.StringUtils
import org.apache.commons.lang3.StringUtils
import org.slf4j.LoggerFactory

import scala.jdk.CollectionConverters._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory
import com.fasterxml.jackson.databind.ObjectMapper
import io.shiftleft.js2cpg.io.FileDefaults
import io.shiftleft.utils.IOUtils
import org.apache.commons.lang.StringUtils
import org.apache.commons.lang3.StringUtils

import scala.collection.concurrent.TrieMap
import scala.util.Try
Expand Down
2 changes: 1 addition & 1 deletion updateDependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi

declare -A repos=(
[cpg]=https://repo1.maven.org/maven2/io/shiftleft/codepropertygraph-schema_3
[joern]=https://repo1.maven.org/maven2/io/joern/console_2.13
[joern]=https://repo1.maven.org/maven2/io/joern/console_3
)

function latest_version {
Expand Down

0 comments on commit 62ef84f

Please sign in to comment.