Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade deps and adapt #342

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading