Skip to content

Commit

Permalink
doc,test,repl: fix deprecation code
Browse files Browse the repository at this point in the history
PR-URL: #26368
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
cjihrig committed Mar 1, 2019
1 parent fedc31b commit 4afd503
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2335,8 +2335,8 @@ Type: Runtime
Setting the TLS ServerName to an IP address is not permitted by
[RFC 6066][]. This will be ignored in a future version.
<a id="DEP0XXX"></a>
### DEP0XXX: using REPLServer.rli
<a id="DEP0124"></a>
### DEP0124: using REPLServer.rli
<!-- YAML
changes:
- version: REPLACEME
Expand Down
4 changes: 2 additions & 2 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ function REPLServer(prompt,
let rli = self;
Object.defineProperty(self, 'rli', {
get: util.deprecate(() => rli,
'REPLServer.rli is deprecated', 'DEP0XXX'),
'REPLServer.rli is deprecated', 'DEP0124'),
set: util.deprecate((val) => rli = val,
'REPLServer.rli is deprecated', 'DEP0XXX'),
'REPLServer.rli is deprecated', 'DEP0124'),
enumerable: true,
configurable: true
});
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-repl-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const repl = require('repl');

common.expectWarning({
DeprecationWarning: {
DEP0XXX: 'REPLServer.rli is deprecated'
DEP0124: 'REPLServer.rli is deprecated'
}
});

Expand Down

0 comments on commit 4afd503

Please sign in to comment.