Skip to content

Commit 276e298

Browse files
Trottaddaleax
authored andcommitted
repl: use _REPL_ in user-facing text
User-facing error messages should use _REPL_ for the general REPL and not _repl_ which should be reserved for referring to the module itself, etc. _REPL_ is an acronym, so it should be capitalized, as it generally is in documentation in other technologies, and is usually in our own documentation. This fixes a few inconsistent usages in lib/repl.js. PR-URL: #34643 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent e146686 commit 276e298

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/repl.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
/* A repl library that you can include in your own code to get a runtime
22+
/* A REPL library that you can include in your own code to get a runtime
2323
* interface to your program.
2424
*
2525
* const repl = require("repl");
@@ -591,7 +591,7 @@ function REPLServer(prompt,
591591
'module';
592592
if (StringPrototypeIncludes(e.message, importErrorStr)) {
593593
e.message = 'Cannot use import statement inside the Node.js ' +
594-
'repl, alternatively use dynamic import';
594+
'REPL, alternatively use dynamic import';
595595
e.stack = e.stack.replace(/SyntaxError:.*\n/,
596596
`SyntaxError: ${e.message}\n`);
597597
}
@@ -814,7 +814,7 @@ function REPLServer(prompt,
814814

815815
if (e && !self[kBufferedCommandSymbol] && cmd.trim().startsWith('npm ')) {
816816
self.output.write('npm should be run outside of the ' +
817-
'node repl, in your normal shell.\n' +
817+
'node REPL, in your normal shell.\n' +
818818
'(Press Control-D to exit.)\n');
819819
self.displayPrompt();
820820
return;
@@ -1521,7 +1521,7 @@ function defineDefaultCommands(repl) {
15211521
});
15221522

15231523
repl.defineCommand('exit', {
1524-
help: 'Exit the repl',
1524+
help: 'Exit the REPL',
15251525
action: function() {
15261526
this.close();
15271527
}
@@ -1543,7 +1543,7 @@ function defineDefaultCommands(repl) {
15431543
this.output.write(line);
15441544
}
15451545
this.output.write('\nPress ^C to abort current expression, ' +
1546-
'^D to exit the repl\n');
1546+
'^D to exit the REPL\n');
15471547
this.displayPrompt();
15481548
}
15491549
});

test/parallel/test-repl.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ const errorTests = [
372372
{
373373
send: 'npm install foobar',
374374
expect: [
375-
'npm should be run outside of the node repl, in your normal shell.',
375+
'npm should be run outside of the node REPL, in your normal shell.',
376376
'(Press Control-D to exit.)'
377377
]
378378
},
@@ -453,7 +453,7 @@ const errorTests = [
453453
/\.load/,
454454
/\.save/,
455455
'',
456-
'Press ^C to abort current expression, ^D to exit the repl',
456+
'Press ^C to abort current expression, ^D to exit the REPL',
457457
/'thefourtheye'/
458458
]
459459
},

0 commit comments

Comments
 (0)