Skip to content

Commit 8c4c85c

Browse files
anonrigaduh95
authored andcommitted
zlib: deprecate instantiating classes without new
PR-URL: #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 0601644 commit 8c4c85c

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

3658+
### DEP0184: Instantiating `node:zlib` classes without `new`
3659+
3660+
<!-- YAML
3661+
changes:
3662+
- version: REPLACEME
3663+
pr-url: https://github.com/nodejs/node/pull/54708
3664+
description: Documentation-only deprecation.
3665+
-->
3666+
3667+
Type: Documentation-only
3668+
3669+
Instantiating classes without the `new` qualifier exported by the `node:zlib` module is deprecated.
3670+
It is recommended to use the `new` qualifier instead. This applies to all Zlib classes, such as `Deflate`,
3671+
`DeflateRaw`, `Gunzip`, `Inflate`, `InflateRaw`, `Unzip`, and `Zlib`.
3672+
36583673
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
36593674
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
36603675
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

0 commit comments

Comments
 (0)