mirror of https://github.com/nodejs/node.git
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>pull/33449/head
parent
4ace010b53
commit
a1bcad8dc0
|
@ -1564,12 +1564,15 @@ The `REPLServer.bufferedCommand` property was deprecated in favor of
|
|||
### DEP0075: `REPLServer.parseREPLKeyword()`
|
||||
<!-- YAML
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
pr-url: https://github.com/nodejs/node/pull/33286
|
||||
description: End-of-Life.
|
||||
- version: v9.0.0
|
||||
pr-url: https://github.com/nodejs/node/pull/14223
|
||||
description: Runtime deprecation.
|
||||
-->
|
||||
|
||||
Type: Runtime
|
||||
Type: End-of-Life
|
||||
|
||||
`REPLServer.parseREPLKeyword()` was removed from userland visibility.
|
||||
|
||||
|
|
|
@ -679,11 +679,6 @@ function REPLServer(prompt,
|
|||
return false;
|
||||
}
|
||||
|
||||
self.parseREPLKeyword = deprecate(
|
||||
_parseREPLKeyword,
|
||||
'REPLServer.parseREPLKeyword() is deprecated',
|
||||
'DEP0075');
|
||||
|
||||
self.on('close', function emitExit() {
|
||||
if (paused) {
|
||||
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…
Reference in New Issue