Skip to content

Commit 614298d

Browse files
committed
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 <targos@protonmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent e948ef3 commit 614298d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/repl.js

Lines changed: 5 additions & 5 deletions
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");
@@ -581,7 +581,7 @@ function REPLServer(prompt,
581581
'module';
582582
if (StringPrototypeIncludes(e.message, importErrorStr)) {
583583
e.message = 'Cannot use import statement inside the Node.js ' +
584-
'repl, alternatively use dynamic import';
584+
'REPL, alternatively use dynamic import';
585585
e.stack = e.stack.replace(/SyntaxError:.*\n/,
586586
`SyntaxError: ${e.message}\n`);
587587
}
@@ -790,7 +790,7 @@ function REPLServer(prompt,
790790

791791
if (e && !self[kBufferedCommandSymbol] && cmd.trim().startsWith('npm ')) {
792792
self.output.write('npm should be run outside of the ' +
793-
'node repl, in your normal shell.\n' +
793+
'node REPL, in your normal shell.\n' +
794794
'(Press Control-D to exit.)\n');
795795
self.displayPrompt();
796796
return;
@@ -1487,7 +1487,7 @@ function defineDefaultCommands(repl) {
14871487
});
14881488

14891489
repl.defineCommand('exit', {
1490-
help: 'Exit the repl',
1490+
help: 'Exit the REPL',
14911491
action: function() {
14921492
this.close();
14931493
}
@@ -1509,7 +1509,7 @@ function defineDefaultCommands(repl) {
15091509
this.output.write(line);
15101510
}
15111511
this.output.write('\nPress ^C to abort current expression, ' +
1512-
'^D to exit the repl\n');
1512+
'^D to exit the REPL\n');
15131513
this.displayPrompt();
15141514
}
15151515
});

test/parallel/test-repl.js

Lines changed: 2 additions & 2 deletions
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)