| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
| Instantiating classes without the `new` qualifier exported by the `node:zlib` module is deprecated. | ||
| It is recommended to use the `new` qualifier instead. This applies to all Zlib classes, such as `Deflate`, | ||
| `DeflateRaw`, `Gunzip`, `Inflate`, `InflateRaw`, `Unzip`, and `Zlib`. | ||
| Instantiating classes without the `new` qualifier exported by the `node:zlib` module is no longer |
There was a problem hiding this comment.
can we have small before/after code example
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 96.45161% with 11 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #64849 +/- ##
==========================================
- Coverage 92.07% 90.31% -1.76%
==========================================
Files 399 751 +352
Lines 177007 249738 +72731
Branches 27381 47158 +19777
==========================================
+ Hits 162978 225557 +62579
- Misses 13716 15582 +1866
- Partials 313 8599 +8286
... and 483 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
cc @nodejs/tsc this is a semver-major change and requires more TSC reviews |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
This would make backporting really hard, I'm not sure this is worth it, but ok.
Sorry, something went wrong.
Convert ZlibBase, Zlib, and the remaining zlib/Brotli stream constructors to ES6 class syntax. Calling these constructors without `new` is no longer supported (DEP0184 End-of-Life); use `new` or the create* factory helpers instead. This is a semver-major change: code that relied on `zlib.Gzip()` (without `new`) will now throw TypeError. The createGzip/createDeflate helpers and all documented `new`-based usage remain unchanged. The wire behavior and public options are preserved. Refs: nodejs#55718 Refs: nodejs#54708 Assisted-by: Grok Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
Convert the remaining node:zlib stream constructors (ZlibBase, Zlib, Deflate/Inflate/Gzip family, and Brotli) to ES6 class syntax, matching the earlier Zstd conversion.
Calling these constructors without new is End-of-Life for DEP0184. Use new or the create* factory helpers instead.
Why
DEP0184 has been a runtime deprecation since v24.0.0 (documentation-only since v22.9.0 / v20.18.0). Converting to class syntax both modernizes the implementation and hard-enforces the requirement for new.
Behavior change (semver-major)
Changes
Test plan
Refs: #55718
Refs: #54708