Skip to content

Commit

Permalink
repl: update deprecation codes
Browse files Browse the repository at this point in the history
Refs: nodejs#33294

PR-URL: nodejs#33430
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
aduh95 authored and BridgeAR committed May 18, 2020
1 parent 1c61914 commit a12a2d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
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

0 comments on commit a12a2d8

Please sign in to comment.