Skip to content

Commit a202666

Browse files
author
Aviv Keller
authored
repl: doc-deprecate instantiating node:repl classes without new
PR-URL: #54842 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent c3a7b29 commit a202666

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/api/deprecations.md

+15
Original file line numberDiff line numberDiff line change
@@ -3726,6 +3726,21 @@ Instantiating classes without the `new` qualifier exported by the `node:zlib` mo
37263726
It is recommended to use the `new` qualifier instead. This applies to all Zlib classes, such as `Deflate`,
37273727
`DeflateRaw`, `Gunzip`, `Inflate`, `InflateRaw`, `Unzip`, and `Zlib`.
37283728

3729+
### DEP0185: Instantiating `node:repl` classes without `new`
3730+
3731+
<!-- YAML
3732+
changes:
3733+
- version: REPLACEME
3734+
pr-url: https://github.com/nodejs/node/pull/54842
3735+
description: Documentation-only deprecation.
3736+
-->
3737+
3738+
Type: Documentation-only
3739+
3740+
Instantiating classes without the `new` qualifier exported by the `node:repl` module is deprecated.
3741+
It is recommended to use the `new` qualifier instead. This applies to all REPL classes, including
3742+
`REPLServer` and `Recoverable`.
3743+
37293744
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
37303745
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
37313746
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

0 commit comments

Comments
 (0)