forked from kordlib/kord
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Gradle 8.5 -> 8.6 * Kotlin 1.9.21 -> 1.9.22 * Ktor 2.3.7 -> 2.3.9 * kotlinx.coroutines 1.7.3 -> 1.8.0 * kotlinx.serialization 1.6.2 -> 1.6.3 * kotlin-logging 6.0.1 -> 6.0.3 * SLF4J 2.0.9 -> 2.0.12 * kotlin-node 18.16.12-pre.619 -> 20.11.5-pre.706 * kotlin-multiplatform-bignum 0.3.8 -> 0.3.9 * KSP 1.9.21-1.0.16 -> 1.9.22-1.0.17 * KotlinPoet 1.15.3 -> 1.16.0 * JUnit 5 5.10.1 -> 5.10.2 * MockK 1.13.8 -> 1.13.10 * Dokka 1.9.10 -> 1.9.20 * AtomicFU 0.23.1 -> 0.23.2 * Binary compatibility validator 0.13.2 -> 0.14.0 * gradle-buildconfig-plugin 5.1.0 -> 5.3.5 * Foojay Toolchains Plugin 0.7.0 -> 0.8.0 * gradle/wrapper-validation-action v1 -> v2 * Replace gradle/gradle-build-action with gradle/actions/setup-gradle * Apply useCommonJs() to fix issues with kotlin-node, see JetBrains/kotlin-wrappers#2221
- Loading branch information
1 parent
e613c0a
commit 5f9294c
Showing
15 changed files
with
51 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ kotlin { | |
jvm() | ||
js { | ||
nodejs() | ||
useCommonJs() | ||
} | ||
jvmToolchain(Jvm.target) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ kotlin { | |
jvm() | ||
js { | ||
nodejs() | ||
useCommonJs() | ||
} | ||
jvmToolchain(Jvm.target) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
@file:JsModule("fast-zlib") | ||
@file:JsNonModule | ||
|
||
package dev.kord.gateway.internal | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
package dev.kord.test | ||
|
||
import io.ktor.utils.io.* | ||
import js.iterable.toList | ||
import node.buffer.Buffer | ||
import node.buffer.BufferEncoding | ||
import node.fs.readFile | ||
import node.process.process | ||
|
||
internal suspend fun nodeFile(project: String, path: String): String = | ||
node.fs.readFile("${process.env["PROJECT_ROOT"]}/$project/src/commonTest/resources/$path") | ||
.toString(BufferEncoding.utf8) | ||
readFile("${process.env["PROJECT_ROOT"]}/$project/src/commonTest/resources/$path", BufferEncoding.utf8) | ||
|
||
internal suspend fun nodeReadFile(project: String, path: String): ByteReadChannel { | ||
val buffer = node.fs.readFile("${process.env["PROJECT_ROOT"]}/$project/src/commonTest/resources/$path") | ||
|
||
return ByteReadChannel(buffer.toByteArray()) | ||
} | ||
|
||
private fun Buffer.toByteArray() = values().toList().toByteArray() | ||
internal suspend fun nodeReadFile(project: String, path: String) = ByteReadChannel(nodeFile(project, path)) |