Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repl: update deprecation codes #33430

Closed
wants to merge 1 commit into from
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
8 changes: 4 additions & 4 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2668,8 +2668,8 @@ Type: Documentation-only

Use [`request.destroy()`][] instead of [`request.abort()`][].

<a id="DEP0XXX"></a>
### DEP0XXX: `repl.inputStream` and `repl.outputStream`
<a id="DEP0141"></a>
### DEP0141: `repl.inputStream` and `repl.outputStream`
<!-- YAML
changes:
- version: REPLACEME
Expand All @@ -2682,8 +2682,8 @@ Type: Documentation-only (supports [`--pending-deprecation`][])
The `repl` module exported the input and output stream twice. Use `.input`
instead of `.inputStream` and `.output` instead of `.outputStream`.

<a id="DEP0XX1"></a>
### DEP0XX1: `repl._builtinLibs`
<a id="DEP0142"></a>
### DEP0142: `repl._builtinLibs`
<!-- YAML
changes:
- version: REPLACEME
Expand Down
12 changes: 6 additions & 6 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ function REPLServer(prompt,
deprecate(() => this.input,
'repl.inputStream and repl.outputStream is deprecated. ' +
'Use repl.input and repl.output instead',
'DEP0XXX') :
'DEP0141') :
() => this.input,
set: pendingDeprecation ?
deprecate((val) => this.input = val,
'repl.inputStream and repl.outputStream is deprecated. ' +
'Use repl.input and repl.output instead',
'DEP0XXX') :
'DEP0141') :
(val) => this.input = val,
enumerable: false,
configurable: true
Expand All @@ -241,13 +241,13 @@ function REPLServer(prompt,
deprecate(() => this.output,
'repl.inputStream and repl.outputStream is deprecated. ' +
'Use repl.input and repl.output instead',
'DEP0XXX') :
'DEP0141') :
() => this.output,
set: pendingDeprecation ?
deprecate((val) => this.output = val,
'repl.inputStream and repl.outputStream is deprecated. ' +
'Use repl.input and repl.output instead',
'DEP0XXX') :
'DEP0141') :
(val) => this.output = val,
enumerable: false,
configurable: true
Expand Down Expand Up @@ -1614,12 +1614,12 @@ ObjectDefineProperty(module.exports, '_builtinLibs', {
get: pendingDeprecation ? deprecate(
() => _builtinLibs,
'repl._builtinLibs is deprecated. Check module.builtinModules instead',
'DEP0XX1'
'DEP0142'
) : () => _builtinLibs,
set: pendingDeprecation ? deprecate(
(val) => _builtinLibs = val,
'repl._builtinLibs is deprecated. Check module.builtinModules instead',
'DEP0XX1'
'DEP0142'
) : (val) => _builtinLibs = val,
enumerable: false,
configurable: true
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-repl-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ repl._builtinLibs;

common.expectWarning({
DeprecationWarning: {
DEP0XX1:
DEP0142:
'repl._builtinLibs is deprecated. Check module.builtinModules instead',
DEP0XXX: 'repl.inputStream and repl.outputStream is deprecated. ' +
DEP0141: 'repl.inputStream and repl.outputStream is deprecated. ' +
'Use repl.input and repl.output instead',
DEP0124: 'REPLServer.rli is deprecated',
}
Expand Down