-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
util: doc deprecate legacy inspect signature #22753
Conversation
doc/api/util.md
Outdated
@@ -360,6 +360,8 @@ stream.write('With ES6'); | |||
<!-- YAML | |||
added: v0.3.0 | |||
changes: | |||
- version ADDME |
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.
version: REPLACEME
Since this is deprecating an undocumented feature, I recommend to treat this as |
The collaborator guide says:
Let's make this semver-minor and it won't need special TSC approval (It will also be highlighted in the release notes, which is a good thing). |
doc/api/util.md
Outdated
@@ -360,6 +360,8 @@ stream.write('With ES6'); | |||
<!-- YAML | |||
added: v0.3.0 | |||
changes: | |||
- version: REPLACEME | |||
description: Deprecated legacy signature. |
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.
you can already add pr-url: https://github.com/nodejs/node/pull/22753
doc/api/util.md
Outdated
@@ -424,6 +429,9 @@ changes: | |||
example below. **Default:** `true`. | |||
* Returns: {string} The representation of passed object | |||
|
|||
Deprecation notice: The legacy function signature that was changed in node 0.9.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.
Nit: node -> Node.js.
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 removed it completely (since it could be assumed that Node.js is the object on the sentence)
5c52da1
to
76a64c3
Compare
76a64c3
to
cfd0067
Compare
@@ -424,6 +430,9 @@ changes: | |||
example below. **Default:** `true`. | |||
* Returns: {string} The representation of passed object | |||
|
|||
Deprecation notice: The legacy function signature that was changed in v0.9.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.
Nit: remove Deprecation notice:
.
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'd suggest simplifying this greatly:
The legacy function signature `util.inspect(object, [showHidden], [depth], [colors])` is deprecated.
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.
One problem with this is that it can be interpreted as saying that util.inspect(object)
is deprecated but it is not. Can we indicate that the showHidden
, depth
, and colors
arguments are deprecated instead of pointing to the function signature?
This would need to include a deprecation code assignment in |
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.
Why do we deprecate this?
@@ -360,6 +360,9 @@ stream.write('With ES6'); | |||
<!-- YAML | |||
added: v0.3.0 | |||
changes: | |||
- version: REPLACEME | |||
pr-rul: https://github.com/nodejs/node/pull/22753 |
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.
typo: rul
@@ -424,6 +430,9 @@ changes: | |||
example below. **Default:** `true`. | |||
* Returns: {string} The representation of passed object | |||
|
|||
Deprecation notice: The legacy function signature that was changed in v0.9.3 | |||
`util.inspect(object, [showHidden], [depth], [colors])` has been deprecated. |
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’d put this closer to the end of the description… this is probably not relevant to a lot of people (and if it is, we shouldn’t deprecate it)
Ping |
IMHO we should either deprecate or document. Ref: #23205 |
Refs: #22751
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes