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

Scala upgrade #300

Merged
merged 4 commits into from
Jul 30, 2020
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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ dist: xenial
language: scala

scala:
- 2.12.11
- 2.13.2
- 2.12.12
- 2.13.3

jdk:
- openjdk11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ChildProcessTest extends AsyncFunSpec {
"cat ./package.json | wc -l",
callback = (error: Error, stdout: Output, stderr: Output) => {
if (isDefined(error)) {
promise.failure(error.toException)
promise.failure(error.toException())
} else {
promise.success((stdout, stderr))
}
Expand All @@ -52,7 +52,7 @@ class ChildProcessTest extends AsyncFunSpec {
js.Array("-l"),
callback = (error: Error, stdout: Output, stderr: Output) => {
if (isDefined(error)) {
promise.failure(error.toException)
promise.failure(error.toException())
} else {
promise.success((stdout, stderr))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FsTest extends AsyncFunSpec {
"Hello",
error => {
if (isDefined(error)) {
promise.failure(error.toException)
promise.failure(error.toException())
}
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.scalajs.nodejs

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|

/**
* The assert module provides a simple set of assertion tests that can be used to test invariants. The module is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import io.scalajs.nodejs.events.IEventEmitter
import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.typedarray.{DataView, TypedArray}
import scala.scalajs.js.|

/**
* To use this module, do require('string_decoder'). StringDecoder decodes a buffer to a string. It is a simple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.thoughtworks.enableIf
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSBracketAccess, JSGlobal, JSImport}
import scala.scalajs.js.typedarray.{ArrayBuffer, DataView, TypedArray, Uint8Array}
import scala.scalajs.js.|

/**
* @see [[https://nodejs.org/api/buffer.html]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import io.scalajs.nodejs.buffer.Buffer

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|

@js.native
@JSImport("crypto", "Certificate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import io.scalajs.nodejs.buffer.Buffer
import io.scalajs.nodejs.stream.Writable

import scala.scalajs.js
import scala.scalajs.js.|

/**
* The Sign Class is a utility for generating signatures. It can be used in one of two ways:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import io.scalajs.nodejs.buffer.Buffer
import io.scalajs.nodejs.stream.Writable

import scala.scalajs.js
import scala.scalajs.js.|

/**
* The Verify class is a utility for verifying signatures. It can be used in one of two ways:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.thoughtworks.enableIf

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|

/**
* The dns module contains functions belonging to two different categories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import io.scalajs.nodejs.url.URL

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|

/**
* To use the HTTP server and client one must require('http').
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package io.scalajs.nodejs
package http

import scala.scalajs.js
import scala.scalajs.js.|

/**
* Node.js http.ServerResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.scalajs.nodejs.url.URL
import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.typedarray.Uint8Array
import scala.scalajs.js.|

@js.native
trait Http2 extends js.Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.scalajs.nodejs.http2

import io.scalajs.nodejs.buffer.Buffer
import io.scalajs.nodejs.{net, tls, stream}

import scala.scalajs.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import io.scalajs.nodejs.url.URL

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|

/**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package io.scalajs.nodejs

import com.thoughtworks.enableIf
import io.scalajs.nodejs.buffer.Buffer
import io.scalajs.nodejs.http.{RequestOptions, ServerResponse}
import io.scalajs.util.PromiseHelper._
import io.scalajs.nodejs.url.URL

import scala.concurrent.Future
import scala.scalajs.js.|

/**
* https package object
Expand Down Expand Up @@ -63,6 +61,7 @@ package object https {

implicit final class AgentExtensions[T <: Agent](private val instance: T) extends AnyVal {
@enableIf(io.scalajs.nodejs.internal.CompilerSwitches.gteNodeJs12)
@inline def onKeylog(handler: (Buffer, tls.TLSSocket) => Any): T = instance.on("keylog", handler)
@inline def onKeylog(handler: (io.scalajs.nodejs.buffer.Buffer, tls.TLSSocket) => Any): T =
instance.on("keylog", handler)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import net.exoego.scalajs.types.util.Factory

import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal
import scala.scalajs.js.|

/**
* The process object is a global object and can be accessed from anywhere. It is an instance of EventEmitter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.scalajs.nodejs.readline.Interface
import net.exoego.scalajs.types.util.Factory

import scala.scalajs.js
import scala.scalajs.js.|

/**
* REPL Server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.scalajs.util.PromiseHelper.promiseWithError0
import scala.concurrent.Future
import scala.scalajs.js
import scala.scalajs.js.typedarray.Uint8Array
import scala.scalajs.js.|

package object stream {
type ErrorCallback = js.Function1[io.scalajs.nodejs.Error, Any]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package io.scalajs.nodejs.tls

import io.scalajs.nodejs.net

import io.scalajs.nodejs.buffer.Buffer
import io.scalajs.nodejs.{net, stream}
import _root_.net.exoego.scalajs.types.util.Factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package url

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.|

@js.native
@JSImport("url", "URL")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import net.exoego.scalajs.types.util.Factory
import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport
import scala.scalajs.js.typedarray.{ArrayBuffer, ArrayBufferView}
import scala.scalajs.js.|

@js.native
@JSImport("util", "TextDecoder")
class TextDecoder() extends js.Object {
Expand Down
1 change: 0 additions & 1 deletion project/MySettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ object MySettings {
"adapted-args",
"nullary-unit",
"inaccessible",
"nullary-override",
"infer-any",
"missing-interpolator",
"doc-detached",
Expand Down