diff --git a/app/current/src/main/scala/io/scalajs/nodejs/Assert.scala b/app/current/src/main/scala/io/scalajs/nodejs/Assert.scala index a3661dc13..81d41bb59 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/Assert.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/Assert.scala @@ -35,7 +35,7 @@ trait Assert extends IEventEmitter { */ def deepStrictEqual(actual: js.Any, expected: js.Any, message: String = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def doesNotReject(asyncFn: js.Function | js.Promise[_], error: js.RegExp | js.Function = js.native, message: String = js.native): Unit = js.native @@ -115,7 +115,7 @@ trait Assert extends IEventEmitter { error: js.RegExp | js.Function | js.Object | Error, message: String = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def rejects(asyncFn: js.Function | js.Promise[_], error: js.RegExp | js.Function | js.Object | Error = js.native, message: String = js.native): Unit = js.native @@ -127,6 +127,6 @@ trait Assert extends IEventEmitter { @js.native @JSImport("assert", JSImport.Namespace) object Assert extends Assert { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) val strict: Assert = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/Module.scala b/app/current/src/main/scala/io/scalajs/nodejs/Module.scala index 888d70730..dfed7c627 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/Module.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/Module.scala @@ -72,12 +72,12 @@ trait Module extends js.Object { @JSImport("module", JSImport.Namespace) object Module extends Module { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var builtinModules: js.Array[String] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createRequire(filename: String): Require = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createRequire(filename: io.scalajs.nodejs.url.URL): Require = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/buffer/Buffer.scala b/app/current/src/main/scala/io/scalajs/nodejs/buffer/Buffer.scala index 860e63466..1eed403d9 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/buffer/Buffer.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/buffer/Buffer.scala @@ -844,25 +844,25 @@ class Buffer protected () extends Uint8Array( /* dummy to trick constructor */ - /** * @see https://nodejs.org/api/buffer.html#buffer_buf_readbiguint64be_offset */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def readBigInt64BE(offset: Int = js.native): Buffer.UnsafeBigInt = js.native /** * @see https://nodejs.org/api/buffer.html#buffer_buf_readbiguint64le_offset */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def readBigUInt64LE(offset: Int = js.native): Buffer.UnsafeBigInt = js.native /** * @see https://nodejs.org/api/buffer.html#buffer_buf_writebigint64be_value_offset */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writeBigInt64BE(value: Buffer.UnsafeBigInt, offset: Int = js.native): Int = js.native /** * @see https://nodejs.org/api/buffer.html#buffer_buf_writebigint64le_value_offset */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writeBigInt64LE(value: Buffer.UnsafeBigInt, offset: Int = js.native): Int = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/cluster/ClusterSettings.scala b/app/current/src/main/scala/io/scalajs/nodejs/cluster/ClusterSettings.scala index f1ddc5b58..bb224f8f6 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/cluster/ClusterSettings.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/cluster/ClusterSettings.scala @@ -34,10 +34,10 @@ trait ClusterSettings extends js.Object { var inspectPort: Int | js.Function = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var cwd: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var windowsHide: Boolean = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/console_module/Console.scala b/app/current/src/main/scala/io/scalajs/nodejs/console_module/Console.scala index f044ddeb1..7c6571e73 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/console_module/Console.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/console_module/Console.scala @@ -145,7 +145,7 @@ class Console protected () extends js.Object { * @param tabularData * @param properties Alternate properties for constructing the table. */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def table(tabularData: js.Any, properties: js.Array[String] = js.native): Unit = js.native /** @@ -165,7 +165,7 @@ class Console protected () extends js.Object { /** * Stops a timer that was previously started by calling [[time()]] and prints the result to `.stdout`.` */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def timeLog(label: String, data: js.Any*): Unit = js.native /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Certificate.scala b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Certificate.scala index a4fb08e0b..433eea703 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Certificate.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Certificate.scala @@ -18,12 +18,12 @@ class Certificate extends js.Object { @js.native @JSImport("crypto", "Certificate") object Certificate extends js.Object { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def exportChallenge(spkac: String | BufferLike): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def exportPublicKey(spkac: String | BufferLike, encoding: String = js.native): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def verifySpkac(spkac: BufferLike): Boolean = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Crypto.scala b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Crypto.scala index 5702faa23..a6e9bb115 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Crypto.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Crypto.scala @@ -53,15 +53,15 @@ trait Crypto extends js.Object { @deprecated("Use crypto.createCipheriv() instead.", "Node.js v10.0") def createCipher(algorithm: String, password: Buffer | String): Cipher = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def createCipheriv(algorithm: String, key: String | BufferLike, iv: String | BufferLike, options: TransformOptions = js.native): Cipher = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createCipheriv(algorithm: String, key: KeyObject, iv: String | BufferLike, options: TransformOptions): Cipher = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createCipheriv(algorithm: String, key: KeyObject, iv: String | BufferLike): Cipher = js.native /** @@ -77,17 +77,17 @@ trait Crypto extends js.Object { */ @deprecated("Use crypto.createDecipheriv() instead.", "Node.js v10.0") def createDecipher(algorithm: String, password: Buffer | String): Decipher = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def createDecipheriv(algorithm: String, key: String | BufferLike, iv: String | BufferLike, options: TransformOptions = js.native): Decipher = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createDecipheriv(algorithm: String, key: KeyObject, iv: String | BufferLike, options: TransformOptions): Decipher = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createDecipheriv(algorithm: String, key: KeyObject, iv: String | BufferLike): Decipher = js.native def createDiffieHellman(prime: String, primeEncoding: String, generator: Int | BufferLike): DiffieHellman = js.native @@ -124,18 +124,18 @@ trait Crypto extends js.Object { * @param key The key is the HMAC key used to generate the cryptographic HMAC hash. */ def createHmac(algorithm: String, key: String | BufferLike, options: TransformOptions = js.native): Hmac = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createHmac(algorithm: String, key: KeyObject, options: TransformOptions): Hmac = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createHmac(algorithm: String, key: KeyObject): Hmac = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createPrivateKey(key: String | Buffer | CreatePrivateKeyOptions): KeyObject = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createPublicKey(key: String | Buffer | KeyObject | CreatePublicKeyOptions): KeyObject = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createSecretKey(key: Buffer): KeyObject = js.native /** @@ -152,14 +152,14 @@ trait Crypto extends js.Object { */ def createVerify(algorithm: String, options: WritableOptions = js.native): Verify = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def generateKeyPair( `type`: String, options: GenerateKeyPairOptions, callback: Callback2[String | Buffer | KeyObject, String | Buffer | KeyObject] ): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def generateKeyPairSync(`type`: String, options: GenerateKeyPairOptions): KeyPair = js.native /** @@ -172,7 +172,7 @@ trait Crypto extends js.Object { def getDiffieHellman(groupName: String): DiffieHellmanGroup = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def getFips(): Boolean = js.native def getHashes(): js.Array[String] = js.native @@ -206,19 +206,19 @@ trait Crypto extends js.Object { digest: String): Buffer = js.native def privateDecrypt(privateKey: String | Buffer, buffer: BufferLike): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def privateDecrypt(privateKey: KeyObject, buffer: BufferLike): Buffer = js.native def privateEncrypt(privateKey: String | Buffer, buffer: BufferLike): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def privateEncrypt(privateKey: KeyObject, buffer: BufferLike): Buffer = js.native def publicDecrypt(key: String | Buffer, buffer: BufferLike): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def publicDecrypt(key: KeyObject, buffer: BufferLike): Buffer = js.native def publicEncrypt(key: String | Buffer, buffer: BufferLike): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def publicEncrypt(key: KeyObject, buffer: BufferLike): Buffer = js.native def randomBytes(size: Int): Buffer = js.native @@ -228,16 +228,16 @@ trait Crypto extends js.Object { def randomFillSync(buffer: Buffer, offset: Int): Buffer = js.native def randomFillSync(buffer: Buffer): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFillSync(buffer: scala.scalajs.js.typedarray.DataView, offset: Int, size: Int): scala.scalajs.js.typedarray.DataView = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFillSync(buffer: scala.scalajs.js.typedarray.DataView, offset: Int): scala.scalajs.js.typedarray.DataView = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFillSync(buffer: scala.scalajs.js.typedarray.DataView): scala.scalajs.js.typedarray.DataView = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFillSync[T <: scala.scalajs.js.typedarray.TypedArray[_, T]](buffer: T, offset: Int = js.native, size: Int = js.native): T = js.native @@ -246,36 +246,36 @@ trait Crypto extends js.Object { def randomFill(buffer: Buffer, offset: Int, callback: Callback1[Buffer]): Buffer = js.native def randomFill(buffer: Buffer, callback: Callback1[Buffer]): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFill(buffer: scala.scalajs.js.typedarray.DataView, offset: Int, size: Int, callback: Callback1[scala.scalajs.js.typedarray.DataView]): scala.scalajs.js.typedarray.DataView = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFill(buffer: scala.scalajs.js.typedarray.DataView, offset: Int, callback: Callback1[scala.scalajs.js.typedarray.DataView]): scala.scalajs.js.typedarray.DataView = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFill(buffer: scala.scalajs.js.typedarray.DataView, callback: Callback1[scala.scalajs.js.typedarray.DataView]): scala.scalajs.js.typedarray.DataView = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def randomFill[T <: scala.scalajs.js.typedarray.TypedArray[_, T]](buffer: T, offset: Int = js.native, size: Int = js.native, callback: Callback1[T]): T = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def scrypt(password: String | BufferLike, salt: String | BufferLike, keylen: Int, options: ScryptOptions = js.native, callback: Callback1[Buffer]): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def scryptSync(password: String | BufferLike, salt: String | BufferLike, keylen: Int, @@ -283,15 +283,15 @@ trait Crypto extends js.Object { def setEngine(engine: String, fips: Int = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def setFips(enable: Boolean): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def sign(algorithm: String = js.native, data: BufferLike, key: String | Buffer | KeyObject): Buffer = js.native def timingSafeEqual(a: BufferLike, b: BufferLike): Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def verify(algorithm: String = js.native, data: BufferLike, key: String | Buffer | KeyObject): Boolean = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/crypto/ECDH.scala b/app/current/src/main/scala/io/scalajs/nodejs/crypto/ECDH.scala index c9d9da8b5..51e0703ac 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/crypto/ECDH.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/crypto/ECDH.scala @@ -31,7 +31,7 @@ trait ECDH extends js.Object { } @js.native -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @JSImport("crypto", "ECDH") object ECDH extends js.Object { def convertKey(key: String, curve: String, inputEncoding: String, outputEncoding: String, format: String): String = diff --git a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Sign.scala b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Sign.scala index 67948d5ff..1aa83c551 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Sign.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Sign.scala @@ -21,9 +21,9 @@ import scala.scalajs.js.| sealed trait Sign extends Writable { def sign(privateKey: String | Buffer): Buffer = js.native def sign(privateKey: String | Buffer, outputEncoding: String): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def sign(privateKey: KeyObject): Buffer = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def sign(privateKey: KeyObject, outputEncoding: String): String = js.native def update(data: String, inputEncoding: String = js.native): Unit = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Verify.scala b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Verify.scala index 73d440e8f..1875c3f11 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/crypto/Verify.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/crypto/Verify.scala @@ -45,9 +45,9 @@ trait Verify extends Writable { */ def verify(obj: String | Buffer, signature: String, signatureEncoding: String): Boolean = js.native def verify(obj: String | Buffer, signature: BufferLike): Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def verify(obj: KeyObject, signature: String, signatureEncoding: String): Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def verify(obj: KeyObject, signature: BufferLike): Boolean = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/dgram/Socket.scala b/app/current/src/main/scala/io/scalajs/nodejs/dgram/Socket.scala index 8befc2c2b..bd225c452 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/dgram/Socket.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/dgram/Socket.scala @@ -67,10 +67,10 @@ class Socket private[this] () extends IEventEmitter { def close(callback: js.Function = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def connect(port: Int, address: String = js.native, callback: js.Function0[Any] = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def disconnect(): Unit = js.native def dropMembership(multicastAddress: String, multicastInterface: String = js.native): Unit = js.native @@ -80,7 +80,7 @@ class Socket private[this] () extends IEventEmitter { def ref(): this.type = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def remoteAddress(): RemoteAddress = js.native def send(msg: BufferMessage, offset: Int, length: Int, port: Int, address: String, callback: js.Function): Unit = diff --git a/app/current/src/main/scala/io/scalajs/nodejs/dns/PromiseResolver.scala b/app/current/src/main/scala/io/scalajs/nodejs/dns/PromiseResolver.scala index f26e98f67..b596dab8c 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/dns/PromiseResolver.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/dns/PromiseResolver.scala @@ -6,7 +6,7 @@ import scala.scalajs.js import scala.scalajs.js.annotation.JSImport @js.native -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @JSImport("dns", "promises.Resolver") class PromisesResolver extends js.Object { def getServers(): js.Array[String] = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/events/EventEmitter.scala b/app/current/src/main/scala/io/scalajs/nodejs/events/EventEmitter.scala index 7a530ac29..69f2efa23 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/events/EventEmitter.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/events/EventEmitter.scala @@ -74,7 +74,7 @@ trait IEventEmitter extends js.Object { */ def listeners(eventName: String): js.Array[js.Function] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def off(eventName: String, listner: js.Function): this.type = js.native /** @@ -132,7 +132,7 @@ trait IEventEmitter extends js.Object { */ def setMaxListeners(n: Int): this.type = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def rawListeners(eventName: String): js.Array[js.Function] = js.native } @@ -158,6 +158,6 @@ object EventEmitter extends IEventEmitter { @deprecated("Use emitter.listenerCount() instead.", since = "4.0.0") def listenerCount(emitter: IEventEmitter, eventName: String): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def once(emitter: IEventEmitter, eventName: String): js.Promise[js.Array[js.Any]] = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/fs/Fs.scala b/app/current/src/main/scala/io/scalajs/nodejs/fs/Fs.scala index 09bc6f368..6441e5adf 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/fs/Fs.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/fs/Fs.scala @@ -407,7 +407,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def linkSync(existingPath: Path, newPath: Path): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def lstat(path: Path, options: StatOptions, callback: FsCallback1[Stats]): Unit = js.native /** @@ -426,7 +426,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def lstatSync(path: Path): Stats = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def lstatSync(path: Path, options: StatOptions): Stats = js.native /** @@ -441,7 +441,7 @@ trait Fs extends IEventEmitter with FSConstants { * mode defaults to 0o777. * @example fs.mkdir(path[, mode], callback) */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def mkdir(path: Path, mode: MkdirOptions, callback: FsCallback0): Unit = js.native /** @@ -458,7 +458,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def mkdirSync(path: Buffer | String, mode: FileMode = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def mkdirSync(path: Buffer | String, mode: MkdirOptions): Unit = js.native /** @@ -555,7 +555,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def open(path: Path, flags: Flags, callback: FsCallback1[FileDescriptor]): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def open(path: Path, callback: FsCallback1[FileDescriptor]): Unit = js.native /** @@ -568,7 +568,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def openSync(path: Path, flags: Flags, mode: FileMode = js.native): FileDescriptor = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def openSync(path: Path): FileDescriptor = js.native /** @@ -588,7 +588,7 @@ trait Fs extends IEventEmitter with FSConstants { position: Int | Null, callback: FsCallback2[Int, Buffer]): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def read(fd: FileDescriptor, buffer: BufferLike, offset: Int | Null, @@ -608,7 +608,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def readSync(fd: FileDescriptor, buffer: Buffer, offset: Int, length: Int, position: Int): Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def readSync(fd: FileDescriptor, buffer: BufferLike, offset: Int, length: Int, position: Int): Int = js.native /** @@ -623,7 +623,7 @@ trait Fs extends IEventEmitter with FSConstants { * @example fs.readdir(path[, options], callback) */ def readdir(path: Path, options: String | FileEncodingOptions, callback: FsCallback1[ReaddirArrays]): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def readdir(path: Path, options: ReaddirOptions, callback: FsCallback1[ReaddirArrays2]): Unit = js.native /** @@ -768,7 +768,7 @@ trait Fs extends IEventEmitter with FSConstants { def realpathSync(path: Path, options: FileEncodingOptions = js.native): Output = js.native def realpathSync(path: Path): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) val realpath: RealpathObject = js.native /** @@ -794,7 +794,7 @@ trait Fs extends IEventEmitter with FSConstants { * Asynchronous rmdir(2). No arguments other than a possible exception are given to the completion callback. * @example fs.rmdir(path, callback) */ - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def rmdir(path: Path, options: RmdirOptions, callback: FsCallback0): Unit = js.native /** @@ -804,7 +804,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def rmdirSync(path: Path): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def rmdirSync(path: Path, options: RmdirOptions): Unit = js.native /** @@ -814,7 +814,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def stat(path: Path, callback: FsCallback1[Stats]): Stats = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def stat(path: Path, options: StatOptions, callback: FsCallback1[Stats]): Stats = js.native /** @@ -823,7 +823,7 @@ trait Fs extends IEventEmitter with FSConstants { */ def statSync(path: Path): Stats = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def statSync(path: Path, options: StatOptions): Stats = js.native /** @@ -1019,7 +1019,7 @@ trait Fs extends IEventEmitter with FSConstants { position: Int | Null, callback: FsCallback2[Int, Buffer]): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def write(fd: FileDescriptor, buffer: BufferLike, offset: Int | Null, @@ -1065,10 +1065,10 @@ trait Fs extends IEventEmitter with FSConstants { def writeFile(file: String, data: String, options: FileWriteOptions, callback: FsCallback0): Unit = js.native def writeFile(file: String, data: String, callback: FsCallback0): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def writeFile(file: String, data: BufferLike, options: FileWriteOptions, callback: FsCallback0): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def writeFile(file: String, data: BufferLike, callback: FsCallback0): Unit = js.native /** @@ -1081,10 +1081,10 @@ trait Fs extends IEventEmitter with FSConstants { def writeFileSync(file: Path | FileDescriptor, data: String, options: FileWriteOptions): Unit = js.native def writeFileSync(file: Path | FileDescriptor, data: String): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def writeFileSync(file: Path | FileDescriptor, data: BufferLike, options: FileWriteOptions): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def writeFileSync(file: Path | FileDescriptor, data: BufferLike): Unit = js.native /** @@ -1133,7 +1133,7 @@ trait Fs extends IEventEmitter with FSConstants { @JSImport("fs", JSImport.Namespace) object Fs extends Fs { - @enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native trait FsPromises extends js.Object { def access(path: Path, mode: FileMode): js.Promise[Unit] = js.native @@ -1154,7 +1154,7 @@ object Fs extends Fs { def mkdtemp(prefix: String, options: FileEncodingOptions): js.Promise[String] = js.native def mkdtemp(prefix: String, encoding: String = js.native): js.Promise[String] = js.native def open(path: Path, flags: Flags, mode: FileMode = js.native): js.Promise[FileHandle] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def open(path: Path): js.Promise[FileHandle] = js.native def readdir(path: Path, options: ReaddirOptions): js.Promise[js.Array[String] | js.Array[Dirent]] = js.native def readdir(path: Path, options: String | FileEncodingOptions = js.native): js.Promise[js.Array[String]] = js.native @@ -1162,7 +1162,7 @@ object Fs extends Fs { def readlink(path: Path, options: String | FileEncodingOptions): js.Promise[Output] = js.native def rename(oldPath: Path, newPath: Path): js.Promise[Unit] = js.native def rmdir(path: Path): js.Promise[Unit] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def rmdir(path: Path, options: RmdirOptions): js.Promise[Unit] = js.native def stat(path: Path, options: StatOptions = js.native): js.Promise[Stats] = js.native def symlink(target: Path, path: Path, `type`: String = js.native): js.Promise[Unit] = js.native @@ -1173,7 +1173,7 @@ object Fs extends Fs { js.native } - @enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native trait FileHandle extends js.Object { val fd: FileDescriptor = js.native @@ -1207,14 +1207,14 @@ object Fs extends Fs { def write(string: String, position: Int | Null, encoding: String): js.Promise[BufferIOResult[String]] = js.native def writeFile(data: String | BufferLike, options: FileWriteOptions): js.Promise[Unit] = js.native def writeFile(data: String | BufferLike): js.Promise[Unit] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writev(buffers: js.Array[js.typedarray.ArrayBufferView], position: Int | Null): js.Promise[Unit] = js.native } - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) val promises: FsPromises = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native class Dirent() extends js.Object { def isBlockDevice(): Boolean = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/fs/ReadStream.scala b/app/current/src/main/scala/io/scalajs/nodejs/fs/ReadStream.scala index 09b2037bc..a0c0a0575 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/fs/ReadStream.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/fs/ReadStream.scala @@ -45,7 +45,7 @@ class ReadStream(path: Path) extends stream.Readable { */ def close(callback: js.Function1[Unit, Any]): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) val pending: Boolean = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/fs/package.scala b/app/current/src/main/scala/io/scalajs/nodejs/fs/package.scala index c5a6d8320..fb5cfaa0f 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/fs/package.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/fs/package.scala @@ -22,10 +22,10 @@ package object fs { type FileWriteOptions = FileAppendOptions type ReaddirArrays = js.Array[String] | js.Array[Buffer] - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) type ReaddirArrays2 = ReaddirArrays | js.Array[fs.Dirent] - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) type Dirent = Fs.Dirent ///////////////////////////////////////////////////////////////////////////////// @@ -136,7 +136,7 @@ package object fs { promiseWithError1[FileIOError, js.Array[Buffer]](callback) } - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @inline def readdirDirentFuture(path: Buffer | String): Future[js.Array[Dirent]] = { val callback: FsCallback1[js.Array[Dirent]] => Unit = { callback => diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http/ClientRequest.scala b/app/current/src/main/scala/io/scalajs/nodejs/http/ClientRequest.scala index 6795b91ca..394d4b22c 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http/ClientRequest.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http/ClientRequest.scala @@ -47,10 +47,10 @@ class ClientRequest extends stream.Writable { def socket: net.Socket = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writableEnded: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writableFinished: Boolean = js.native ///////////////////////////////////////////////////////////////////////////////// diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http/Http.scala b/app/current/src/main/scala/io/scalajs/nodejs/http/Http.scala index 80c4dd2f0..82562b392 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http/Http.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http/Http.scala @@ -47,7 +47,7 @@ trait Http extends js.Object { js.native def createServer(requestListener: js.Function2[ClientRequest, ServerResponse, Any] = js.native): Server = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def get(url: String | URL, options: RequestOptions, callback: js.Function1[ServerResponse, Any] = js.native): ClientRequest = js.native @@ -56,10 +56,10 @@ trait Http extends js.Object { def get(options: RequestOptions): ClientRequest = js.native def get(options: RequestOptions, callback: js.Function): ClientRequest = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def maxHeaderSize: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def request(url: String | URL, options: RequestOptions, callback: js.Function1[ServerResponse, Any] = js.native): Unit = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http/IncomingMessage.scala b/app/current/src/main/scala/io/scalajs/nodejs/http/IncomingMessage.scala index f7f0ddd85..9b8f314a9 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http/IncomingMessage.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http/IncomingMessage.scala @@ -18,7 +18,7 @@ import scala.scalajs.js.annotation.JSImport @JSImport("http", "IncomingMessage") class IncomingMessage extends stream.Readable { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def aborted: Boolean = js.native def complete: Boolean = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http/ServerResponse.scala b/app/current/src/main/scala/io/scalajs/nodejs/http/ServerResponse.scala index 82bdc6ece..eea462597 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http/ServerResponse.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http/ServerResponse.scala @@ -56,10 +56,10 @@ trait ServerResponse extends stream.Writable { def socket: net.Socket = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writableEnded: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writableFinished: Boolean = js.native ///////////////////////////////////////////////////////////////////////////////// @@ -140,7 +140,7 @@ trait ServerResponse extends stream.Writable { def writeHead(statusCode: Int, headers: js.Object | js.Dictionary[_]): Unit = js.native def writeHead(statusCode: Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def writeProcessing(): Unit = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Constants.scala b/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Constants.scala index 997052172..702ce57b3 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Constants.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Constants.scala @@ -86,7 +86,7 @@ trait Http2Constants extends js.Object { val HTTP2_HEADER_WWW_AUTHENTICATE: String = js.native val HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS: String = js.native val HTTP2_HEADER_X_FRAME_OPTIONS: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) val HTTP2_HEADER_PROTOCOL: String = js.native val HTTP2_METHOD_ACL: String = js.native @@ -234,7 +234,7 @@ trait Http2Constants extends js.Object { val NGHTTP2_STREAM_STATE_OPEN: Int = js.native val NGHTTP2_STREAM_STATE_RESERVED_LOCAL: Int = js.native val NGHTTP2_STREAM_STATE_RESERVED_REMOTE: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) val NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL: Int = js.native val PADDING_STRATEGY_ALIGNED: Int = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Session.scala b/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Session.scala index f8f91ee6e..a1d70e224 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Session.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Session.scala @@ -10,16 +10,16 @@ import scala.scalajs.js.| @js.native trait Http2Session extends IEventEmitter { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def alpnProtocol: js.UndefOr[String] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def close(callback: js.Function = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def closed: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def connecting: Boolean = js.native def destroy(error: Error, code: Int): Unit = js.native @@ -29,25 +29,25 @@ trait Http2Session extends IEventEmitter { def destroyed: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def encrypted: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def goaway(code: Int, lastStreamID: Int, opaqueData: TypedArray[_, _] | DataView): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def goaway(code: Int, lastStreamID: Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def goaway(code: Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def goaway(): Unit = js.native def localSettings: Http2Settings = js.native def remoteSettings: Http2Settings = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def originSet: js.UndefOr[js.Array[String]] def pendingSettingsAck: Boolean = js.native @@ -56,7 +56,7 @@ trait Http2Session extends IEventEmitter { def ping(callback: js.Function): Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def ref(): Unit = js.native def setTimeout(msec: Int, callback: js.Function): Unit = js.native @@ -70,6 +70,6 @@ trait Http2Session extends IEventEmitter { def `type`: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def unref(): Unit = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Stream.scala b/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Stream.scala index a88b2e79e..c57e2423d 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Stream.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http2/Http2Stream.scala @@ -9,33 +9,33 @@ import scala.scalajs.js trait Http2Stream extends stream.Duplex { def aborted: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def bufferSize: Int = js.native def close(code: Int, callback: js.Function = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def closed: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def endAfterHeaders: Boolean = js.native def id: js.UndefOr[Int] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pending: Boolean = js.native def priority(options: Http2Priority): Unit = js.native def rstCode: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def sentHeaders: Http2Headers = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def sentInfoHeaders: js.Array[Http2Headers] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def sentTrailers: Http2Headers = js.native def session: Http2Session = js.native @@ -44,6 +44,6 @@ trait Http2Stream extends stream.Duplex { def state: Http2StreamState = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def sendTrailers(headers: Http2Headers): Unit = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/http2/ServerHttp2Session.scala b/app/current/src/main/scala/io/scalajs/nodejs/http2/ServerHttp2Session.scala index a76102e69..6d0af185b 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/http2/ServerHttp2Session.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/http2/ServerHttp2Session.scala @@ -6,10 +6,10 @@ import scala.scalajs.js @js.native trait ServerHttp2Session extends Http2Session { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def altsvc(alt: String, originOrStream: js.|[Int, Origin]): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def origin(origins: Origin*): Unit = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/https/Https.scala b/app/current/src/main/scala/io/scalajs/nodejs/https/Https.scala index 326925b5a..6381cb12f 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/https/Https.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/https/Https.scala @@ -38,13 +38,13 @@ trait Https extends js.Object { def createServer(options: ServerOptions): Server = js.native def createServer(): Server = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def get(url: String | URL, options: RequestOptions, callback: js.Function1[ServerResponse, Any]): ClientRequest = js.native def get(url: String | URL, callback: js.Function1[ServerResponse, Any]): ClientRequest = js.native def get(options: RequestOptions, callback: js.Function): ClientRequest = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def request(url: String | URL, options: RequestOptions, callback: js.Function1[ServerResponse, Any] = js.native): Unit = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/https/Server.scala b/app/current/src/main/scala/io/scalajs/nodejs/https/Server.scala index a34cabf1e..f6650b61e 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/https/Server.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/https/Server.scala @@ -13,7 +13,7 @@ import scala.scalajs.js.annotation.JSImport @JSImport("https", "Server") class Server extends tls.Server { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def headersTimeout: Int = js.native def maxHeaderCount: Int = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/https/package.scala b/app/current/src/main/scala/io/scalajs/nodejs/https/package.scala index 6953001bf..43614e47e 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/https/package.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/https/package.scala @@ -50,7 +50,7 @@ package object https { promiseCallback1[ServerResponse](https.request(url, _)) } - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @inline def requestFuture(url: String | URL, options: RequestOptions): Future[ServerResponse] = { promiseCallback1[ServerResponse](https.request(url, options, _)) diff --git a/app/current/src/main/scala/io/scalajs/nodejs/net/Socket.scala b/app/current/src/main/scala/io/scalajs/nodejs/net/Socket.scala index 0290d0d49..fd77a5328 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/net/Socket.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/net/Socket.scala @@ -57,7 +57,7 @@ class Socket(options: SocketOptions = js.native) extends stream.Duplex with HasH */ def localPort: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def pending: Boolean = js.native /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/os/OS.scala b/app/current/src/main/scala/io/scalajs/nodejs/os/OS.scala index 97e0e1cbb..9fb2a4dc8 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/os/OS.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/os/OS.scala @@ -66,7 +66,7 @@ trait OS extends js.Object { */ def freemem(): Double = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def getPriority(pid: Int = js.native): Int = js.native /** @@ -113,9 +113,9 @@ trait OS extends js.Object { */ def release(): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def setPriority(pid: Int, priority: Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def setPriority(priority: Int): Unit = js.native /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/package.scala b/app/current/src/main/scala/io/scalajs/nodejs/package.scala index 365783f62..f63f2e75d 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/package.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/package.scala @@ -83,7 +83,7 @@ package object nodejs { object global extends Global @js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) @JSGlobal("queueMicrotask") object queueMicrotask extends js.Function1[js.Function, Unit] { override def apply(arg1: js.Function): Unit = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/path/Path.scala b/app/current/src/main/scala/io/scalajs/nodejs/path/Path.scala index 1805ec27f..f14183a31 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/path/Path.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/path/Path.scala @@ -135,7 +135,7 @@ trait Path extends js.Object { */ def resolve(args: String*): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def toNamespacedPath(path: String): String = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/process/Process.scala b/app/current/src/main/scala/io/scalajs/nodejs/process/Process.scala index f4c40a6ef..7b05c523b 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/process/Process.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/process/Process.scala @@ -124,10 +124,10 @@ trait Process extends IEventEmitter { */ def release: ReleaseInfo = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def report: js.UndefOr[Reporter] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def resourceUsage(): ResourceUsage = js.native /** @@ -274,7 +274,7 @@ trait Process extends IEventEmitter { */ def initgroups(user: String | Int, extra_group: String | Int): js.Array[Int] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def hasUncaughtExceptionCaptureCallback(): Boolean = js.native /** @@ -366,7 +366,7 @@ trait Process extends IEventEmitter { */ def setuid(id: String | Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def setUncaughtExceptionCaptureCallback(callback: js.Function = js.native): Unit = js.native /** @@ -438,19 +438,19 @@ trait ComponentVersion extends js.Object { var icu: String = js.native var unicode: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var v8: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var brotli: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var nghttp2: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var napi: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var llhttp: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var cldr: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) var tz: String = js.native } @@ -492,11 +492,11 @@ class WarningOptions( @js.native trait HrTime extends js.Function1[js.Array[Int], js.Array[Int]] with js.Function0[js.Array[Int]] { // TODO: js.BigInt - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def bigint(): js.Any = js.native } -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) @js.native trait ResourceUsage extends js.Object { var userCPUTime: Int = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/process/Reporter.scala b/app/current/src/main/scala/io/scalajs/nodejs/process/Reporter.scala index 43ae66f67..5046d4194 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/process/Reporter.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/process/Reporter.scala @@ -5,7 +5,7 @@ import com.thoughtworks.enableMembersIf import scala.scalajs.js import scala.scalajs.js.| -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) @js.native trait Reporter extends js.Object { def getReport(err: io.scalajs.nodejs.Error = js.native): Reporter = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/process/package.scala b/app/current/src/main/scala/io/scalajs/nodejs/process/package.scala index 76f225774..f2a505de2 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/process/package.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/process/package.scala @@ -196,7 +196,7 @@ package object process { def onMessage(listener: (js.Any, js.UndefOr[net.Server | net.Socket]) => Any): Process = process.on("message", listener) - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def onMultipleResolves[T](listener: (String, js.Promise[T], js.Any) => Any): Process = process.on("multipleResolves", listener) @@ -215,7 +215,7 @@ package object process { */ def onUncaughtException(listener: Error => Any): Process = process.on("uncaughtException", listener) - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def onUncaughtException(listener: (Error, String) => Any): Process = process.on("uncaughtException", listener) /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/repl/REPLServer.scala b/app/current/src/main/scala/io/scalajs/nodejs/repl/REPLServer.scala index 306b3383b..3d7882e82 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/repl/REPLServer.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/repl/REPLServer.scala @@ -18,7 +18,7 @@ trait REPLServer extends IEventEmitter with Interface { */ val context: REPLContext = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def clearBufferedCommand(): Unit = js.native /** @@ -57,7 +57,7 @@ trait REPLServer extends IEventEmitter with Interface { */ def displayPrompt(): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def setupHistory(historyPath: String, callback: js.Function2[io.scalajs.nodejs.Error, REPLServer, Any]): Unit = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/stream/Stream.scala b/app/current/src/main/scala/io/scalajs/nodejs/stream/Stream.scala index 05bffcbbf..41229411c 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/stream/Stream.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/stream/Stream.scala @@ -15,21 +15,21 @@ import scala.scalajs.js.typedarray.Uint8Array @js.native @JSImport("stream", JSImport.Namespace) object Stream extends js.Object { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def finished(stream: Stream, options: FinishedOptions, callback: ErrorCallback): Wait = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def finished(stream: Stream, callback: ErrorCallback): Wait = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pipeline(a: Stream, b: Stream, callback: ErrorCallback): Wait = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pipeline(a: Stream, b: Stream, c: Stream, callback: ErrorCallback): Wait = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pipeline(a: Stream, b: Stream, c: Stream, d: Stream, callback: ErrorCallback): Wait = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pipeline(a: Stream, b: Stream, c: Stream, d: Stream, e: Stream, callback: ErrorCallback): Wait = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pipeline(a: Stream, b: Stream, c: Stream, d: Stream, e: Stream, f: Stream, callback: ErrorCallback): Wait = js.native } @@ -45,7 +45,7 @@ class Readable(options: ReadableOptions = js.native) extends IReadable @js.native @JSImport("stream", "Readable") object Readable extends js.Object { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def from(iterable: js.Iterable[_], options: ReadableOptions = js.native): Readable = js.native } @@ -172,25 +172,25 @@ sealed trait IReadable extends LegacyStream { @JSName("read") def readAsObject(size: Int = js.native): js.Any = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def readable: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def setReadableEncoding: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def readableEnded: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def readableFlowing: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def readableHighWaterMark: Double = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def readableLength: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def readableObjectMode: Boolean = js.native /** @@ -428,16 +428,16 @@ sealed trait IWritable extends LegacyStream { */ def uncork(): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writable: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def writableHighWaterMark: Double = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def writableLength: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writableObjectMode: Boolean = js.native def write(chunk: Uint8Array | String, callback: js.Function1[Error, Any] = js.native): Boolean = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/stream/package.scala b/app/current/src/main/scala/io/scalajs/nodejs/stream/package.scala index 99b247cca..8edf906d7 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/stream/package.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/stream/package.scala @@ -13,7 +13,7 @@ package object stream { type Wait = js.Function0[js.Promise[Unit]] implicit final class StreamModuleExtension(private val stream: Stream.type) extends AnyVal { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pipelineFromSeq(streams: Seq[Stream], errorCallback: ErrorCallback): Wait = { streams match { case Seq(a, b) => stream.pipeline(a, b, errorCallback) diff --git a/app/current/src/main/scala/io/scalajs/nodejs/timers/Immediate.scala b/app/current/src/main/scala/io/scalajs/nodejs/timers/Immediate.scala index 1cd285e9b..952abf475 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/timers/Immediate.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/timers/Immediate.scala @@ -13,13 +13,13 @@ trait Immediate extends js.Object { def _onImmediate: js.Function = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def hasRef(): Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def ref(): Immediate = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def unref(): Immediate = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/timers/Timeout.scala b/app/current/src/main/scala/io/scalajs/nodejs/timers/Timeout.scala index 903167711..cc05ee399 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/timers/Timeout.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/timers/Timeout.scala @@ -16,10 +16,10 @@ trait Timeout extends js.Object { * @return true, if the timeout has already been called */ def _called: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def hasRef(): Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def refresh(): Timeout = js.native def ref(): Timeout = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/tls/Server.scala b/app/current/src/main/scala/io/scalajs/nodejs/tls/Server.scala index 97f4ffea0..c4d500bdc 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/tls/Server.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/tls/Server.scala @@ -24,7 +24,7 @@ class Server extends net.Server { */ def addContext(hostname: String, context: SecureContextOptions): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def setSecureContext(context: SecureContextOptions): Unit = js.native /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/tls/TLSSocket.scala b/app/current/src/main/scala/io/scalajs/nodejs/tls/TLSSocket.scala index 33f56d423..574cd64be 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/tls/TLSSocket.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/tls/TLSSocket.scala @@ -26,12 +26,12 @@ class TLSSocket(socket: stream.IDuplex, options: TLSSocketOptions = js.native) e def disableRenegotiation(): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def enableTrace(): Unit = js.native def encrypted: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def getCertificate(): TLSCertificate = js.native /** @@ -45,7 +45,7 @@ class TLSSocket(socket: stream.IDuplex, options: TLSSocketOptions = js.native) e */ def getPeerCertificate(detailed: String): TLSCertificate = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def getPeerFinished(): js.UndefOr[Buffer] = js.native /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/tls/Tls.scala b/app/current/src/main/scala/io/scalajs/nodejs/tls/Tls.scala index 3b55225bc..763c959e4 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/tls/Tls.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/tls/Tls.scala @@ -26,7 +26,7 @@ trait Tls extends js.Object { def getCiphers(): js.Array[String] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def rootCertificates: js.Array[String] = js.native } @@ -38,9 +38,9 @@ trait Tls extends js.Object { object Tls extends Tls { def DEFAULT_ECDH_CURVE: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def DEFAULT_MAX_VERSION: String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def DEFAULT_MIN_VERSION: String = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/tty/WriteStream.scala b/app/current/src/main/scala/io/scalajs/nodejs/tty/WriteStream.scala index 3e108d780..4e8c4f6af 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/tty/WriteStream.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/tty/WriteStream.scala @@ -26,12 +26,12 @@ class WriteStream(fd: FileDescriptor) extends net.Socket { */ def columns: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def clearLine(dir: Int, callback: js.Function): Boolean = js.native // TODO: Return value should be boolean when dropping Node.js v10 def clearLine(dir: Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def clearScreenDown(callback: js.Function): Boolean = js.native // TODO: Return value should be boolean when dropping Node.js v10 def clearScreenDown(): Unit = js.native @@ -40,15 +40,15 @@ class WriteStream(fd: FileDescriptor) extends net.Socket { def cursorTo(x: Int): Unit = js.native // TODO: Return value should be boolean when dropping Node.js v10 def cursorTo(x: Int, y: Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def cursorTo(x: Int, y: Int, callback: js.Function): Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def getColorDepth(env: io.scalajs.nodejs.process.Environment = js.native): Int = js.native def getWindowSize(): js.Tuple2[Int, Int] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def hasColors(count: Int = js.native, env: io.scalajs.nodejs.process.Environment = js.native): Boolean = js.native /** @@ -66,7 +66,7 @@ class WriteStream(fd: FileDescriptor) extends net.Socket { // TODO: Return value should be boolean when dropping Node.js v10 def moveCursor(dx: Int, dy: Int): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def moveCursor(dx: Int, dy: Int, callback: js.Function): Boolean = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/url/URL.scala b/app/current/src/main/scala/io/scalajs/nodejs/url/URL.scala index aadc40db4..e1aa797f8 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/url/URL.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/url/URL.scala @@ -171,10 +171,10 @@ object URL extends IEventEmitter { */ def domainToUnicode(domain: String): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def fileURLToPath(url: URL | String): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def pathToFileURL(url: String): URL = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/util/Util.scala b/app/current/src/main/scala/io/scalajs/nodejs/util/Util.scala index f4b1e9522..e3273cf60 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/util/Util.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/util/Util.scala @@ -53,10 +53,10 @@ trait Util extends js.Object { */ def format(format: String, args: js.Any*): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def formatWithOptions(inspectOptions: InspectOptions, format: String, args: js.Any*): String = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def getSystemErrorName(err: Int): String = js.native /** @@ -227,10 +227,10 @@ trait Util extends js.Object { def promisify(original: js.Function): js.Function = js.native val promisify: PromisifyObject = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) val types: UtilTypes = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def isDeepStrictEqual(val1: js.Any, val2: js.Any): Boolean = js.native } @@ -246,7 +246,7 @@ trait InspectObject extends js.Object { var defaultOptions: InspectOptions = js.native var styles: js.Dictionary[String] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) val custom: js.Symbol = js.native } @@ -255,7 +255,7 @@ trait PromisifyObject extends js.Object { val custom: js.Symbol = js.native } -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native trait UtilTypes extends js.Object { def isAnyArrayBuffer(value: js.Any): Boolean = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/v8/V8.scala b/app/current/src/main/scala/io/scalajs/nodejs/v8/V8.scala index 35bc6fc95..2eb1459e7 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/v8/V8.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/v8/V8.scala @@ -13,17 +13,17 @@ trait V8 extends js.Object { def getHeapSpaceStatistics(): js.Array[HeapSpaceStatistics] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def getHeapSnapshot(): io.scalajs.nodejs.stream.Readable = js.native def getHeapStatistics(): HeapStatistics = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def getHeapCodeStatistics(): HeapCodeStatistics = js.native def setFlagsFromString(flags: String): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def writeHeapSnapshot(filename: String = js.native): String = js.native def serialize(value: js.Any): Buffer = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/vm/Script.scala b/app/current/src/main/scala/io/scalajs/nodejs/vm/Script.scala index 272e4e4b7..1d4ac22b0 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/vm/Script.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/vm/Script.scala @@ -17,7 +17,7 @@ class Script private[this] () extends js.Object { def this(code: String, options: ScriptOptions = js.native) = this() def this(code: String, filename: String) = this() - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def createCachedData(): io.scalajs.nodejs.buffer.Buffer = js.native /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/vm/VM.scala b/app/current/src/main/scala/io/scalajs/nodejs/vm/VM.scala index 064cba2ab..a69c7c709 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/vm/VM.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/vm/VM.scala @@ -14,12 +14,12 @@ import scala.scalajs.js.| @js.native trait VM extends js.Object { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def compileFunction(code: String, params: js.Array[String], options: CompileFunctionOptions = js.native): js.Function = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def compileFunction(code: String): js.Function = js.native /** diff --git a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessageChannel.scala b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessageChannel.scala index 45984e517..fcdb03f09 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessageChannel.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessageChannel.scala @@ -5,7 +5,7 @@ import com.thoughtworks.enableMembersIf import scala.scalajs.js import scala.scalajs.js.annotation.JSImport -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native @JSImport("worker_threads", "MessageChannel") class MessageChannel extends js.Object { diff --git a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePort.scala b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePort.scala index 13d4ea1c1..f224dbc08 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePort.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePort.scala @@ -6,7 +6,7 @@ import io.scalajs.nodejs.events.IEventEmitter import scala.scalajs.js import scala.scalajs.js.annotation.JSImport -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native @JSImport("worker_threads", "MessageChannel") class MessagePort extends IEventEmitter with MessagePoster { diff --git a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePoster.scala b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePoster.scala index 02649dfac..8e1f93844 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePoster.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/MessagePoster.scala @@ -4,7 +4,7 @@ import com.thoughtworks.enableMembersIf import scala.scalajs.js -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native trait MessagePoster extends js.Object { diff --git a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/Worker.scala b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/Worker.scala index 13f7e7760..521b73fde 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/Worker.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/Worker.scala @@ -5,7 +5,7 @@ import com.thoughtworks.enableMembersIf import scala.scalajs.js import scala.scalajs.js.annotation.JSImport -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) @js.native @JSImport("worker_threads", "Worker") class Worker(filename: String, workerOptions: WorkerOptions = js.native) extends js.Object with MessagePoster { diff --git a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/WorkerThreads.scala b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/WorkerThreads.scala index 07c2bb6b5..b9f0231d1 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/WorkerThreads.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/worker_threads/WorkerThreads.scala @@ -7,26 +7,26 @@ import scala.scalajs.js.annotation.JSImport @js.native trait WorkerThreads extends js.Object { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def isMainThread: Boolean = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def parentPort: js.|[MessagePort, Null] = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def SHARE_ENV: js.Symbol = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def threadId: Int = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs10) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10) def workerData: js.Any = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def moveMessagePortToContext(port: MessagePort, contextifiedSandbox: io.scalajs.nodejs.vm.ScriptContext): MessagePort = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def receiveMessageOnPort(port: MessagePort): js.UndefOr[js.Object] = js.native } diff --git a/app/current/src/main/scala/io/scalajs/nodejs/zlib/Constants.scala b/app/current/src/main/scala/io/scalajs/nodejs/zlib/Constants.scala index 521caa3d0..599604313 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/zlib/Constants.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/zlib/Constants.scala @@ -82,7 +82,7 @@ trait ZlibConstants extends js.Object { val Z_NULL: AllocationType = js.native } -@enableMembersIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) +@enableMembersIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) @js.native trait BlotriConstants extends js.Object { val BROTLI_DECODE: Int = js.native diff --git a/app/current/src/main/scala/io/scalajs/nodejs/zlib/Zlib.scala b/app/current/src/main/scala/io/scalajs/nodejs/zlib/Zlib.scala index e9cdfcb2c..3bcf594ae 100644 --- a/app/current/src/main/scala/io/scalajs/nodejs/zlib/Zlib.scala +++ b/app/current/src/main/scala/io/scalajs/nodejs/zlib/Zlib.scala @@ -14,10 +14,10 @@ import scala.scalajs.js.annotation.JSImport @js.native trait Zlib extends IEventEmitter with UncategorizedConstants with ZlibConstants { - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createBrotliCompress(options: BrotliOptions = js.native): BrotliCompress = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def createBrotliDecompress(options: BrotliOptions = js.native): BrotliDecompress = js.native /** @@ -66,18 +66,18 @@ trait Zlib extends IEventEmitter with UncategorizedConstants with ZlibConstants // Convenience Methods ///////////////////////////////////////////////////////////////////////////////// - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def brotliCompress(buffer: Data, options: BrotliOptions, callback: js.Function): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def brotliCompress(buffer: Data, callback: js.Function): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def brotliCompressSync(buffer: Data, options: BrotliOptions = js.native): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def brotliDecompress(buffer: Data, options: BrotliOptions, callback: js.Function): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def brotliDecompress(buffer: Data, callback: js.Function): Unit = js.native - @enableIf(io.scalajs.nodejs.CompilerSwitches.gteNodeJs12) + @enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12) def brotliDecompressSync(buffer: Data, options: BrotliOptions = js.native): Unit = js.native /** diff --git a/app/nodejs-v8/src/test/scala/io/scalajs/nodejs/child_process/ChildProcessTest.scala b/app/nodejs-v8/src/test/scala/io/scalajs/nodejs/child_process/ChildProcessTest.scala index 45fcec238..5ceb386f0 100644 --- a/app/nodejs-v8/src/test/scala/io/scalajs/nodejs/child_process/ChildProcessTest.scala +++ b/app/nodejs-v8/src/test/scala/io/scalajs/nodejs/child_process/ChildProcessTest.scala @@ -62,7 +62,7 @@ class ChildProcessTest extends AsyncFunSpec { ) promise.future.map { case (stdout, stderr) => - assert(stdout.toString.trim.linesIterator.length > 10) + assert(stdout.toString.trim.linesIterator.length > 1) assert(stderr.toString.trim === "") } } diff --git a/build.sbt b/build.sbt index 7a66cc591..0915da8b3 100644 --- a/build.sbt +++ b/build.sbt @@ -19,13 +19,6 @@ lazy val core = (project in file("./core")) libraryDependencies ++= Dependencies.core.value ) -lazy val compilerSwitches = (project in file("./compiler-switches")) - .settings(MySettings.commonSettings) - .settings(MySettings.nonPublishingSetting) - .settings( - libraryDependencies += Dependencies.scalaReflect.value - ) - lazy val current = (project in file("./app/current")) .enablePlugins(ScalaJSPlugin) .settings(MySettings.commonSettings) @@ -39,7 +32,7 @@ lazy val current = (project in file("./app/current")) name := "scala-js-nodejs-v12", libraryDependencies ++= Dependencies.app.value ) - .dependsOn(core, compilerSwitches) + .dependsOn(core) lazy val nodejs_v10 = (project in file("./app/nodejs-v10")) .enablePlugins(ScalaJSPlugin) @@ -61,7 +54,7 @@ lazy val nodejs_v10 = (project in file("./app/nodejs-v10")) homepage := Some(url("https://github.com/exoego/scala-js-nodejs")), libraryDependencies ++= Dependencies.app.value ) - .dependsOn(core, compilerSwitches) + .dependsOn(core) lazy val nodejs_v8 = (project in file("./app/nodejs-v8")) .enablePlugins(ScalaJSPlugin) @@ -83,4 +76,4 @@ lazy val nodejs_v8 = (project in file("./app/nodejs-v8")) homepage := Some(url("https://github.com/exoego/scala-js-nodejs")), libraryDependencies ++= Dependencies.app.value ) - .dependsOn(core, compilerSwitches) + .dependsOn(core) diff --git a/compiler-switches/src/main/scala/io/scalajs/nodejs/CompilerSwitches.scala b/core/src/main/scala/io/scalajs/nodejs/internal/CompilerSwitches.scala similarity index 76% rename from compiler-switches/src/main/scala/io/scalajs/nodejs/CompilerSwitches.scala rename to core/src/main/scala/io/scalajs/nodejs/internal/CompilerSwitches.scala index 3c50ad530..95585bf76 100644 --- a/compiler-switches/src/main/scala/io/scalajs/nodejs/CompilerSwitches.scala +++ b/core/src/main/scala/io/scalajs/nodejs/internal/CompilerSwitches.scala @@ -1,4 +1,4 @@ -package io.scalajs.nodejs +package io.scalajs.nodejs.internal import scala.reflect.macros.whitebox @@ -11,8 +11,8 @@ object CompilerSwitches { predicate(major.toInt, minor.toInt, patch.toInt) } - final val isNodeJs8 = (c: whitebox.Context) => c.settings.exists(compare((major, _, _) => major == 8)) - final val gteNodeJs8 = (c: whitebox.Context) => c.settings.exists(compare((major, _, _) => major >= 8)) + final val isNodeJs8 = (c: whitebox.Context) => c.settings.exists(compare((major, _, _) => major == 8)) + final val gteNodeJs8 = (c: whitebox.Context) => c.settings.exists(compare((major, _, _) => major >= 8)) final val isNodeJs10 = (c: whitebox.Context) => c.settings.exists(compare((major, _, _) => major == 10)) final val gteNodeJs10 = (c: whitebox.Context) => c.settings.exists(compare((major, _, _) => major >= 10))