Skip to content

Commit e7961d6

Browse files
committed
- mark isNormalized as internal API
- add experimental annotation for wasm targets - add also browser() to wasm target - update *.api file
1 parent ca75b70 commit e7961d6

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

json-schema-validator/api/json-schema-validator.api

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,3 @@ public abstract interface class io/github/optimumcode/json/schema/extension/Exte
354354
public abstract fun getSchemaPath ()Lio/github/optimumcode/json/pointer/JsonPointer;
355355
}
356356

357-
public final class io/github/optimumcode/json/schema/internal/hostname/Normalizer_nonWasmJsKt {
358-
public static final fun isNormalized (Ljava/lang/String;)Z
359-
}
360-

json-schema-validator/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
@file:OptIn(ExperimentalWasmDsl::class)
2+
13
import io.gitlab.arturbosch.detekt.Detekt
24
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
35
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
46
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetWithTests
7+
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
58
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
69
import java.util.Locale
710

@@ -146,8 +149,10 @@ kotlin {
146149
nodejs()
147150
}
148151
wasmJs {
152+
browser()
149153
nodejs()
150154
}
155+
151156
applyDefaultHierarchyTemplate()
152157

153158
val macOsTargets =
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package io.github.optimumcode.json.schema.internal.hostname
22

3-
public expect fun isNormalized(label: String): Boolean
3+
internal expect fun isNormalized(label: String): Boolean

json-schema-validator/src/nonWasmJsMain/kotlin/io/github/optimumcode/json/schema/internal/hostname/Normalizer.nonWasmJs.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ package io.github.optimumcode.json.schema.internal.hostname
33
import doist.x.normalize.Form
44
import doist.x.normalize.normalize
55

6-
public actual fun isNormalized(label: String): Boolean {
6+
internal actual fun isNormalized(label: String): Boolean {
77
return label.normalize(Form.NFC) == label
88
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.github.optimumcode.json.schema.internal.hostname
22

3-
public actual fun isNormalized(label: String): Boolean {
3+
internal actual fun isNormalized(label: String): Boolean {
44
// depending library does not yet support wasm: https://github.com/OptimumCode/json-schema-validator/issues/177#issuecomment-2268482409
55
return true
66
}

test-suites/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
@file:OptIn(ExperimentalWasmDsl::class)
2+
13
import io.gitlab.arturbosch.detekt.Detekt
24
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
35
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetWithTests
6+
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
47
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
58
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest
69
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
@@ -69,6 +72,10 @@ kotlin {
6972
implementation(libs.okio.nodefilesystem)
7073
}
7174
}
75+
wasmJsTest {
76+
dependencies {
77+
}
78+
}
7279
jvmTest {
7380
dependencies {
7481
implementation(libs.kotest.runner.junit5)

0 commit comments

Comments
 (0)