Skip to content

Commit a64f373

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

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/api/deprecations.md

+14
Original file line numberDiff line numberDiff line change
@@ -3711,6 +3711,20 @@ 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+
Type: Documentation-only
3723+
3724+
Instantiating classes without the `new` qualifier exported by the `node:zlib` module is deprecated.
3725+
It is recommended to use the new qualifier instead. This applies to all Zlib classes such as `Deflate`,
3726+
`DeflateRaw`, `Gunzip`, `Inflate`, `InflateRaw`, `Unzip`, and `Zlib`.
3727+
37143728
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
37153729
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
37163730
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

0 commit comments

Comments
 (0)