Skip to content

Commit 03e29e6

Browse files
anonriglouwers
authored andcommitted
zlib: deprecate instantiating classes without new
PR-URL: nodejs#54708 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a59a806 commit 03e29e6

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
@@ -3711,6 +3711,21 @@ switch to its new provider model. The `clientCertEngine` option for
37113711
the `privateKeyEngine` and `privateKeyIdentifier` for [`tls.createSecureContext()`][];
37123712
and [`crypto.setEngine()`][] all depend on this functionality from OpenSSL.
37133713

3714+
### DEP0184: Instantiating `node:zlib` classes without `new`
3715+
3716+
<!-- YAML
3717+
changes:
3718+
- version: REPLACEME
3719+
pr-url: https://github.com/nodejs/node/pull/54708
3720+
description: Documentation-only deprecation.
3721+
-->
3722+
3723+
Type: Documentation-only
3724+
3725+
Instantiating classes without the `new` qualifier exported by the `node:zlib` module is deprecated.
3726+
It is recommended to use the `new` qualifier instead. This applies to all Zlib classes, such as `Deflate`,
3727+
`DeflateRaw`, `Gunzip`, `Inflate`, `InflateRaw`, `Unzip`, and `Zlib`.
3728+
37143729
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
37153730
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
37163731
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

0 commit comments

Comments
 (0)