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

Commit ad0acc1

Browse files
authored
Merge pull request #396 from exoego/nodejs16
Node.js 16
2 parents e1e6d6e + 0f3ad0c commit ad0acc1

File tree

246 files changed

+5125
-3614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+5125
-3614
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
fail-fast: false
88
matrix:
99
scala: [2.13.5, 2.12.13]
10-
nodejs: [14.16.0, 12.21.0, 10.24.0]
10+
nodejs: [16.3.0, 14.16.0, 12.21.0, 10.24.0]
1111
steps:
1212
- uses: actions/[email protected]
1313
- uses: olafurpg/setup-scala@v13

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14.10.0
1+
v16.3.0

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "2.7.5"
1+
version = "3.0.3"
22
style = defaultWithAlign
33
maxColumn = 120
44
align.openParenDefnSite = true

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/TestEnvironment.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ object TestEnvironment {
99

1010
def isWindows: Boolean = os.OS.platform().startsWith("win")
1111

12+
def isExecutedInExactNode16: Boolean = nodeMajorVersion == 16
1213
def isExecutedInExactNode14: Boolean = nodeMajorVersion == 14
1314
def isExecutedInExactNode12: Boolean = nodeMajorVersion == 12
1415
def isExecutedInExactNode10: Boolean = nodeMajorVersion == 10
15-
def isExecutedInExactNode8: Boolean = nodeMajorVersion == 8
1616

17+
def isExecutedInNode16OrNewer: Boolean = nodeMajorVersion >= 16
1718
def isExecutedInNode14OrNewer: Boolean = nodeMajorVersion >= 14
1819
def isExecutedInNode12OrNewer: Boolean = nodeMajorVersion >= 12
1920
def isExecutedInNode10OrNewer: Boolean = nodeMajorVersion >= 10

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/buffer/BufferTest.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ class BufferTest extends AnyFunSpec {
107107

108108
it("should support isEncoding") {
109109
assert(!Buffer.isEncoding(null))
110-
if (TestEnvironment.isExecutedInExactNode8) {
111-
assert(Buffer.isEncoding(""))
112-
} else {
113-
assert(!Buffer.isEncoding(""))
114-
}
110+
assert(!Buffer.isEncoding(""))
115111
assert(Buffer.isEncoding("utf8"))
116112
assert(Buffer.isEncoding("UTF-8"))
117113
}

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/perf_hooks/PerformanceObserverTest.scala

Lines changed: 0 additions & 24 deletions
This file was deleted.

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/process/ProcessTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import org.scalatest.funspec.AnyFunSpec
77
class ProcessTest extends AnyFunSpec {
88
describe("Process") {
99
val versionPrefix =
10-
if (TestEnvironment.isExecutedInExactNode8) "v8."
11-
else if (TestEnvironment.isExecutedInExactNode10) "v10."
10+
if (TestEnvironment.isExecutedInExactNode10) "v10."
1211
else if (TestEnvironment.isExecutedInExactNode12) "v12."
1312
else if (TestEnvironment.isExecutedInExactNode14) "v14."
13+
else if (TestEnvironment.isExecutedInExactNode16) "v16."
1414
else "Unknown node.js version"
1515

1616
it("contains the following properties") {

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/buffer/Buffer.scala

Lines changed: 0 additions & 923 deletions
This file was deleted.

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/crypto/Hash.scala

Lines changed: 0 additions & 73 deletions
This file was deleted.

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/crypto/Verify.scala

Lines changed: 0 additions & 51 deletions
This file was deleted.

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/path/Path.scala

Lines changed: 0 additions & 128 deletions
This file was deleted.

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/perf_hooks/PerfHooks.scala

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)