Whitelist DEBUG_FD for values 1 and 2 only Fixes #410 #415
Conversation
1 similar comment
@TooTallNate @thebigredgeek Would you please review this PR? :) |
Thanks for the patch. I think instead of doing something like this, we're going to whitelist DEBUG_FD for values |
@TooTallNate Thanks for your review, i've changed PR so we only white-list values of 1 & 2. also link to git.io is replaced with something better :)) What's your idea? |
var fd = parseInt(process.env.DEBUG_FD, 10) || 2; | ||
|
||
if (1 !== fd && 2 !== fd) { | ||
util.deprecate(function(){}, '`DEBUG_FD` is deprecated. Override `debug.log` if you want to use a different log function (https://git.io/debug_fd)')() |
thebigredgeek
Jan 23, 2017
Collaborator
We should probably use a different message here, such as telling the user that using DEBUG_FD outside of file descriptors 1 and 2 is no longer supported or deprecated
We should probably use a different message here, such as telling the user that using DEBUG_FD outside of file descriptors 1 and 2 is no longer supported or deprecated
@thebigredgeek Done :) |
@thebigredgeek Can it be published as 2.6.1, please? Packages often have strict constraints for dependency versions. They will be hard-coded to |
Hey guys, will slice a release this afternoon |
released 2.6.1 |
UPDATED: Please see discussion below
Short description
This PR tries to smartly hide DEBUG_FD deprecation annoying warning if this conditions are met:
DEBUG_COLORS
env variable is detected (webstorm uses that)DEBUG_FD
is set to 1 (default value by web-storm & idea)So if user customizes
DEBUG_FD
to something other than 1 she will still get the notification but this saves majority of other usersLong Story
As discussed in #410 Also Here and Here after
DEBUG_FD
is deprecated many & many end users who actually don't even useDEBUG_FD
variable are affected (including all express& react-native users). This issue will not be resolved at lease next idea release (end of march) also if it resolves in that way webstorm users will totally lose error colors!