doc,test,repl: fix deprecation code

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
cjihrig 2019-02-28 19:53:14 -05:00
parent fedc31bb3c
commit 4afd503465
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
3 changed files with 5 additions and 5 deletions

View File

@ -2335,8 +2335,8 @@ Type: Runtime
Setting the TLS ServerName to an IP address is not permitted by Setting the TLS ServerName to an IP address is not permitted by
[RFC 6066][]. This will be ignored in a future version. [RFC 6066][]. This will be ignored in a future version.
<a id="DEP0XXX"></a> <a id="DEP0124"></a>
### DEP0XXX: using REPLServer.rli ### DEP0124: using REPLServer.rli
<!-- YAML <!-- YAML
changes: changes:
- version: REPLACEME - version: REPLACEME

View File

@ -179,9 +179,9 @@ function REPLServer(prompt,
let rli = self; let rli = self;
Object.defineProperty(self, 'rli', { Object.defineProperty(self, 'rli', {
get: util.deprecate(() => rli, get: util.deprecate(() => rli,
'REPLServer.rli is deprecated', 'DEP0XXX'), 'REPLServer.rli is deprecated', 'DEP0124'),
set: util.deprecate((val) => rli = val, set: util.deprecate((val) => rli = val,
'REPLServer.rli is deprecated', 'DEP0XXX'), 'REPLServer.rli is deprecated', 'DEP0124'),
enumerable: true, enumerable: true,
configurable: true configurable: true
}); });

View File

@ -27,7 +27,7 @@ const repl = require('repl');
common.expectWarning({ common.expectWarning({
DeprecationWarning: { DeprecationWarning: {
DEP0XXX: 'REPLServer.rli is deprecated' DEP0124: 'REPLServer.rli is deprecated'
} }
}); });