mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
repl: eol deprecate instantiating without new
PR-URL: https://github.com/nodejs/node/pull/59495 Refs: https://github.com/nodejs/node/pull/54869 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
f855cda2a2
commit
e1d4d6ab49
|
|
@ -3850,6 +3850,9 @@ It is recommended to use the `new` qualifier instead. This applies to all Zlib c
|
|||
|
||||
<!-- YAML
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
pr-url: https://github.com/nodejs/node/pull/59495
|
||||
description: End-of-Life.
|
||||
- version: v24.0.0
|
||||
pr-url: https://github.com/nodejs/node/pull/54869
|
||||
description: Runtime deprecation.
|
||||
|
|
@ -3860,10 +3863,10 @@ changes:
|
|||
description: Documentation-only deprecation.
|
||||
-->
|
||||
|
||||
Type: Runtime
|
||||
Type: End-of-Life
|
||||
|
||||
Instantiating classes without the `new` qualifier exported by the `node:repl` module is deprecated.
|
||||
It is recommended to use the `new` qualifier instead. This applies to all REPL classes, including
|
||||
The `new` qualifier must be used instead. This applies to all REPL classes, including
|
||||
`REPLServer` and `Recoverable`.
|
||||
|
||||
<!-- md-lint skip-deprecation DEP0186 -->
|
||||
|
|
|
|||
1729
lib/repl.js
1729
lib/repl.js
File diff suppressed because it is too large
Load Diff
|
|
@ -1050,17 +1050,3 @@ function event(ee, expected) {
|
|||
}));
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const server = repl.REPLServer();
|
||||
common.expectWarning({
|
||||
DeprecationWarning: {
|
||||
DEP0185: 'Instantiating REPLServer without the \'new\' keyword has been deprecated.',
|
||||
// For the 'url.format' test-case.
|
||||
DEP0169:
|
||||
'`url.parse()` behavior is not standardized and prone to errors that have security implications. ' +
|
||||
'Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.',
|
||||
}
|
||||
});
|
||||
server.emit('line', '.exit');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user