readline: move utilities to internal modules

PR-URL: https://github.com/nodejs/node/pull/38466
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Antoine du Hamel 2021-04-27 16:10:15 +02:00 committed by Michaël Zasso
parent 69c57e99f0
commit 54dfdbcccf
No known key found for this signature in database
GPG key ID: 770F7A9A5AE15600
6 changed files with 243 additions and 196 deletions

View file

@ -429,7 +429,10 @@ const consoleMethods = {
if (this._stdout.isTTY && process.env.TERM !== 'dumb') {
// The require is here intentionally to avoid readline being
// required too early when console is first loaded.
const { cursorTo, clearScreenDown } = require('readline');
const {
cursorTo,
clearScreenDown,
} = require('internal/readline/callbacks');
cursorTo(this._stdout, 0, 0);
clearScreenDown(this._stdout);
}