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:
parent
fedc31bb3c
commit
4afd503465
@ -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
|
||||||
|
@ -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
|
||||||
});
|
});
|
||||||
|
@ -27,7 +27,7 @@ const repl = require('repl');
|
|||||||
|
|
||||||
common.expectWarning({
|
common.expectWarning({
|
||||||
DeprecationWarning: {
|
DeprecationWarning: {
|
||||||
DEP0XXX: 'REPLServer.rli is deprecated'
|
DEP0124: 'REPLServer.rli is deprecated'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user