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

Commit 14cebca

Browse files
author
TATSUNO Yasuhiro
authored
Merge pull request #14 from exoego/console
Overhaul console module
2 parents 6a1aec8 + 907da07 commit 14cebca

File tree

11 files changed

+409
-192
lines changed

11 files changed

+409
-192
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ scala:
55
- 2.12.8
66
- 2.13.0
77

8+
env:
9+
- TRAVIS_NODE_VERSION="12.5.0"
10+
811
jdk:
912
- openjdk8
1013
- openjdk11
1114

15+
install:
16+
- rm -rf ~/.nvm &&
17+
git clone https://github.com/nvm-sh/nvm.git ~/.nvm &&
18+
(cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) &&
19+
source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
20+
1221
script:
1322
- sbt ++$TRAVIS_SCALA_VERSION scalafmtSbtCheck scalafmtCheck test:scalafmtCheck test
1423

README.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,35 @@ libraryDependencies += "net.exoego" %%% "scala-js-nodejs-v8" % "0.8.0"
2727

2828
### Supported Modules
2929

30-
The following core Node.js modules (v8.7.0) have been implemented:
31-
32-
| Node Module | Description |
33-
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34-
| assert | Provides a simple set of assertion tests that can be used to test invariants. |
35-
| buffer | The Buffer class was introduced as part of the Node.js API to make it possible to interact with octet streams in the context of things like TCP streams and file system operations. |
36-
| child_process | The child_process module provides the ability to spawn child processes. |
37-
| cluster | The cluster module allows you to easily create child processes that all share server ports. |
38-
| crypto | The crypto module provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions. |
39-
| dns | Support for DNS queries. |
40-
| events | Node.js Events Interface |
41-
| fs | File I/O is provided by simple wrappers around standard POSIX functions. |
42-
| http | Node.js HTTP Interface |
43-
| https | Node.js HTTPS Interface |
44-
| net | The net module provides you with an asynchronous network wrapper. |
45-
| os | Provides a few basic operating-system related utility functions. |
46-
| path | This module contains utilities for handling and transforming file paths. |
47-
| querystring | The querystring module provides utilities for parsing and formatting URL query strings. |
48-
| readline | Readline allows reading of a stream on a line-by-line basis. |
49-
| repl | The REPL provides a way to interactively run JavaScript and see the results. |
50-
| stream | A stream is an abstract interface implemented by various objects in Node.js. |
51-
| string-decoder | The string_decoder module provides an API for decoding Buffer objects into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 characters. |
52-
| timers | The timer module exposes a global API for scheduling functions to be called at some future period of time. |
53-
| tty | The tty module provides the tty.ReadStream and tty.WriteStream classes. |
54-
| url | The url module provides utilities for URL resolution and parsing. |
55-
| util | The util module is primarily designed to support the needs of Node.js's internal APIs. |
56-
| vm | The vm module provides APIs for compiling and running code within V8 Virtual Machine contexts. |
57-
| zlib | This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. |
30+
The following core Node.js modules (v8.7.0+) have been implemented:
31+
32+
| Node Module | Description | v10 & v12 support |
33+
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
34+
| assert | Provides a simple set of assertion tests that can be used to test invariants. | |
35+
| buffer | The Buffer class was introduced as part of the Node.js API to make it possible to interact with octet streams in the context of things like TCP streams and file system operations. | |
36+
| child_process | The child_process module provides the ability to spawn child processes. | |
37+
| cluster | The cluster module allows you to easily create child processes that all share server ports. | |
38+
| console | The `console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers. | :heavy_check_mark: |
39+
| crypto | The crypto module provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions. | |
40+
| dns | Support for DNS queries. | |
41+
| events | Node.js Events Interface | |
42+
| fs | File I/O is provided by simple wrappers around standard POSIX functions. | |
43+
| http | Node.js HTTP Interface | |
44+
| https | Node.js HTTPS Interface | |
45+
| net | The net module provides you with an asynchronous network wrapper. | |
46+
| os | Provides a few basic operating-system related utility functions. | |
47+
| path | This module contains utilities for handling and transforming file paths. | |
48+
| querystring | The querystring module provides utilities for parsing and formatting URL query strings. | |
49+
| readline | Readline allows reading of a stream on a line-by-line basis. | |
50+
| repl | The REPL provides a way to interactively run JavaScript and see the results. | |
51+
| stream | A stream is an abstract interface implemented by various objects in Node.js. | |
52+
| string-decoder | The string_decoder module provides an API for decoding Buffer objects into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 characters. | |
53+
| timers | The timer module exposes a global API for scheduling functions to be called at some future period of time. | |
54+
| tty | The tty module provides the tty.ReadStream and tty.WriteStream classes. | |
55+
| url | The url module provides utilities for URL resolution and parsing. | |
56+
| util | The util module is primarily designed to support the needs of Node.js's internal APIs. | |
57+
| vm | The vm module provides APIs for compiling and running code within V8 Virtual Machine contexts. | |
58+
| zlib | This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. | |
5859

5960
## Example of code
6061

app/current/src/main/scala/io/scalajs/nodejs/Console.scala

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

app/current/src/main/scala/io/scalajs/nodejs/Global.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ trait Global extends js.Object {
7070

7171
def clearTimeout: ClearTimeout = js.native
7272

73-
def console: Console = js.native
73+
def console: console_module.Console = js.native
7474

7575
def process: Process = js.native
7676

0 commit comments

Comments
 (0)