-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: fix deprecation listing for OutgoingMessage._headers/_headerNames #27574
Conversation
doc/api/deprecations.md
Outdated
@@ -1364,7 +1364,7 @@ The `NODE_REPL_MODE` environment variable is used to set the underlying | |||
removed. Please use `sloppy` instead. | |||
|
|||
<a id="DEP0066"></a> | |||
### DEP0066: outgoingMessage.\_headers, outgoingMessage.\_headerNames | |||
### DEP0066: outgoingMessage.prototype.\_headers, outgoingMessage.prototype.\_headerNames |
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.
I think there is nothing wrong with the original. outgoingMessage
refers to an instance of OutgoingMessage
so outgoingMessage._headers
is ok.
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.
compare https://nodejs.org/dist/latest-v12.x/docs/api/deprecations.html#deprecations_dep0066_outgoingmessage_headers_outgoingmessage_headernames with https://nodejs.org/dist/latest-v12.x/docs/api/deprecations.html#deprecations_dep0067_outgoingmessage_prototype_renderheaders
as well as the deprecation message itself:
Line 116 in 908292c
}, 'OutgoingMessage.prototype._headers is deprecated', 'DEP0066'), |
I think that consistency is key as well as finding the doc with a search engine (SEO).
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.
Oh ok, so it's for consistency.
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.
In that case can you please capitalize outgoingMessage
? It should be OutgoingMessage
.
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.
ah, good catch! I'll fix that as well ...
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.
just noticed another inconsistency: also added prototype to the suggested methods, compare to: https://nodejs.org/dist/latest-v12.x/docs/api/deprecations.html#deprecations_dep0001_http_outgoingmessage_prototype_flush
which also mentions the module name: http.OutgoingMessage
:/
Can you please make the linter happy? See https://travis-ci.com/nodejs/node/jobs/198041047 |
Landed in 91ec5bf, thanks for the PR! 🎉 |
PR-URL: #27574 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #27574 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes