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

Update scalafmt #133

Merged
merged 1 commit into from
Dec 7, 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.2"
version = "2.3.1"
style = defaultWithAlign
maxColumn = 120
align.openParenDefnSite = true
1 change: 1 addition & 0 deletions app/current/src/main/scala/io/scalajs/nodejs/Assert.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import scala.scalajs.js.|
*/
@js.native
trait Assert extends IEventEmitter {

/**
* An alias of assert.ok() .
* @param expression the expression to evaluate
Expand Down
1 change: 1 addition & 0 deletions app/current/src/main/scala/io/scalajs/nodejs/Error.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ 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 Down
1 change: 1 addition & 0 deletions app/current/src/main/scala/io/scalajs/nodejs/Module.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ 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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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,6 +13,7 @@ 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 @@ -16,6 +16,7 @@ package object buffer {
* Buffer Extensions
*/
implicit final class BufferExtensions(val buffer: Buffer) extends AnyVal {

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

/**
* The largest size allowed for a single `Buffer` instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ 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 @@ -21,6 +21,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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
1 change: 1 addition & 0 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,6 +14,7 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ package object dns {
* @param dns the DNS instance
*/
implicit final class DNSExtensions(private val dns: DNS) extends AnyVal {

/**
* 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
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ trait IEventEmitter extends js.Object {
@js.native
@JSImport("events", JSImport.Namespace)
object EventEmitter extends IEventEmitter {

/**
* By default, a maximum of 10 listeners can be registered for any single event. This limit can be changed
* for individual EventEmitter instances using the emitter.setMaxListeners(n) method. To change the default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import scala.scalajs.js
*/
@js.native
trait FSWatcher extends IEventEmitter {

/**
* Stop watching for changes on the given fs.FSWatcher.
* @example watcher.close()
Expand All @@ -22,10 +23,12 @@ trait FSWatcher extends IEventEmitter {
* File System Watcher Companion
*/
object FSWatcher {

/**
* File System Watcher Extensions
*/
implicit final class FSWatcherExtensions(val watcher: FSWatcher) extends AnyVal {

/**
* Emitted when something changes in a watched directory or file. See more details in fs.watch().
*
Expand Down
1 change: 1 addition & 0 deletions app/current/src/main/scala/io/scalajs/nodejs/fs/Fs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import scala.scalajs.js.|
*/
@js.native
trait Fs extends IEventEmitter with FSConstants {

/**
* Returns an object containing commonly used constants for file system operations
* @return an [[FSConstants object]] containing commonly used constants for file system operations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ class ReadStream(path: Path) extends stream.Readable {
* Read Stream Companion
*/
object ReadStream {

/**
* Read Stream Events
*/
implicit final class ReadStreamEvents(val stream: ReadStream) extends AnyVal {

/**
* Emitted when the ReadStream's underlying file descriptor has been closed using the fs.close() method.
* @param listener the event handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ class WriteStream(path: Path) extends stream.Writable {
* Write Stream Companion
*/
object WriteStream {

/**
* Write Stream Events
*/
implicit final class WriteStreamEvents(val stream: WriteStream) extends AnyVal {

/**
* Emitted when the WriteStream's underlying file descriptor has been closed using the fs.close() method.
* @param listener the event handler
Expand Down
2 changes: 2 additions & 0 deletions app/current/src/main/scala/io/scalajs/nodejs/http/Agent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ class Agent(options: AgentOptions = js.native) extends js.Object {
* Agent Companion
*/
object Agent {

/**
* Agent Extensions
*/
implicit final class AgentExtensions(val agent: Agent) extends AnyVal {

/**
* Produces a socket/stream to be used for HTTP requests. By default, this function is the same
* as net.createConnection(). However, custom Agents may override this method in case greater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class ClientRequest extends stream.Writable {
*/
object ClientRequest {
implicit final class ClientRequestExtensions(val client: ClientRequest) extends AnyVal {

/**
* Emitted when the request has been aborted by the client. This event is only emitted on the first call to abort().
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class IncomingMessage extends stream.Readable {
* Incoming Message Companion
*/
object IncomingMessage {

/**
* Incoming Message Extensions
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ class Server extends net.Server {
* Server Companion
*/
object Server {

/**
* Server Events
* @param server the given [[Server]]
*/
implicit final class ServerEvents(val server: Server) extends AnyVal {

/**
* Emitted each time a request with an HTTP Expect: 100-continue is received. If this event is not listened for,
* the server will automatically respond with a 100 Continue as appropriate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ trait ServerResponse extends stream.Writable {
* Server Response
*/
object ServerResponse {

/**
* Server Response Events
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import scala.scalajs.js
* http package object
*/
package object http {

/**
* Http Extensions
*/
implicit final class HttpExtensions(val http: Http) extends AnyVal {

/**
* @see [[Http.createServer()]]
*/
Expand Down Expand Up @@ -62,6 +64,7 @@ package object http {
* Server Events
*/
implicit final class ServerEvents(val server: Server) extends AnyVal {

/**
* Emitted each time a request with an http Expect: 100-continue is received. If this event isn't listened for,
* the server will automatically respond with a 100 Continue as appropriate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import scala.scalajs.js.|
* https package object
*/
package object https {

/**
* Https Extensions
*/
implicit final class HttpExtensions(val https: Https) extends AnyVal {

/**
* Like http.get() but for HTTPS.
*/
Expand Down
2 changes: 2 additions & 0 deletions app/current/src/main/scala/io/scalajs/nodejs/net/Server.scala
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ class Server(options: ServerOptions = js.native) extends IEventEmitter {
* Server Companion
*/
object Server extends {

/**
* Server Events
* @param server the given [[Server]]
*/
implicit final class ServerEvents(val server: Server) extends AnyVal {

/**
* Emitted when the server closes. Note that if connections exist, this event is not emitted until all
* connections are ended.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import scala.scalajs.js.annotation.JSImport
@js.native
@JSImport("net", "Socket")
class Socket(options: SocketOptions = js.native) extends stream.Duplex with HasHandle {

/**
* net.Socket has the property that socket.write() always works. This is to help users get up and running quickly.
* The computer cannot always keep up with the amount of data that is written to a socket - the network connection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package object net {
* @param server the given [[Server server]]
*/
implicit final class ServerEvents(val server: Server) extends AnyVal {

/**
* Emitted when a new connection is made. socket is an instance of net.Socket.
* @example server.on("close", function () { ... })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ trait ComponentVersion extends js.Object {
*/
@js.native
trait Warning extends js.Object {

/**
* The name of the warning (currently Warning by default).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import scala.scalajs.js.annotation.JSImport
*/
@js.native
trait Punycode extends js.Object {

/**
* The punycode.decode() method converts a Punycode string of ASCII-only characters to the equivalent
* string of Unicode codepoints.
Expand Down Expand Up @@ -62,6 +63,7 @@ trait Punycode extends js.Object {
*/
@js.native
trait UCS2 extends js.Object {

/**
* The punycode.ucs2.decode() method returns an array containing the numeric codepoint values of each Unicode
* symbol in the string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ object QueryString extends QueryString
*/
@js.native
trait QueryString extends js.Object {

/**
* The querystring.escape() method performs URL percent-encoding on the given str in a manner that is optimized
* for the specific requirements of URL query strings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import scala.scalajs.js
* query string package object
*/
package object querystring {

/**
* Query String Enrichment
* @param qs the given [[QueryString]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import scala.scalajs.js
*/
@js.native
trait Interface extends IEventEmitter {

/**
* Closes the Interface instance, relinquishing control on the input and output streams.
* The 'close' event will also be emitted.
Expand Down Expand Up @@ -94,11 +95,13 @@ class Key(
* Readline Interface Companion
*/
object Interface {

/**
* Readline Interface Events
* @param readline the given [[Interface Readline Interface]]
*/
implicit final class ReadlineEvents(val readline: Interface) extends AnyVal {

/**
* Emitted when close() is called. Also emitted when the input stream receives its 'end' event.
* The Interface instance should be considered "finished" once this is emitted. For example, when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import scala.scalajs.js.annotation.JSImport
*/
@js.native
trait Readline extends IEventEmitter {

/**
* Clears current line of given TTY stream in a specified direction. <tt>dir</tt> should have one of following values:
* <ul>
Expand Down
Loading