@@ -28,6 +28,7 @@ const isTTY = process.binding('tty_wrap').isTTY;
28
28
const inherits = util . inherits ;
29
29
const errnoException = util . _errnoException ;
30
30
const errors = require ( 'internal/errors' ) ;
31
+ const readline = require ( 'readline' ) ;
31
32
32
33
exports . isatty = function ( fd ) {
33
34
return isTTY ( fd ) ;
@@ -117,16 +118,16 @@ WriteStream.prototype._refreshSize = function() {
117
118
118
119
// backwards-compat
119
120
WriteStream . prototype . cursorTo = function ( x , y ) {
120
- require ( ' readline' ) . cursorTo ( this , x , y ) ;
121
+ readline . cursorTo ( this , x , y ) ;
121
122
} ;
122
123
WriteStream . prototype . moveCursor = function ( dx , dy ) {
123
- require ( ' readline' ) . moveCursor ( this , dx , dy ) ;
124
+ readline . moveCursor ( this , dx , dy ) ;
124
125
} ;
125
126
WriteStream . prototype . clearLine = function ( dir ) {
126
- require ( ' readline' ) . clearLine ( this , dir ) ;
127
+ readline . clearLine ( this , dir ) ;
127
128
} ;
128
129
WriteStream . prototype . clearScreenDown = function ( ) {
129
- require ( ' readline' ) . clearScreenDown ( this ) ;
130
+ readline . clearScreenDown ( this ) ;
130
131
} ;
131
132
WriteStream . prototype . getWindowSize = function ( ) {
132
133
return [ this . columns , this . rows ] ;
0 commit comments