repl: remove deprecated repl.parseREPLKeyword() function
This removes the deprecated REPLServer.parseREPLKeyword function. It is deprecated for a long time and should not provide any benefit to users. To improve the maintainability of the REPL module, it's now removed. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33286 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
4ace010b53
commit
a1bcad8dc0
@ -1564,12 +1564,15 @@ The `REPLServer.bufferedCommand` property was deprecated in favor of
|
|||||||
### DEP0075: `REPLServer.parseREPLKeyword()`
|
### DEP0075: `REPLServer.parseREPLKeyword()`
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
changes:
|
changes:
|
||||||
|
- version: REPLACEME
|
||||||
|
pr-url: https://github.com/nodejs/node/pull/33286
|
||||||
|
description: End-of-Life.
|
||||||
- version: v9.0.0
|
- version: v9.0.0
|
||||||
pr-url: https://github.com/nodejs/node/pull/14223
|
pr-url: https://github.com/nodejs/node/pull/14223
|
||||||
description: Runtime deprecation.
|
description: Runtime deprecation.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Type: Runtime
|
Type: End-of-Life
|
||||||
|
|
||||||
`REPLServer.parseREPLKeyword()` was removed from userland visibility.
|
`REPLServer.parseREPLKeyword()` was removed from userland visibility.
|
||||||
|
|
||||||
|
@ -679,11 +679,6 @@ function REPLServer(prompt,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.parseREPLKeyword = deprecate(
|
|
||||||
_parseREPLKeyword,
|
|
||||||
'REPLServer.parseREPLKeyword() is deprecated',
|
|
||||||
'DEP0075');
|
|
||||||
|
|
||||||
self.on('close', function emitExit() {
|
self.on('close', function emitExit() {
|
||||||
if (paused) {
|
if (paused) {
|
||||||
pausedBuffer.push(['close']);
|
pausedBuffer.push(['close']);
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
const common = require('../common');
|
|
||||||
const assert = require('assert');
|
|
||||||
const repl = require('repl');
|
|
||||||
|
|
||||||
testParseREPLKeyword();
|
|
||||||
|
|
||||||
function testParseREPLKeyword() {
|
|
||||||
const server = repl.start({ prompt: '> ' });
|
|
||||||
const warn = 'REPLServer.parseREPLKeyword() is deprecated';
|
|
||||||
|
|
||||||
common.expectWarning('DeprecationWarning', warn, 'DEP0075');
|
|
||||||
assert.ok(server.parseREPLKeyword('clear'));
|
|
||||||
assert.ok(!server.parseREPLKeyword('tacos'));
|
|
||||||
server.close();
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user