You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Btw, the documentation for the fields process.traceDeprecation, process.noDeprecation could mention that they are mutable, just like process.throwDeprecation does since 12.X LTS:
process.throwDeprecation is mutable, so whether or not deprecation warnings result in errors may be altered at runtime.
Also I noticed the process.noProcessWarnings does not work like process.noDeprecation:
it won't change the behavior if assigned at runtime. For this case, using the --no-warnings is the only option.
And I don't know why as this is not documented
Affected URL(s)
From https://nodejs.org/docs/latest/api/process.html
To https://nodejs.org/docs/latest-v6.x/api/process.html
Description of the problem
I wanted to set
--trace-warningsprogrammaticaly at runtime from within node.I noticed:
node/lib/internal/process/warning.js
Lines 114 to 115 in 67c19c2
So I can use
process.traceProcessWarnings = trueat runtime to toggle stack trace on warnings.Important
However in the documentation, from version
6.X LTSto latest22.X, this fieldprocess.traceProcessWarningsis never documented but the fieldprocess.traceDeprecationis documented (https://nodejs.org/docs/latest/api/process.html#processtracedeprecation).Btw, the documentation for the fields
process.traceDeprecation,process.noDeprecationcould mention that they are mutable, just likeprocess.throwDeprecationdoes since12.X LTS:https://nodejs.org/docs/latest-v12.x/api/process.html#process_process_throwdeprecation
By #29495
It could be nice to document that.
Note
Also I noticed the
process.noProcessWarningsdoes not work likeprocess.noDeprecation:it won't change the behavior if assigned at runtime. For this case, using the
--no-warningsis the only option.And I don't know why as this is not documented
Should I make a PR to add documentation