-
Notifications
You must be signed in to change notification settings - Fork 30k
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
process.features
: deprecate it or add more properties?
#25343
Comments
Mutability is good – I’d be in favour of making I’d be 👍 on documenting this feature, esp. since I’d assume we can’t really remove it. |
process.features
: deprecate it or adding more properties?process.features
: deprecate it or add more properties?
@joyeecheung Okay, sorry for not double-checking myself – then I’m totally fine with documenting |
Instead of using process.config.variables.v8_enable_inspector to detect whether inspector is enabled in the build. PR-URL: #25819 Refs: #25343 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Instead of using process.config.variables.v8_enable_inspector to detect whether inspector is enabled in the build. PR-URL: #25819 Refs: #25343 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This looks like a great way to ease feature detection. I think we should document and require a addition to it for every feature that can not easily be detected (like new options), ideally as part of the PR that adds the feature. I do believe that it should be frozen thought to be reliable. |
I believe we can close this issue. |
Stem from #25291 (comment)
Right now, there is an undocumented
process.features
for that purpose, but it has not been well-maintained. It's possible to detect certain features known at build time viaprocess.config.variables
but that object is mutable in the user land so it's not exactly reliable (whereasprocess.features
have been immutable). Also it's not really a good design to have users rely on internal variable names.Should we deprecate it in favor of a better feature detection API, or start maintain it properly?
Related: #22585 but that is more about availability of specific APIs like recursive
fs.mkdir
, whereasprocess.features
have been more about higher-level feature sets.The text was updated successfully, but these errors were encountered: