From f217b2dfb08f6c1b64ae7cc05680161eadc4545b Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 7 May 2020 20:31:03 +0200 Subject: [PATCH] repl: remove deprecated repl.turnOffEditorMode() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This function is deprecated for multiple years and provides very little benefit to users. Thus, it's removed to improve the maintainability of the REPL module. 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-turn-off-editor-mode.js | 14 -------------- 3 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 test/parallel/test-repl-turn-off-editor-mode.js diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 7404fdd6b20c23..7879aa7d991f98 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1628,12 +1628,15 @@ supported API. ### DEP0078: `REPLServer.turnOffEditorMode()` -Type: Runtime +Type: End-of-Life `REPLServer.turnOffEditorMode()` was removed from userland visibility. diff --git a/lib/repl.js b/lib/repl.js index 5ced8f678697e7..b086cf61adc919 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1034,11 +1034,6 @@ REPLServer.prototype.setPrompt = function setPrompt(prompt) { Interface.prototype.setPrompt.call(this, prompt); }; -REPLServer.prototype.turnOffEditorMode = deprecate( - function() { _turnOffEditorMode(this); }, - 'REPLServer.turnOffEditorMode() is deprecated', - 'DEP0078'); - const requireRE = /\brequire\s*\(\s*['"`](([\w@./-]+\/)?(?:[\w@./-]*))(?![^'"`])$/; const fsAutoCompleteRE = /fs(?:\.promises)?\.\s*[a-z][a-zA-Z]+\(\s*["'](.*)/; const simpleExpressionRE = diff --git a/test/parallel/test-repl-turn-off-editor-mode.js b/test/parallel/test-repl-turn-off-editor-mode.js deleted file mode 100644 index a966899b2c6391..00000000000000 --- a/test/parallel/test-repl-turn-off-editor-mode.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; -const common = require('../common'); -const repl = require('repl'); - -testTurnOffEditorMode(); - -function testTurnOffEditorMode() { - const server = repl.start({ prompt: '> ' }); - const warn = 'REPLServer.turnOffEditorMode() is deprecated'; - - common.expectWarning('DeprecationWarning', warn, 'DEP0078'); - server.turnOffEditorMode(); - server.close(); -}