[Build] Update dependencies
Fix some reports from "Show Vulnerable Dependencies" ^KTI-1342
This commit is contained in:
committed by
Space Team
parent
62a6bb1a31
commit
dbb5072a26
@@ -85,11 +85,11 @@ dependencies {
|
||||
testImplementation(kotlinStdlib("jdk8"))
|
||||
testImplementation(project(":kotlin-parcelize-compiler"))
|
||||
testImplementation(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-test-host"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-core"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-cio"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-netty"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-mock"))
|
||||
testImplementation(libs.ktor.client.cio)
|
||||
testImplementation(libs.ktor.client.mock)
|
||||
testImplementation(libs.ktor.server.core)
|
||||
testImplementation(libs.ktor.server.netty)
|
||||
testImplementation(libs.ktor.server.test.host)
|
||||
|
||||
testImplementation(gradleApi())
|
||||
testImplementation(gradleTestKit())
|
||||
|
||||
@@ -3,8 +3,9 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("io.ktor:ktor-client-cio:1.4.0")
|
||||
implementation(commonDependency("com.google.code.gson:gson"))
|
||||
implementation(kotlinStdlib("jdk8"))
|
||||
implementation(libs.ktor.client.cio)
|
||||
implementation(libs.gson)
|
||||
implementation("org.apache.velocity:velocity:1.7")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0")
|
||||
}
|
||||
|
||||
+6
-4
@@ -8,14 +8,16 @@ package org.jetbrains.kotlin.generators.gradle.targets.js
|
||||
data class Package(
|
||||
val name: String,
|
||||
val version: String,
|
||||
val displayName: String
|
||||
val displayName: String,
|
||||
) {
|
||||
// Used in velocity template
|
||||
@Suppress("unused")
|
||||
fun camelize(): String =
|
||||
displayName
|
||||
.split("-")
|
||||
.mapIndexed { index, item -> if (index == 0) item else item.capitalize() }
|
||||
.mapIndexed { index, item ->
|
||||
if (index == 0) item else item.replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }
|
||||
}
|
||||
.joinToString("")
|
||||
}
|
||||
|
||||
@@ -28,13 +30,13 @@ sealed class PackageInformation {
|
||||
data class RealPackageInformation(
|
||||
override val name: String,
|
||||
override val versions: Set<String>,
|
||||
override val displayName: String = name
|
||||
override val displayName: String = name,
|
||||
) : PackageInformation()
|
||||
|
||||
data class HardcodedPackageInformation(
|
||||
override val name: String,
|
||||
val version: String,
|
||||
override val displayName: String = name
|
||||
override val displayName: String = name,
|
||||
) : PackageInformation() {
|
||||
override val versions: Set<String> = setOf(version)
|
||||
}
|
||||
+2
-1
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.generators.gradle.targets.js
|
||||
import com.google.gson.Gson
|
||||
import io.ktor.client.*
|
||||
import io.ktor.client.request.*
|
||||
import io.ktor.client.statement.*
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import java.io.UnsupportedEncodingException
|
||||
@@ -65,7 +66,7 @@ class VersionFetcher : AutoCloseable {
|
||||
else
|
||||
encodeURIComponent(packageName)
|
||||
|
||||
return client.get("http://registry.npmjs.org/$packagePath")
|
||||
return client.get("http://registry.npmjs.org/$packagePath").bodyAsText()
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
|
||||
Reference in New Issue
Block a user