Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3752430

Browse filesBrowse files
committed
repl: remove deprecated .rli
The .rli property is just a reference to the active REPL instance and it was deprecated for a long time. To improve maintainability of the REPL this feature is removed. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: #33286 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent e88d098 commit 3752430
Copy full SHA for 3752430

File tree

Expand file treeCollapse file tree

3 files changed

+4
-27
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-27
lines changed
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2385,12 +2385,15 @@ Setting the TLS ServerName to an IP address is not permitted by
23852385
### DEP0124: using `REPLServer.rli`
23862386
<!-- YAML
23872387
changes:
2388+
- version: REPLACEME
2389+
pr-url: https://github.com/nodejs/node/pull/33286
2390+
description: End-of-Life.
23882391
- version: v12.0.0
23892392
pr-url: https://github.com/nodejs/node/pull/26260
23902393
description: Runtime deprecation.
23912394
-->
23922395
2393-
Type: Runtime
2396+
Type: End-of-Life
23942397
23952398
This property is a reference to the instance itself.
23962399
Collapse file

‎lib/repl.js‎

Copy file name to clipboardExpand all lines: lib/repl.js
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,6 @@ function REPLServer(prompt,
299299

300300
domainSet.add(this._domain);
301301

302-
let rli = this;
303-
ObjectDefineProperty(this, 'rli', {
304-
get: deprecate(() => rli,
305-
'REPLServer.rli is deprecated', 'DEP0124'),
306-
set: deprecate((val) => rli = val,
307-
'REPLServer.rli is deprecated', 'DEP0124'),
308-
enumerable: true,
309-
configurable: true
310-
});
311-
312302
const savedRegExMatches = ['', '', '', '', '', '', '', '', '', ''];
313303
const sep = '\u0000\u0000\u0000';
314304
const regExMatcher = new RegExp(`^${sep}(.*)${sep}(.*)${sep}(.*)${sep}(.*)` +
Collapse file

‎test/parallel/test-repl-options.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-options.js
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ common.expectWarning({
3737
'repl._builtinLibs is deprecated. Check module.builtinModules instead',
3838
DEP0141: 'repl.inputStream and repl.outputStream is deprecated. ' +
3939
'Use repl.input and repl.output instead',
40-
DEP0124: 'REPLServer.rli is deprecated',
4140
}
4241
});
4342

@@ -62,14 +61,6 @@ assert.strictEqual(r1.ignoreUndefined, false);
6261
assert.strictEqual(r1.replMode, repl.REPL_MODE_SLOPPY);
6362
assert.strictEqual(r1.historySize, 30);
6463

65-
// Test r1 for backwards compact
66-
assert.strictEqual(r1.rli.input, stream);
67-
assert.strictEqual(r1.rli.output, stream);
68-
assert.strictEqual(r1.rli.input, r1.inputStream);
69-
assert.strictEqual(r1.rli.output, r1.outputStream);
70-
assert.strictEqual(r1.rli.terminal, true);
71-
assert.strictEqual(r1.useColors, r1.rli.terminal);
72-
7364
// 2
7465
function writer() {}
7566

@@ -98,13 +89,6 @@ assert.strictEqual(r2.writer, writer);
9889
assert.strictEqual(r2.replMode, repl.REPL_MODE_STRICT);
9990
assert.strictEqual(r2.historySize, 50);
10091

101-
// Test r2 for backwards compact
102-
assert.strictEqual(r2.rli.input, stream);
103-
assert.strictEqual(r2.rli.output, stream);
104-
assert.strictEqual(r2.rli.input, r2.inputStream);
105-
assert.strictEqual(r2.rli.output, r2.outputStream);
106-
assert.strictEqual(r2.rli.terminal, false);
107-
10892
// 3, breakEvalOnSigint and eval supplied together should cause a throw
10993
const r3 = () => repl.start({
11094
breakEvalOnSigint: true,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.