Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace interactive mode tty API with readline (#82) #83

Merged
merged 1 commit into from
Feb 26, 2019

Conversation

klaudiosinani
Copy link
Owner

Description

The PR replaces the function of Group A, originating from the tty.WriteStream API, which are used by the interactive mode, with the ones of Group B, originating from the readline API, due to the deprecated nature of the ones in the first group.

Group A - tty.WriteStream API (old/depraceted)

Group B - readline API (new)

Changes Overview

  _write(stream, message) {
    if (this._interactive && stream.isTTY && isPreviousLogInteractive) {
-      stream.moveCursor(0, -1);
-      stream.clearLine();
-      stream.cursorTo(0);
+      readline.moveCursor(stream, 0, -1);
+      readline.clearLine(stream);
+      readline.cursorTo(stream, 0);
    }

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant