Skip to content

Commit 33ce8b6

Browse files
committed
Remove kotlin-node dependency
1 parent 7830a4f commit 33ce8b6

File tree

4 files changed

+221
-197
lines changed

4 files changed

+221
-197
lines changed

apollo-mockserver/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import com.gradleup.librarian.gradle.Librarian
22
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
3+
import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
34

45
plugins {
56
id("org.jetbrains.kotlin.multiplatform")
@@ -22,7 +23,7 @@ kotlin {
2223
tvosSimulatorArm64()
2324
linuxArm64()
2425
linuxX64()
25-
js(IR) {
26+
js {
2627
nodejs()
2728
useCommonJs()
2829
}
@@ -41,6 +42,7 @@ kotlin {
4142
withLinuxArm64()
4243
withLinuxX64()
4344
}
45+
withJs()
4446
withJvm()
4547
withLinuxArm64()
4648
withLinuxX64()
@@ -61,6 +63,7 @@ kotlin {
6163

6264
findByName("jsMain")?.apply {
6365
dependencies {
66+
implementation("org.jetbrains.kotlin:kotlin-stdlib-js:${getKotlinPluginVersion()}")
6467
}
6568
}
6669

@@ -83,6 +86,7 @@ kotlin {
8386
findByName("jsTest")?.apply {
8487
dependencies {
8588
implementation(libs.ktor.client.js)
89+
implementation("org.jetbrains.kotlin:kotlin-test-js:${getKotlinPluginVersion()}")
8690
}
8791
}
8892
findByName("wasmJsMain")!!.apply {

apollo-mockserver/src/jsMain/kotlin/com/apollographql/mockserver/TcpServer.js.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import kotlinx.coroutines.channels.Channel
44
import kotlinx.coroutines.suspendCancellableCoroutine
55
import okio.IOException
66
import org.w3c.dom.events.Event
7-
import kotlin.coroutines.CoroutineContext
87
import kotlin.coroutines.resume
98
import com.apollographql.mockserver.Server as WrappedServer
109
import com.apollographql.mockserver.Socket as WrappedSocket
@@ -90,4 +89,4 @@ internal class NodeTcpServer(private val port: Int) : TcpServer {
9089
}
9190
}
9291

93-
actual fun TcpServer(port: Int, context: CoroutineContext): TcpServer = NodeTcpServer(port)
92+
actual fun TcpServer(port: Int): TcpServer = NodeTcpServer(port)

apollo-mockserver/src/jsMain/kotlin/com/apollographql/mockserver/node-definitions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.khronos.webgl.Uint8Array
66
/**
77
* https://nodejs.org/docs/latest/api/buffer.html
88
*/
9-
interface Buffer {
9+
external interface Buffer {
1010
val buffer: ArrayBuffer
1111
}
1212

0 commit comments

Comments
 (0)