Skip to content

Commit

Permalink
Update plugin kotlinter to v4.4.0 (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
juul-mobile-bot authored Jul 7, 2024
1 parent a8c78c8 commit 30d8fc6
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 10 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ij_kotlin_allow_trailing_comma_on_call_site = true
ktlint_standard_blank-line-before-declaration = disabled
ktlint_standard_function-naming = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_multiline-loop = disabled
ktlint_standard_no-blank-line-in-list = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled

Expand Down
4 changes: 3 additions & 1 deletion core/src/jsMain/kotlin/Cursor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public open class Cursor internal constructor(
cursor.continuePrimaryKey(key.toJs(), primaryKey.toJs())
}

public enum class Direction(internal val constant: String) {
public enum class Direction(
internal val constant: String,
) {
Next("next"),
NextUnique("nextunique"),
Previous("prev"),
Expand Down
13 changes: 10 additions & 3 deletions core/src/jsMain/kotlin/CursorStart.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,26 @@ public sealed class CursorStart {

internal abstract fun apply(cursor: IDBCursor)

public data class Advance(val count: Int) : CursorStart() {
public data class Advance(
val count: Int,
) : CursorStart() {
override fun apply(cursor: IDBCursor) {
cursor.advance(count)
}
}

public data class Continue(val key: Key) : CursorStart() {
public data class Continue(
val key: Key,
) : CursorStart() {
override fun apply(cursor: IDBCursor) {
cursor.`continue`(key.toJs())
}
}

public data class ContinuePrimaryKey(val key: Key, val primaryKey: Key) : CursorStart() {
public data class ContinuePrimaryKey(
val key: Key,
val primaryKey: Key,
) : CursorStart() {
override fun apply(cursor: IDBCursor) {
cursor.continuePrimaryKey(key.toJs(), primaryKey.toJs())
}
Expand Down
4 changes: 3 additions & 1 deletion core/src/jsMain/kotlin/Database.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public suspend fun deleteDatabase(name: String) {
}
}

public class Database internal constructor(database: IDBDatabase) {
public class Database internal constructor(
database: IDBDatabase,
) {
private var database: IDBDatabase? = database

init {
Expand Down
14 changes: 11 additions & 3 deletions core/src/jsMain/kotlin/Exceptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ public abstract class EventException(
public val event: Event,
) : Exception(message, cause)

public class EventHandlerException(cause: Throwable?, event: Event) : EventException("An inner exception was thrown: $cause", cause, event)
public class EventHandlerException(
cause: Throwable?,
event: Event,
) : EventException("An inner exception was thrown: $cause", cause, event)

public class ErrorEventException(event: Event) : EventException("An error event was received.", cause = null, event)
public class OpenBlockedException(public val name: String, event: Event) : EventException("Resource in use: $name.", cause = null, event)
public class ErrorEventException(
event: Event,
) : EventException("An error event was received.", cause = null, event)
public class OpenBlockedException(
public val name: String,
event: Event,
) : EventException("Resource in use: $name.", cause = null, event)
public class AbortTransactionException(
event: Event,
) : EventException("Transaction aborted while waiting for completion.", cause = null, event)
4 changes: 3 additions & 1 deletion core/src/jsMain/kotlin/Request.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ package com.juul.indexeddb

import com.juul.indexeddb.external.IDBRequest

public class Request<T> internal constructor(internal val request: IDBRequest<T>)
public class Request<T> internal constructor(
internal val request: IDBRequest<T>,
)
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", ve
[plugins]
dokka = { id = "org.jetbrains.dokka", version = "1.9.20" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinter = { id = "org.jmailen.kotlinter", version = "4.3.0" }
kotlinter = { id = "org.jmailen.kotlinter", version = "4.4.0" }
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.29.0" }

0 comments on commit 30d8fc6

Please sign in to comment.