Skip to content

Commit

Permalink
Update all non-major dependencies (except core Kotlin) (#2221)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nariman Abdullin <[email protected]>
  • Loading branch information
3 people authored Oct 31, 2023
1 parent 664b859 commit f0e74c5
Show file tree
Hide file tree
Showing 29 changed files with 211 additions and 272 deletions.
50 changes: 25 additions & 25 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@
kotlin = "1.9.10"
jetbrains-annotations = "24.0.1"
save-cli = "0.4.0-SNAPSHOT"
ktor = "2.3.1"
ktor = "2.3.5"
okio = "3.3.0"
serialization = "1.6.0"
kotlinx-datetime = "0.4.1"
kotlinx-coroutines = "1.7.3"
kotlin-wrappers = "1.0.0-pre.566"
spring-boot = "2.7.12"
spring-cloud = "3.1.7"
spring-cloud-kubernetes = "2.1.7"
kafka-client = "3.5.0"
junit = "5.9.3"
kotlin-wrappers = "1.0.0-pre.634"
spring-boot = "2.7.17"
spring-cloud = "3.1.8"
spring-cloud-kubernetes = "2.1.8"
kafka-client = "3.6.0"
junit = "5.10.0"
assertj = "3.24.2"
diktat = "1.2.5"
detekt = "1.23.0"
liquibase-core = "4.22.0"
docker-java = "3.3.1"
jgit = "6.6.0.202305301015-r"
detekt = "1.23.2"
liquibase-core = "4.24.0"
docker-java = "3.3.4"
jgit = "6.7.0.202309050840-r"
mockito = "5.3.1"
mockito-kotlin = "5.0.0"
# only in save-cli
log4j = "2.20.0"
log4j = "2.21.1"
jpa = "1.0.2"
mySql = "8.0.33"
testcontainers = "1.18.3"
testcontainers = "1.19.1"
okhttp3 = "4.11.0"
reckon = "0.18.0"
commons-compress = "1.23.0"
reckon = "0.18.1"
commons-compress = "1.24.0"
zip4j = "2.11.5"
ktoml = "0.5.0"
springdoc = "1.7.0"
kotlinx-cli = "0.3.6"
spotless = "6.19.0"
fabric8 = "6.7.1"
arrow-kt = "1.1.5"
spotless = "6.22.0"
fabric8 = "6.9.1"
arrow-kt = "1.2.1"
publish = "1.3.0"
download = "5.4.0"
cpg = "7.0.0"
download = "5.5.0"
cpg = "7.1.2"
# should be taken from cpg
cpg-neo4j-ogm = { strictly = "4.0.4" }
cpg-neo4j-java-driver = { strictly = "5.6.0" }
aws-sdk = "2.20.84"
cpg-neo4j-ogm = { strictly = "4.0.6" }
cpg-neo4j-java-driver = { strictly = "5.7.0" }
aws-sdk = "2.21.11"
cosv4k = "0.0.14"

[plugins]
Expand All @@ -52,7 +52,7 @@ kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-plugin-jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlin" }
kotlin-plugin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin" }
talaiot-base = { id = "io.github.cdsap.talaiot.plugin.base", version = "2.0.1" }
talaiot-base = { id = "io.github.cdsap.talaiot.plugin.base", version = "2.0.3" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
spotless = { id = "com.diffplug.gradle.spotless", version.ref = "spotless" }
download = { id = "de.undercouch.download", version.ref = "download" }
Expand Down Expand Up @@ -121,7 +121,7 @@ springdoc-openapi-ui = { module = "org.springdoc:springdoc-openapi-ui", version.
springdoc-openapi-webflux-ui = { module = "org.springdoc:springdoc-openapi-webflux-ui", version.ref = "springdoc" }
springdoc-openapi-security = { module = "org.springdoc:springdoc-openapi-security", version.ref = "springdoc" }
springdoc-openapi-kotlin = { module = "org.springdoc:springdoc-openapi-kotlin", version.ref = "springdoc" }
swagger-annotations = { module = "io.swagger.core.v3:swagger-annotations", version = "2.2.11" }
swagger-annotations = { module = "io.swagger.core.v3:swagger-annotations", version = "2.2.18" }

ktor-client-apache = { module = "io.ktor:ktor-client-apache", version.ref = "ktor" }
ktor-client-auth = { module = "io.ktor:ktor-client-auth", version.ref = "ktor" }
Expand Down
4 changes: 2 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"^org\\.neo4j\\:neo4j-ogm-bolt-driver",
"^org\\.neo4j\\:neo4j-ogm-core"
],
"allowedVersions": "4.0.4",
"allowedVersions": "4.0.6",
"groupName": "all non-major dependencies (except core Kotlin)",
"groupSlug": "all-minor-patch"
},
Expand All @@ -48,7 +48,7 @@
"matchPackagePatterns": [
"^org\\.neo4j\\.driver\\:neo4j-java-driver"
],
"allowedVersions": "5.6.0",
"allowedVersions": "5.7.0",
"groupName": "all non-major dependencies (except core Kotlin)",
"groupSlug": "all-minor-patch"
},
Expand Down
2 changes: 1 addition & 1 deletion save-backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
id("com.saveourtool.save.buildutils.code-quality-convention")
// this plugin will generate generateOpenApiDocs task
// running this task, it will write the OpenAPI spec into a backend-api-docs.json file in save-backend dir.
id("org.springdoc.openapi-gradle-plugin") version "1.6.0"
id("org.springdoc.openapi-gradle-plugin") version "1.8.0"
}

openApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ fun main() {
return
}

kotlinext.js.require("../scss/save-frontend.scss") // this is needed for webpack to include resource
kotlinext.js.require("bootstrap") // this is needed for webpack to include bootstrap
kotlinext.js.require<dynamic>("../scss/save-frontend.scss") // this is needed for webpack to include resource
kotlinext.js.require<dynamic>("bootstrap") // this is needed for webpack to include bootstrap
ReactModal.setAppElement(document.getElementById("wrapper") as HTMLElement) // required for accessibility in react-modal

initI18n()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ val requestModalHandler: FC<UserInfoAwarePropsWithChildren> = FC { props ->
div {
className = ClassName("d-flex justify-content-center mt-4")
div {
child(ringLoader)
+ringLoader
span {
className = ClassName("sr-only")
+"Loading..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import react.ChildrenBuilder
* @param classes class names that should be applied to high-level div
*/
fun ChildrenBuilder.markdown(text: String, classes: String? = null) {
child(reactMarkdown(jso {
+reactMarkdown(jso {
this.children = text
this.className = classes
}))
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private fun ChildrenBuilder.displayTestLines(header: String, lines: List<String>
this.rehypePlugins = arrayOf(::rehypeHighlightPlugin)
}
publicTestCard {
child(reactMarkdown(reactMarkdownOptions))
+reactMarkdown(reactMarkdownOptions)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import web.cssom.*
* Graph visualizer based on Sigma and Graphology libs
*/
val sigmaGraphVisualizer: FC<SigmaGraphVisualizerProps> = FC { props ->
kotlinext.js.require("@react-sigma/core/lib/react-sigma.min.css")
kotlinext.js.require<dynamic>("@react-sigma/core/lib/react-sigma.min.css")
val (selectedNodeName, setSelectedNodeName) = useState<String?>(null)
val graphology = kotlinext.js.require("graphology")
val graphology: dynamic = kotlinext.js.require("graphology")
sigmaContainer {
settings = getSigmaContainerSettings()
this.graph = graphology.MultiDirectedGraph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,7 @@ fun <D : RowData, P : TableProps<D>> tableComponent(
val column = header.column
th {
this.className = className
child(
renderHeader(header)
)
+renderHeader(header)
if (column.getCanSort()) {
style = style ?: jso()
style?.cursor = "pointer".unsafeCast<Cursor>()
Expand All @@ -287,7 +285,7 @@ fun <D : RowData, P : TableProps<D>> tableComponent(
tr {
spread(getRowProps(row))
row.getVisibleCells().map { cell ->
child(renderCell(cell))
+renderCell(cell)
}
}
if (row.isExpanded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ external interface TopBarLinksProps : Props {
/**
* The location is needed to change the color of the text.
*/
var location: Location
var location: Location<*>
}

/**
Expand All @@ -104,7 +104,7 @@ data class TopBarLink(

private fun textColor(
hrefAnchor: String,
location: Location,
location: Location<*>,
) = if (location.pathname.endsWith(hrefAnchor) && location.pathname.count { it == '/' } < TOP_BAR_PATH_SEGMENTS_HIGHLIGHT) {
"text-warning"
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ external interface TopBarUrlSplitsProps : Props {
/**
* User location for url analysis.
*/
var location: Location
var location: Location<*>
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const val ALL_LANGS = "all"
*/
@Suppress("MISSING_KDOC_CLASS_ELEMENTS")
external interface AwesomeBenchmarksProps : PropsWithChildren {
var location: Location
var location: Location<*>
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ enum class ContestMenuBar {
external interface ContestViewProps : Props {
var currentUserInfo: UserInfo?
var currentContestName: String?
var location: Location
var location: Location<*>
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class FallbackView : AbstractView<FallbackViewProps, State>(Style.SAVE_LIGHT) {
if (props.withRouterLink == true) {
Navigate {
to = "/"
buttonBuilder("Back to the main page", style = "info") { }
this@render.buttonBuilder("Back to the main page", style = "info") { }
}
} else {
a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ val actionIconClasses: List<String> = listOf("trash-alt")
external interface OrganizationProps : PropsWithChildren {
var organizationName: String
var currentUserInfo: UserInfo?
var location: Location
var location: Location<*>
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ external interface ProjectViewProps : PropsWithChildren {
var owner: String
var name: String
var currentUserInfo: UserInfo?
var location: Location
var location: Location<*>
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ external interface ContestGlobalRatingProps : Props {
/**
* Location for checking change url
*/
var location: Location
var location: Location<*>
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fun ChildrenBuilder.calendar(
onChange: (Date, Event) -> Unit,
handler: ChildrenBuilder.(ReactCalendarProps) -> Unit = {},
) {
kotlinext.js.require("react-calendar/dist/Calendar.css")
kotlinext.js.require<dynamic>("react-calendar/dist/Calendar.css")
ReactCalendar::class.react {
this.onChange = onChange
this.showNeighboringMonth = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import kotlinext.js.require
/**
* Object that manages cookies
*/
val cookie: Cookie = require("js-cookie").unsafeCast<Cookie>()
val cookie: Cookie = require("js-cookie")

/**
* Interface that encapsulates all cookies interactions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ fun cytoscape(
""")
}

val cytoscapeJs = kotlinext.js.require("cytoscape")
val cytoscapeJs: dynamic = kotlinext.js.require("cytoscape")
return cytoscapeJs(options)
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fun ChildrenBuilder.aceBuilder(
onChangeFun: (String) -> Unit,
) {
selectedTheme.require()
kotlinext.js.require("ace-builds/src-min-noconflict/mode-${selectedMode.modeName}")
kotlinext.js.require<dynamic>("ace-builds/src-min-noconflict/mode-${selectedMode.modeName}")

div {
className = ClassName("d-flex justify-content-center flex-fill")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum class AceThemes(val themeName: String) {
/**
* Method that includes required theme
*/
fun require() = kotlinext.js.require("ace-builds/src-min-noconflict/theme-$themeName")
fun require() = kotlinext.js.require<dynamic>("ace-builds/src-min-noconflict/theme-$themeName")
companion object {
/**
* Theme that is recommended to be used everywhere
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ import remix.run.router.Location
* @param url url for comparison
* @return true if [Location.pathname] is not [url], false otherwise
*/
fun Location.not(url: String) = pathname != url
fun Location<*>.not(url: String) = pathname != url

/**
* @param urls list of urls
* @return true of [Location] is not in [urls]
*/
fun Location.notIn(urls: List<String>) = urls.all { not(it) }
fun Location<*>.notIn(urls: List<String>) = urls.all { not(it) }

/**
* @param routes array of [FrontendRoutes]
* @return true of [Location] is not in [FrontendRoutes.path] of [routes]
*/
fun Location.notIn(routes: Array<FrontendRoutes>) = notIn(routes.map { "/$it" })
fun Location<*>.notIn(routes: Array<FrontendRoutes>) = notIn(routes.map { "/$it" })

/**
* @return true if [Location.pathname] starts with `/vuln`, false otherwise
*/
fun Location.isVuln() = this.pathname.startsWith("/vuln")
fun Location<*>.isVuln() = this.pathname.startsWith("/vuln")

/**
* @return true if [Location.pathname] starts with `/settings`, false otherwise
*/
fun Location.isSettings() = this.pathname.startsWith("/$SETTINGS")
fun Location<*>.isSettings() = this.pathname.startsWith("/$SETTINGS")

/**
* @return true if we are on a main (index) page
*/
fun Location.isIndex() = pathname == "/"
fun Location<*>.isIndex() = pathname == "/"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.saveourtool.save.v1

import js.buffer.ArrayBuffer
import js.core.jso
import js.promise.asDeferred
import js.typedarrays.Int8Array
import js.typedarrays.Uint8Array
import org.w3c.dom.url.URLSearchParams
Expand All @@ -22,7 +23,7 @@ import org.w3c.fetch.RequestCredentials
import org.w3c.fetch.RequestInit
import org.w3c.fetch.Response
import web.streams.ReadableStream
import web.streams.ReadableStreamDefaultReadValueResult
import web.streams.ReadableStreamReadValueResult

import kotlin.js.Promise
import kotlinx.browser.window
Expand All @@ -48,7 +49,7 @@ val jsonHeaders = Headers()
*
* @param T the type of the data (usually a byte array).
*/
private typealias ResultAsync<T> = Promise<ReadableStreamDefaultReadValueResult<T>>
private typealias ResultAsync<T> = Promise<ReadableStreamReadValueResult<T>>

/**
* Interface for objects that have access to [requestStatusContext]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun ChildrenBuilder.withNavigate(handler: ChildrenBuilder.(NavigateFunctionConte
* @return a function component
*/
@Suppress("TYPE_ALIAS")
fun withRouter(handler: ChildrenBuilder.(Location, Params) -> Unit): FC<Props> = FC {
fun withRouter(handler: ChildrenBuilder.(Location<*>, Params) -> Unit): FC<Props> = FC {
val location = useLocation()
val params = useParams()
handler(location, params)
Expand Down
Loading

0 comments on commit f0e74c5

Please sign in to comment.