diff --git a/.kotlin-js-store/yarn.lock b/.kotlin-js-store/yarn.lock index 510dcd5..b7cef21 100644 --- a/.kotlin-js-store/yarn.lock +++ b/.kotlin-js-store/yarn.lock @@ -38,9 +38,9 @@ balanced-match@^1.0.0: integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== brace-expansion@^1.1.7: version "1.1.11" @@ -151,9 +151,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== escape-string-regexp@4.0.0: version "4.0.0" @@ -191,9 +191,9 @@ fs.realpath@^1.0.0: integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== get-caller-file@^2.0.5: version "2.0.5" diff --git a/README.md b/README.md index 1cfb6a1..f423cf1 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ ![badge-platform-jvm] ![badge-platform-js] ![badge-platform-js-node] +![badge-platform-wasm] ![badge-platform-linux] ![badge-platform-macos] ![badge-platform-ios] @@ -19,10 +20,6 @@ ![badge-support-js-ir] ![badge-support-linux-arm] - - Big & Little Endian utils for Kotlin Multiplatform Small library which adds 2 kotlin `value class`es, `BigEndian` and `LittleEndian` @@ -92,7 +89,7 @@ dependencies { [badge-license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat -[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.21-blue.svg?logo=kotlin +[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.23-blue.svg?logo=kotlin [badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat diff --git a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt index 5c63108..3dd646e 100644 --- a/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt +++ b/build-logic/src/main/kotlin/-KmpConfigurationExtension.kt @@ -17,6 +17,7 @@ import io.matthewnelson.kmp.configuration.extension.KmpConfigurationExtension import io.matthewnelson.kmp.configuration.extension.container.target.KmpConfigurationContainerDsl import org.gradle.api.Action import org.gradle.api.JavaVersion +import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl fun KmpConfigurationExtension.configureShared( publish: Boolean = false, @@ -33,8 +34,29 @@ fun KmpConfigurationExtension.configureShared( } js() -// wasmJs {} -// wasmWasi {} + + @OptIn(ExperimentalWasmDsl::class) + wasmJs { + target { + browser { + testTask { + useMocha { timeout = "30s" } + } + } + nodejs { + testTask { + useMocha { timeout = "30s" } + } + } + } + } + + @OptIn(ExperimentalWasmDsl::class) + wasmWasi { + target { + nodejs() + } + } androidNativeAll() diff --git a/build.gradle.kts b/build.gradle.kts index f4ba2d9..6b804eb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,14 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask +import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension +import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin +import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension plugins { alias(libs.plugins.multiplatform) apply(false) alias(libs.plugins.binaryCompat) - alias(libs.plugins.gradleVersions) } allprojects { @@ -39,41 +40,19 @@ plugins.withType { the().lockFileDirectory = rootDir.resolve(".kotlin-js-store") } -apiValidation { - @Suppress("LocalVariableName") - val CHECK_PUBLICATION = findProperty("CHECK_PUBLICATION") as? String - - if (CHECK_PUBLICATION != null) { - ignoredProjects.add("check-publication") +plugins.withType { + the().apply { + nodeVersion = "21.0.0-v8-canary202309167e82ab1fa2" + nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary" } -} - -fun isNonStable(version: String): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } - val regex = "^[0-9,.v-]+(-r)?$".toRegex() - val isStable = stableKeyword || regex.matches(version) - return isStable.not() -} -tasks.withType { - // Example 1: reject all non stable versions - rejectVersionIf { - isNonStable(candidate.version) - } - - // Example 2: disallow release candidates as upgradable versions from stable versions - rejectVersionIf { - isNonStable(candidate.version) && !isNonStable(currentVersion) + tasks.withType().configureEach { + args.add("--ignore-engines") } +} - // Example 3: using the full syntax - resolutionStrategy { - componentSelection { - all(Action { - if (isNonStable(candidate.version) && !isNonStable(currentVersion)) { - reject("Release candidate") - } - }) - } +apiValidation { + if (findProperty("CHECK_PUBLICATION") != null) { + ignoredProjects.add("check-publication") } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index df98e42..4d859d6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,8 @@ [versions] -binaryCompat = "0.13.2" -configuration = "0.1.5" -gradleVersions = "0.50.0" -kotlin = "1.9.21" -publish = "0.25.3" +binaryCompat = "0.14.0" +configuration = "0.2.1" +kotlin = "1.9.23" +publish = "0.27.0" [libraries] gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "configuration" } @@ -13,4 +12,3 @@ gradle-maven-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", [plugins] binaryCompat = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binaryCompat" } multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } -gradleVersions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersions" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a2b81f7..6357ddc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,5 +4,5 @@ zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME # https://gradle.org/release-checksums/ -distributionSha256Sum=f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +distributionSha256Sum=85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip