From a1bcad8dc061301718ca6e2bd026debe64911238 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 7 May 2020 20:28:19 +0200 Subject: [PATCH] repl: remove deprecated repl.parseREPLKeyword() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 PR-URL: https://github.com/nodejs/node/pull/33286 Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell --- doc/api/deprecations.md | 5 ++++- lib/repl.js | 5 ----- test/parallel/test-repl-deprecations.js | 16 ---------------- 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 test/parallel/test-repl-deprecations.js diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index d0c3170cf7fdc5..7404fdd6b20c23 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1564,12 +1564,15 @@ The `REPLServer.bufferedCommand` property was deprecated in favor of ### DEP0075: `REPLServer.parseREPLKeyword()` -Type: Runtime +Type: End-of-Life `REPLServer.parseREPLKeyword()` was removed from userland visibility. diff --git a/lib/repl.js b/lib/repl.js index aaa202b5decbb8..5ced8f678697e7 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -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']); diff --git a/test/parallel/test-repl-deprecations.js b/test/parallel/test-repl-deprecations.js deleted file mode 100644 index dbd50eb469f15a..00000000000000 --- a/test/parallel/test-repl-deprecations.js +++ /dev/null @@ -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(); -}