Skip to content

Commit 4644d05

Browse files
anonrigtargos
authored andcommitted
zlib: deprecate instantiating classes without new
PR-URL: #54708 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 4078aa8 commit 4644d05

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

3546+
### DEP0184: Instantiating `node:zlib` classes without `new`
3547+
3548+
<!-- YAML
3549+
changes:
3550+
- version: REPLACEME
3551+
pr-url: https://github.com/nodejs/node/pull/54708
3552+
description: Documentation-only deprecation.
3553+
-->
3554+
3555+
Type: Documentation-only
3556+
3557+
Instantiating classes without the `new` qualifier exported by the `node:zlib` module is deprecated.
3558+
It is recommended to use the `new` qualifier instead. This applies to all Zlib classes, such as `Deflate`,
3559+
`DeflateRaw`, `Gunzip`, `Inflate`, `InflateRaw`, `Unzip`, and `Zlib`.
3560+
35463561
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
35473562
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
35483563
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

0 commit comments

Comments
 (0)