-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zlib: deprecate classes usage without new
#55718
base: main
Are you sure you want to change the base?
Conversation
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
f77caf7
to
dbfed33
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55718 +/- ##
==========================================
- Coverage 88.41% 88.41% -0.01%
==========================================
Files 654 654
Lines 187763 187775 +12
Branches 36135 36137 +2
==========================================
+ Hits 166008 166016 +8
- Misses 14996 15003 +7
+ Partials 6759 6756 -3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually add a test, to check warning is emitted correctly
lib/zlib.js
Outdated
process.emitWarning(`Instantiating Deflate class without 'new' is deprecated.`, | ||
'DeprecationWarning', 'DEP0184'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW when #54869 lands there will be a helper utility for this warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that that PR has landed, I recommend using the new utility
dbfed33
to
245e4f3
Compare
Since we documentation-only deprecated the usage without
new
qualifier, we can make it runtime deprecated.