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

Update scalafmt-core to 3.0.8 #429

Merged
merged 2 commits into from
Oct 29, 2021
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 = "3.0.7"
version = "3.0.8"
style = defaultWithAlign
maxColumn = 120
align.openParenDefnSite = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class HttpTest extends AnyFunSpec {
assert(server !== null)

// don't listen on a port
//server.listen(58888)
//setTimeout(() => server.close(), 100.millis)
// server.listen(58888)
// setTimeout(() => server.close(), 100.millis)
}

it("should provide statusCode") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class StatusCodeTest extends AnyFunSpec {
assert(server !== null)

// don't listen on a port
//server.listen(58888)
//setTimeout(() => server.close(), 100.millis)
// server.listen(58888)
// setTimeout(() => server.close(), 100.millis)
}
}
}
8 changes: 4 additions & 4 deletions app/nodejs-v16/src/main/scala/io/scalajs/nodejs/Error.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ class Error() extends js.Object {
@js.native
@JSGlobal
object Error extends js.Object {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Error.stackTraceLimit
*/
def stackTraceLimit: Int = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Creates a .stack property on targetObject, which when accessed returns a string representing the location in the
* code at which Error.captureStackTrace() was called.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class Buffer protected () extends Uint8Array( /* dummy to trick constructor */ -
@JSBracketAccess
def update(index: Int, value: Int): Unit = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Compares `buf` with `target` and returns a number indicating whether `buf` comes before, after, or is the same as
* `target` in sort order. Comparison is based on the actual sequence of bytes in each `Buffer`.
Expand Down Expand Up @@ -1011,18 +1011,18 @@ class Buffer protected () extends Uint8Array( /* dummy to trick constructor */ -
@js.native
@JSGlobal
object Buffer extends js.Object {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for
* pooling. This value may be modified.
*/
var poolSize: Int = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package object buffer {
type BlobSources =
js.Array[String] | js.Array[ArrayBuffer] | js.Array[TypedArray[_, _]] | js.Array[DataView] | js.Array[Blob]

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Buffer Extensions
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Buffer Extensions
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import scala.scalajs.js.annotation.JSImport
*/
@js.native
trait Cluster extends IEventEmitter {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Constants
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

val SCHED_NONE: Int = js.native

val SCHED_RR: Int = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** True if the process is a master. This is determined by the process.env.NODE_UNIQUE_ID. If
* process.env.NODE_UNIQUE_ID is undefined, then isMaster is true.
Expand Down Expand Up @@ -64,9 +64,9 @@ trait Cluster extends IEventEmitter {
*/
def workers: js.Dictionary[Worker] = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** When they are disconnected all internal handles will be closed, allowing the master process to die gracefully if
* no other event is waiting.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import scala.scalajs.js
*/
@js.native
trait Worker extends IEventEmitter {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Set by calling .kill() or .disconnect(). Until then, it is undefined.
*
Expand All @@ -35,9 +35,9 @@ trait Worker extends IEventEmitter {
*/
def process: ChildProcess = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** In a worker, this function will close all servers, wait for the 'close' event on those servers, and then
* disconnect the IPC channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import scala.scalajs.js
package object cluster {
type Message = js.Any

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Cluster Events and Extensions
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Cluster Events
* @param cluster
Expand Down Expand Up @@ -92,18 +92,18 @@ package object cluster {
def onSetup(callback: ClusterSettings => Any): Cluster = cluster.on("setup", callback)
}

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Worker Events and Extensions
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Worker Events and Extensions
* @param worker
* the given [[Worker worker]]
*/
implicit final class WorkerExtensions(private val worker: Worker) extends AnyVal {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Worker Extensions
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Send a message to a worker or master, optionally with a handle. In the master this sends a message to a specific
* worker. It is identical to ChildProcess.send(). In a worker this sends a message to the master. It is identical
Expand All @@ -114,9 +114,9 @@ package object cluster {
@inline
def sendFuture[T](message: Message): Future[T] = promiseCallback1[T](worker.send(message, _))

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Worker Events
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Similar to the cluster.on('disconnect') event, but specific to this worker.
* @param callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import scala.scalajs.js.|
*/
@js.native
trait Crypto extends js.Object {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** The default encoding to use for functions that can take either strings or buffers. The default value is 'buffer',
* which makes methods default to Buffer objects.
Expand All @@ -39,9 +39,9 @@ trait Crypto extends js.Object {
@deprecated("Please use crypto.setFips() and crypto.getFips() instead.", "Node.js v10.0")
var fips: Boolean = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Creates and returns a Cipher object that uses the given algorithm and password.
* @param algorithm
Expand Down
8 changes: 4 additions & 4 deletions app/nodejs-v16/src/main/scala/io/scalajs/nodejs/dns/DNS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ object DNS extends DNS {
type Resolver = PromisesResolver
}

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// getaddrinfo flags
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
/** Returned address types are determined by the types of addresses supported by the current system. For example, IPv4
* addresses are only returned if the current system has at least one IPv4 address configured. Loopback addresses are
* not considered.
Expand All @@ -97,9 +97,9 @@ object DNS extends DNS {
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs14)
val ALL: Int = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Error Codes
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** DNS server returned answer with no data. */
val NODATA: String = js.native
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import scala.scalajs.js.|
/** dns package object
*/
package object dns {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Type Definitions
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

type DnsError = SystemError

Expand All @@ -23,9 +23,9 @@ package object dns {

type ResolveResult = js.Array[String | ResolveObject] | SOA

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Constants
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

// IPV4 addresses, default
final val RRTYPE_A: RRType = "A"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ trait EventEmitterOptions extends js.Object {
*/
@js.native
trait IEventEmitter extends js.Object {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

var domain: Domain = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Alias for emitter.on(eventName, listener).
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import scala.scalajs.js
*/
@js.native
trait FSConstants extends js.Object {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// File Access Constants
//
// The following constants are meant for use with fs.access().
///////////////////////////////////////////////////////////////////////////////// `
// /////////////////////////////////////////////////////////////////////////////// `

/** File is visible to the calling process. This is useful for determining if a file exists, but says nothing about
* rwx permissions. Default if no mode is specified.
Expand All @@ -30,11 +30,11 @@ trait FSConstants extends js.Object {
*/
val X_OK: FileMode = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// File Mode Constants
//
// The following constants are meant for use with fs.Stats.
///////////////////////////////////////////////////////////////////////////////// `
// /////////////////////////////////////////////////////////////////////////////// `
val S_IRGRP: FileMode = js.native
val S_IROTH: FileMode = js.native
val S_IRUSR: FileMode = js.native
Expand All @@ -48,11 +48,11 @@ trait FSConstants extends js.Object {
val S_IXOTH: FileMode = js.native
val S_IXUSR: FileMode = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// File Open Constants
//
// The following constants are meant for use with fs.open().
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Flag indicating to open a file for read-only access.
*/
Expand Down Expand Up @@ -121,12 +121,12 @@ trait FSConstants extends js.Object {
*/
val O_DSYNC: Int = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// File Type Constants
//
// The following constants are meant for use with the fs.Stats object's mode
// property for determining a file's type.
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Bit mask used to extract the file type code.
*/
Expand Down Expand Up @@ -160,9 +160,9 @@ trait FSConstants extends js.Object {
*/
val S_IFSOCK: FileType = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// File Copy Constants
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
val COPYFILE_EXCL: Int = js.native
val COPYFILE_FICLONE: Int = js.native
val COPYFILE_FICLONE_FORCE: Int = js.native
Expand Down
4 changes: 2 additions & 2 deletions app/nodejs-v16/src/main/scala/io/scalajs/nodejs/fs/Fs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ trait Fs extends js.Object {
*/
def constants: FSConstants = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Tests a user's permissions for the file specified by path. mode is an optional integer that specifies the
* accessibility checks to be performed. The following constants define the possible values of mode. It is possible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import scala.scalajs.js.|
@js.native
@JSImport("fs", "ReadStream")
class ReadStream(path: Path) extends stream.Readable {
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Properties
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** The number of bytes read so far.
*/
Expand All @@ -29,9 +29,9 @@ class ReadStream(path: Path) extends stream.Readable {
*/
def path: Buffer | String = js.native

/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////

/** Undocumented method
* @see
Expand Down
Loading