repl: remove deprecated repl features by BridgeAR · Pull Request #33286 · nodejs/node · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions doc/api/deprecations.md
34 changes: 0 additions & 34 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,6 @@ function REPLServer(prompt,

domainSet.add(this._domain);

let rli = this;
ObjectDefineProperty(this, 'rli', {
get: deprecate(() => rli,
'REPLServer.rli is deprecated', 'DEP0124'),
set: deprecate((val) => rli = val,
'REPLServer.rli is deprecated', 'DEP0124'),
enumerable: true,
configurable: true
});

const savedRegExMatches = ['', '', '', '', '', '', '', '', '', ''];
const sep = '\u0000\u0000\u0000';
const regExMatcher = new RegExp(`^${sep}(.*)${sep}(.*)${sep}(.*)${sep}(.*)` +
Expand Down Expand Up @@ -636,15 +626,6 @@ function REPLServer(prompt,
});

self.clearBufferedCommand();
ObjectDefineProperty(this, 'bufferedCommand', {
get: deprecate(() => self[kBufferedCommandSymbol],
'REPLServer.bufferedCommand is deprecated',
'DEP0074'),
set: deprecate((val) => self[kBufferedCommandSymbol] = val,
'REPLServer.bufferedCommand is deprecated',
'DEP0074'),
enumerable: true
});

function completer(text, cb) {
complete.call(self, text, self.editorMode ?
Expand Down Expand Up @@ -698,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']);
Expand Down Expand Up @@ -1058,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 =
Expand Down Expand Up @@ -1398,11 +1369,6 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) {
this.commands[keyword] = cmd;
};

REPLServer.prototype.memory = deprecate(
_memory,
'REPLServer.memory() is deprecated',
'DEP0082');

// TODO(BridgeAR): This should be replaced with acorn to build an AST. The
// language became more complex and using a simple approach like this is not
// sufficient anymore.
Expand Down
16 changes: 0 additions & 16 deletions test/parallel/test-repl-deprecations.js

This file was deleted.

15 changes: 0 additions & 15 deletions test/parallel/test-repl-memory-deprecation.js

This file was deleted.

16 changes: 0 additions & 16 deletions test/parallel/test-repl-options.js
14 changes: 0 additions & 14 deletions test/parallel/test-repl-turn-off-editor-mode.js

This file was deleted.