-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: add documentation for deprecation properties #16539
Conversation
Code LGTM, but the question is should they be documented or removed. AFAICT they were exposed as a rough mechanism of communicating the CLI flags to JS, they are not necessarily part of a succinct API. Alternatively they (and other CLI flag mappings) could go behind a new |
doc/api/process.md
Outdated
|
||
* {boolean} | ||
|
||
The `process.throwDeprecation` property returns if the `--trace-deprecation` |
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.
A nit: --trace-deprecation -> --throw-deprecation
doc/api/process.md
Outdated
@@ -1667,6 +1680,32 @@ process.stdin.pipe(process.stdout); | |||
*Note*: `process.stdout` differs from other Node.js streams in important ways, | |||
see [note on process I/O][] for more information. | |||
|
|||
## process.traceDeprecation |
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.
It seems this should be placed after the process.title
, ABC-wise.
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.
my bad -- don't know why I thought a ### about IO was a ## 😞
I am not sure about some things.
console.log(
process.noDeprecation, process.throwDeprecation, process.traceDeprecation
); undefined undefined undefined
Let's see what other collaborators think. |
@refack It seems we cannot just remove them as they have been documented in |
BTW, thank you for the PR and digging into the history! |
Like |
Hence my ambivalence about fully embracing those flags as 1st class API citizens 😕 |
I personally think it would be best to deprecate these instead of documenting them. At the same time we can rephrase the util part where they are mentioned. |
@BridgeAR Even if the props are deprecated publicly, they are still used within parts of Node core (like lib/internal/process/warning.js for example), so I'm not sold on what the maintenance benefit would be for doing that :( |
@maclover7 even if we use some internally it does not mean users should always use those things as well. That is what |
Please document and standardize these properties. I want to use Edit: See also #17871 |
doc/api/process.md
Outdated
|
||
* {boolean} | ||
|
||
The `process.noDeprecation` property returns if the `--no-deprecation` |
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.
Possibly change "returns if" to "indicates whether or not"
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 would go with just "indicates whether", without the "or not".
doc/api/process.md
Outdated
|
||
* {boolean} | ||
|
||
The `process.throwDeprecation` property returns if the `--throw-deprecation` |
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.
Same comment here and below.
a1b99a1
to
ab6eabe
Compare
updated @cjihrig @apapirovski |
ping @cjihrig @apapirovski would like to try and land this |
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.
The changes themselves look fine, but there were a few comments by others that brought up the alternative of deprecating and removing these properties.
Going to open a followup issue to discuss possible deprecation/removal of the properties. |
Refs: #16394
Relevant commit history:
node: Add --throw-deprecation
Add --no-deprecation and --trace-deprecation flags
cc @vsemozhetbyt, I tried to avoid duplicating tons of documentation by linking out to other sections of the process docs, would love your thoughts :)
Checklist
Affected core subsystem(s)
doc