Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Update scalafmt-core and apply changes. #126

Merged
merged 1 commit into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2.2.1"
version = "2.2.2"
style = defaultWithAlign
maxColumn = 120
align.openParenDefnSite = true
1 change: 0 additions & 1 deletion app/current/src/main/scala/io/scalajs/nodejs/Assert.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import scala.scalajs.js.|
*/
@js.native
trait Assert extends IEventEmitter {

/**
* An alias of assert.ok() .
* @param expression the expression to evaluate
Expand Down
4 changes: 0 additions & 4 deletions app/current/src/main/scala/io/scalajs/nodejs/Error.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import scala.scalajs.js.annotation.{JSGlobal, JSImport}
@js.native
@JSImport("errors", "Error")
class Error(message0: String = js.native) extends js.Object {

/**
* The `error.code` property is a string label that identifies the kind of error.
* `error.code` is the most stable way to identify an error.
Expand All @@ -36,7 +35,6 @@ class Error(message0: String = js.native) extends js.Object {
* The error.stack property is a string describing the point in the code at which the Error was instantiated.
*/
val stack: js.Any = js.native

}

/**
Expand All @@ -45,7 +43,6 @@ class Error(message0: String = js.native) extends js.Object {
@js.native
@JSGlobal
object Error extends js.Object {

/////////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
Expand All @@ -71,7 +68,6 @@ object Error extends js.Object {
* @example Error.captureStackTrace(targetObject[, constructorOpt])
*/
def captureStackTrace(targetObject: js.Any, constructorOpt: js.Any = js.native): Unit = js.native

}

object ErrorCodes {
Expand Down
3 changes: 0 additions & 3 deletions app/current/src/main/scala/io/scalajs/nodejs/Module.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import scala.scalajs.js.annotation.JSImport
*/
@js.native
trait Module extends js.Object {

/**
* The module objects required by this one.
* @example module.children
Expand Down Expand Up @@ -62,7 +61,6 @@ trait Module extends js.Object {
* explicitly exported in order to be used.
*/
def require[T <: js.Any](id: String): T = js.native

}

/**
Expand All @@ -71,7 +69,6 @@ trait Module extends js.Object {
@js.native
@JSImport("module", JSImport.Namespace)
object Module extends Module {

@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs10)
var builtinModules: js.Array[String] = js.native

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import scala.scalajs.js.|
@js.native
@JSImport("string_decoder", "StringDecoder")
class StringDecoder(encoding: String = js.native) extends IEventEmitter {

/**
* Returns any trailing bytes that were left in the buffer.
* @example decoder.end()
Expand All @@ -26,5 +25,4 @@ class StringDecoder(encoding: String = js.native) extends IEventEmitter {
* @example decoder.write(buffer)
*/
def write(buffer: TypedArray[_, _] | DataView): String = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import scala.scalajs.js.|
@js.native
@JSImport("errors", "SystemError")
class SystemError(message0: String = js.native) extends Error(message0) {

/**
* The error.errno property is a number or a string. The number is a negative value which corresponds
* to the error code defined in libuv Error handling. See uv-errno.h header file (deps/uv/include/uv-errno.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import scala.scalajs.js.|
@js.native
@JSImport("buffer", "Buffer")
class Buffer private[this] () extends Uint8Array( /* dummy to trick constructor */ -1) {

/**
* The index operator `[index]` can be used to get and set the octet at position `index` in `buf`.
* The values refer to individual bytes, so the legal value range is between `0x00` and `0xFF` (hex) or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import scala.scalajs.js.typedarray.Uint8Array
* buffer package object
*/
package object buffer {

/////////////////////////////////////////////////////////////////////////////////
// Buffer Extensions
/////////////////////////////////////////////////////////////////////////////////
Expand All @@ -17,7 +16,6 @@ package object buffer {
* Buffer Extensions
*/
implicit final class BufferExtensions(val buffer: Buffer) extends AnyVal {

/**
* Syntactic sugar for concatenating a buffer
*
Expand Down Expand Up @@ -104,7 +102,6 @@ package object buffer {
@js.native
@JSImport("buffer", "constants")
object constants extends js.Object {

/**
* The largest size allowed for a single `Buffer` instance.
*
Expand All @@ -124,5 +121,4 @@ package object buffer {
*/
val MAX_STRING_LENGTH: Int = js.native
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,4 @@ object ChildProcess extends scala.scalajs.js.Object {
args: js.Array[String] = js.native,
options: SpawnSyncOptions = js.native
): SpawnSyncResult = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import scala.scalajs.js.|

@js.native
trait Address extends js.Object {

def address: String = js.native

def port: Int = js.native
Expand All @@ -18,5 +17,4 @@ trait Address extends js.Object {
* "udp4" or "udp6" (UDP v4 or v6)
*/
def addressType: String | Int = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import scala.scalajs.js.annotation.JSImport
*/
@js.native
trait Cluster extends IEventEmitter {

/////////////////////////////////////////////////////////////////////////////////
// Constants
/////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -107,7 +106,6 @@ trait Cluster extends IEventEmitter {
* @example cluster.setupMaster([settings])
*/
def setupMaster(settings: ClusterSettings): Unit = js.native

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import scala.scalajs.js.|
*/
@js.native
trait ClusterSettings extends js.Object {

/** <Array> list of string arguments passed to the Node.js executable. (Default=process.execArgv) */
var execArgv: js.Array[String] = js.native

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import scala.scalajs.js
*/
@js.native
trait Worker extends IEventEmitter {

/////////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -98,5 +97,4 @@ trait Worker extends IEventEmitter {
* @example worker.send(message[, sendHandle][, callback])
*/
def send(message: Message, sendHandle: Handle = js.native, callback: js.Function = js.native): Unit = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import scala.scalajs.js
* cluster package object
*/
package object cluster {

type Message = js.Any

/////////////////////////////////////////////////////////////////////////////////
Expand All @@ -22,7 +21,6 @@ package object cluster {
* @param cluster the given [[Cluster cluster]]
*/
implicit final class ClusterEvents(private val cluster: Cluster) extends AnyVal {

/**
* Emitted after the worker IPC channel has disconnected. This can occur when a worker exits gracefully, is killed,
* or is disconnected manually (such as with worker.disconnect()).
Expand Down Expand Up @@ -96,7 +94,6 @@ package object cluster {
*/
@inline
def onSetup(callback: ClusterSettings => Any): Cluster = cluster.on("setup", callback)

}

/////////////////////////////////////////////////////////////////////////////////
Expand All @@ -108,7 +105,6 @@ package object cluster {
* @param worker the given [[Worker worker]]
*/
implicit final class WorkerEvents(private val worker: Worker) extends AnyVal {

/////////////////////////////////////////////////////////////////////////////////
// Worker Extensions
/////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -175,7 +171,5 @@ package object cluster {
*/
@inline
def onOnline(callback: () => Any): Worker = worker.on("online", callback)

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import scala.scalajs.js.annotation.{JSGlobal, JSImport}
@js.native
@JSImport("console", "Console")
class Console protected () extends js.Object {

def this(stdout: IWritable, stderr: IWritable = js.native, ignoreErrors: Boolean = true) = this()

def this(options: ConsoleOptions) = this()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import scala.scalajs.js
*/
@js.native
sealed trait Cipher extends Transform {

/**
* Returns any remaining enciphered contents. If output_encoding parameter is one of 'binary', 'base64' or 'hex',
* a string is returned. If an output_encoding is not provided, a Buffer is returned.
Expand Down Expand Up @@ -83,7 +82,6 @@ sealed trait Cipher extends Transform {
def update(data: String, inputEncoding: String, outputEncoding: String): String = js.native
def update(data: String, inputEncoding: String): Buffer = js.native
def update(data: BufferLike): Buffer = js.native

}

class SetAADOptions(transform: js.UndefOr[js.Function] = js.undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import scala.scalajs.js.|
*/
@js.native
trait Crypto extends js.Object {

/////////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -385,7 +384,6 @@ object Constants extends js.Object {

val defaultCoreCipherList: String = js.native
val defaultCipherList: String = js.native

}

class CreatePrivateKeyOptions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import scala.scalajs.js
*/
@js.native
sealed trait Decipher extends Transform {

/**
* Returns any remaining deciphered contents. If output_encoding parameter is one of 'binary', 'base64' or 'hex',
* a string is returned. If an output_encoding is not provided, a Buffer is returned.
Expand Down Expand Up @@ -79,5 +78,4 @@ sealed trait Decipher extends Transform {
def update(data: String, inputEncoding: String, outputEncoding: String): String = js.native
def update(data: String, inputEncoding: String): Buffer = js.native
def update(data: BufferLike): Buffer = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import scala.scalajs.js
*/
@js.native
sealed trait Hash extends Transform {

/**
* Calculates the digest of all of the data passed to be hashed (using the hash.update() method). The encoding can
* be 'hex', 'binary' or 'base64'. If encoding is provided a string will be returned; otherwise a Buffer is returned.
Expand Down Expand Up @@ -50,7 +49,6 @@ sealed trait Hash extends Transform {
def update(data: String, inputEncoding: String): Hash = js.native
def update(data: String): Hash = js.native
def update(data: BufferLike): Hash = js.native

}

class CreateHashOptions(transform: js.UndefOr[js.Function] = js.undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import scala.scalajs.js
*/
@js.native
sealed trait Hmac extends Transform {

/**
* Calculates the HMAC digest of all of the data passed using hmac.update(). The encoding can be 'hex', 'binary'
* or 'base64'. If encoding is provided a string is returned; otherwise a Buffer is returned;
Expand Down Expand Up @@ -69,5 +68,4 @@ sealed trait Hmac extends Transform {
* @param data the given [[Buffer data]]
*/
def update(data: BufferLike): Hmac = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import scala.scalajs.js.|
*/
@js.native
trait Verify extends Writable {

/**
* Updates the Verify content with the given data.
* This can be called many times with new data as it is streamed.
Expand Down Expand Up @@ -49,5 +48,4 @@ trait Verify extends Writable {
def verify(obj: KeyObject, signature: String, signatureEncoding: String): Boolean = js.native
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
def verify(obj: KeyObject, signature: BufferLike): Boolean = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ import scala.scalajs.js.typedarray.{DataView, TypedArray}
import scala.scalajs.js.|

package object crypto {

type BufferLike = TypedArray[_, _] | DataView
type Callback1[T] = js.Function2[NodeError, T, Any]
type Callback2[T1, T2] = js.Function3[NodeError, T1, T2, Any]

implicit final class CryptoModuleEnrichment(private val crypto: Crypto.type) extends AnyVal {
@inline def Certificate = io.scalajs.nodejs.crypto.Certificate
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import scala.scalajs.js.annotation.JSImport
@js.native
@JSImport("dgram", "Socket")
class Socket private[this] () extends IEventEmitter {

/**
* Tells the kernel to join a multicast group at the given multicastAddress and multicastInterface using the
* IP_ADD_MEMBERSHIP socket option. If the multicastInterface argument is not specified, the operating system
Expand Down
3 changes: 0 additions & 3 deletions app/current/src/main/scala/io/scalajs/nodejs/dns/DNS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import scala.scalajs.js.|
*/
@js.native
trait DNS extends IResolver {

/**
* Resolves a hostname (e.g. 'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. options can be an
* object or integer. If options is not provided, then IPv4 and IPv6 addresses are both valid. If options is an
Expand Down Expand Up @@ -78,7 +77,6 @@ trait DNS extends IResolver {
@js.native
@JSImport("dns", JSImport.Namespace)
object DNS extends DNS {

@js.native
object promises extends js.Object {
type Resolver = PromisesResolver
Expand Down Expand Up @@ -159,5 +157,4 @@ object DNS extends DNS {

/** DNS query cancelled. */
val CANCELLED: String = js.native

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Resolver extends IResolver {

@js.native
trait IResolver extends js.Object {

def getServers(): js.Array[String] = js.native

def resolve(hostname: String, rrtype: RRType, callback: DnsCallback1[ResolveResult]): Unit =
Expand Down
Loading