Skip to content

Commit e890a5d

Browse files
committed
zlib: deprecate instantiating classes without new
1 parent 2f0b371 commit e890a5d

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: Zlib classes
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)