- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33.6k
Description
With #22004 landed to doc deprecate process.binding I was encouraged to open an issue related to my use of it. Now is a great time to starting examining what from process.binding can be exposed in a user-friendly way.
In my own experience I've attempted to use (if available and there were no user-facing options) these bindings. My usage fits into these categories
- chrome inspector wiring
- command-line checks
- custom error stack decoration
- custom inspection
The API run down as follows:
- 
process.binding("config")- experimentalREPLAwait (command line checks)
- experimentalWorker (command line checks)
- exposeInternals (command line checks)
- preserveSymlinks (command line checks)
- preserveSymlinksMain (command line checks)
 
- 
process.binding("inspector")
- 
process.binding("util")- decorated_private_symbol (error stack decoration)
- getProxyDetails (custom inspection)
- setHiddenValue (error stack decoration)
- safeGetenv
 
For chrome inspector wiring there has been some work to expose things like originalConsole (#21659), but more in this area is needed.
For command-line checks the answer may be to use process.execArgv, but a more config like object form would be handy.
For custom error stack decoration there is early feelers in #21958.
Custom inspection helpers like getProxyDetails/getPromiseDetails and safeGetenv have nothing simmering at the moment.
Updated:
I crossed through API that have user-facing options.
Update:
Replaced process.binding("inspector").open inferences with process.config.variables.v8_enable_inspector checks.