@@ -99,11 +99,11 @@ const {
99
99
const { BuiltinModule } = require ( 'internal/bootstrap/loaders' ) ;
100
100
const {
101
101
makeRequireFunction,
102
- addBuiltinLibsToObject
102
+ addBuiltinLibsToObject,
103
103
} = require ( 'internal/modules/helpers' ) ;
104
104
const {
105
105
isIdentifierStart,
106
- isIdentifierChar
106
+ isIdentifierChar,
107
107
} = require ( 'internal/deps/acorn/acorn/dist/acorn' ) ;
108
108
const {
109
109
decorateErrorStack,
@@ -118,7 +118,7 @@ const path = require('path');
118
118
const fs = require ( 'fs' ) ;
119
119
const { Interface } = require ( 'readline' ) ;
120
120
const {
121
- commonPrefix
121
+ commonPrefix,
122
122
} = require ( 'internal/readline/utils' ) ;
123
123
const { Console } = require ( 'console' ) ;
124
124
const CJSModule = require ( 'internal/modules/cjs/loader' ) . Module ;
@@ -173,7 +173,7 @@ const {
173
173
} = internalBinding ( 'util' ) ;
174
174
const {
175
175
startSigintWatchdog,
176
- stopSigintWatchdog
176
+ stopSigintWatchdog,
177
177
} = internalBinding ( 'contextify' ) ;
178
178
179
179
const history = require ( 'internal/repl/history' ) ;
@@ -296,7 +296,7 @@ function REPLServer(prompt,
296
296
'DEP0141' ) :
297
297
( val ) => this . input = val ,
298
298
enumerable : false ,
299
- configurable : true
299
+ configurable : true ,
300
300
} ) ;
301
301
ObjectDefineProperty ( this , 'outputStream' , {
302
302
__proto__ : null ,
@@ -313,7 +313,7 @@ function REPLServer(prompt,
313
313
'DEP0141' ) :
314
314
( val ) => this . output = val ,
315
315
enumerable : false ,
316
- configurable : true
316
+ configurable : true ,
317
317
} ) ;
318
318
319
319
this . allowBlockingCompletions = ! ! options . allowBlockingCompletions ;
@@ -462,7 +462,7 @@ function REPLServer(prompt,
462
462
importModuleDynamically : ( specifier , _ , importAssertions ) => {
463
463
return asyncESM . esmLoader . import ( specifier , parentURL ,
464
464
importAssertions ) ;
465
- }
465
+ } ,
466
466
} ) ;
467
467
} catch ( fallbackError ) {
468
468
if ( isRecoverableError ( fallbackError , fallbackCode ) ) {
@@ -506,7 +506,7 @@ function REPLServer(prompt,
506
506
importModuleDynamically : ( specifier , _ , importAssertions ) => {
507
507
return asyncESM . esmLoader . import ( specifier , parentURL ,
508
508
importAssertions ) ;
509
- }
509
+ } ,
510
510
} ) ;
511
511
} catch ( e ) {
512
512
debug ( 'parse error %j' , code , e ) ;
@@ -563,7 +563,7 @@ function REPLServer(prompt,
563
563
try {
564
564
const scriptOptions = {
565
565
displayErrors : false ,
566
- breakOnSigint : self . breakEvalOnSigint
566
+ breakOnSigint : self . breakEvalOnSigint ,
567
567
} ;
568
568
569
569
if ( self . useGlobal ) {
@@ -767,7 +767,7 @@ function REPLServer(prompt,
767
767
completer : options . completer || completer ,
768
768
terminal : options . terminal ,
769
769
historySize : options . historySize ,
770
- prompt
770
+ prompt,
771
771
} ] ) ;
772
772
773
773
self . resetContext ( ) ;
@@ -793,7 +793,7 @@ function REPLServer(prompt,
793
793
return ObjectAssign ( writer . options , options ) ;
794
794
} ,
795
795
enumerable : true ,
796
- configurable : true
796
+ configurable : true ,
797
797
} ) ;
798
798
}
799
799
}
@@ -967,7 +967,7 @@ function REPLServer(prompt,
967
967
968
968
const {
969
969
clearPreview,
970
- showPreview
970
+ showPreview,
971
971
} = setupPreview (
972
972
this ,
973
973
kContextId ,
@@ -1097,7 +1097,7 @@ REPLServer.prototype.createContext = function() {
1097
1097
__proto__ : null ,
1098
1098
configurable : true ,
1099
1099
writable : true ,
1100
- value : _console
1100
+ value : _console ,
1101
1101
} ) ;
1102
1102
}
1103
1103
@@ -1108,13 +1108,13 @@ REPLServer.prototype.createContext = function() {
1108
1108
__proto__ : null ,
1109
1109
configurable : true ,
1110
1110
writable : true ,
1111
- value : replModule
1111
+ value : replModule ,
1112
1112
} ) ;
1113
1113
ObjectDefineProperty ( context , 'require' , {
1114
1114
__proto__ : null ,
1115
1115
configurable : true ,
1116
1116
writable : true ,
1117
- value : makeRequireFunction ( replModule )
1117
+ value : makeRequireFunction ( replModule ) ,
1118
1118
} ) ;
1119
1119
1120
1120
addBuiltinLibsToObject ( context , '<REPL>' ) ;
@@ -1140,7 +1140,7 @@ REPLServer.prototype.resetContext = function() {
1140
1140
this . underscoreAssigned = true ;
1141
1141
this . output . write ( 'Expression assignment to _ now disabled.\n' ) ;
1142
1142
}
1143
- }
1143
+ } ,
1144
1144
} ) ;
1145
1145
1146
1146
ObjectDefineProperty ( this . context , '_error' , {
@@ -1154,7 +1154,7 @@ REPLServer.prototype.resetContext = function() {
1154
1154
this . output . write (
1155
1155
'Expression assignment to _error now disabled.\n' ) ;
1156
1156
}
1157
- }
1157
+ } ,
1158
1158
} ) ;
1159
1159
1160
1160
// Allow REPL extensions to extend the new context
@@ -1240,7 +1240,7 @@ function getGlobalLexicalScopeNames(contextId) {
1240
1240
return sendInspectorCommand ( ( session ) => {
1241
1241
let names = [ ] ;
1242
1242
session . post ( 'Runtime.globalLexicalScopeNames' , {
1243
- executionContextId : contextId
1243
+ executionContextId : contextId ,
1244
1244
} , ( error , result ) => {
1245
1245
if ( ! error ) names = result . names ;
1246
1246
} ) ;
@@ -1661,7 +1661,7 @@ function _memory(cmd) {
1661
1661
// scope will not work for this function.
1662
1662
ArrayPrototypePush ( self . lines . level , {
1663
1663
line : self . lines . length - 1 ,
1664
- depth : depth
1664
+ depth : depth ,
1665
1665
} ) ;
1666
1666
} else if ( depth < 0 ) {
1667
1667
// Going... up.
@@ -1711,7 +1711,7 @@ function defineDefaultCommands(repl) {
1711
1711
action : function ( ) {
1712
1712
this . clearBufferedCommand ( ) ;
1713
1713
this . displayPrompt ( ) ;
1714
- }
1714
+ } ,
1715
1715
} ) ;
1716
1716
1717
1717
let clearMessage ;
@@ -1729,14 +1729,14 @@ function defineDefaultCommands(repl) {
1729
1729
this . resetContext ( ) ;
1730
1730
}
1731
1731
this . displayPrompt ( ) ;
1732
- }
1732
+ } ,
1733
1733
} ) ;
1734
1734
1735
1735
repl . defineCommand ( 'exit' , {
1736
1736
help : 'Exit the REPL' ,
1737
1737
action : function ( ) {
1738
1738
this . close ( ) ;
1739
- }
1739
+ } ,
1740
1740
} ) ;
1741
1741
1742
1742
repl . defineCommand ( 'help' , {
@@ -1756,7 +1756,7 @@ function defineDefaultCommands(repl) {
1756
1756
this . output . write ( '\nPress Ctrl+C to abort current expression, ' +
1757
1757
'Ctrl+D to exit the REPL\n' ) ;
1758
1758
this . displayPrompt ( ) ;
1759
- }
1759
+ } ,
1760
1760
} ) ;
1761
1761
1762
1762
repl . defineCommand ( 'save' , {
@@ -1769,7 +1769,7 @@ function defineDefaultCommands(repl) {
1769
1769
this . output . write ( `Failed to save: ${ file } \n` ) ;
1770
1770
}
1771
1771
this . displayPrompt ( ) ;
1772
- }
1772
+ } ,
1773
1773
} ) ;
1774
1774
1775
1775
repl . defineCommand ( 'load' , {
@@ -1792,7 +1792,7 @@ function defineDefaultCommands(repl) {
1792
1792
this . output . write ( `Failed to load: ${ file } \n` ) ;
1793
1793
}
1794
1794
this . displayPrompt ( ) ;
1795
- }
1795
+ } ,
1796
1796
} ) ;
1797
1797
if ( repl . terminal ) {
1798
1798
repl . defineCommand ( 'editor' , {
@@ -1801,7 +1801,7 @@ function defineDefaultCommands(repl) {
1801
1801
_turnOnEditorMode ( this ) ;
1802
1802
this . output . write (
1803
1803
'// Entering editor mode (Ctrl+D to finish, Ctrl+C to cancel)\n' ) ;
1804
- }
1804
+ } ,
1805
1805
} ) ;
1806
1806
}
1807
1807
}
@@ -1818,15 +1818,15 @@ module.exports = {
1818
1818
REPLServer,
1819
1819
REPL_MODE_SLOPPY ,
1820
1820
REPL_MODE_STRICT ,
1821
- Recoverable
1821
+ Recoverable,
1822
1822
} ;
1823
1823
1824
1824
ObjectDefineProperty ( module . exports , 'builtinModules' , {
1825
1825
__proto__ : null ,
1826
1826
get : ( ) => _builtinLibs ,
1827
1827
set : ( val ) => _builtinLibs = val ,
1828
1828
enumerable : true ,
1829
- configurable : true
1829
+ configurable : true ,
1830
1830
} ) ;
1831
1831
1832
1832
ObjectDefineProperty ( module . exports , '_builtinLibs' , {
@@ -1842,5 +1842,5 @@ ObjectDefineProperty(module.exports, '_builtinLibs', {
1842
1842
'DEP0142' ,
1843
1843
) : ( val ) => _builtinLibs = val ,
1844
1844
enumerable : false ,
1845
- configurable : true
1845
+ configurable : true ,
1846
1846
} ) ;
0 commit comments