Title: Migration from process.binding · Issue #22064 · nodejs/node · GitHub
Open Graph Title: Migration from process.binding · Issue #22064 · nodejs/node
X Title: Migration from process.binding · Issue #22064 · nodejs/node
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 experienc...
Open Graph 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 ...
X 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 ...
Opengraph URL: https://github.com/nodejs/node/issues/22064
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Migration from process.binding ","articleBody":"With #22004 landed to doc deprecate `process.binding` I was [encouraged to](https://github.com/nodejs/node/pull/22004#issuecomment-408580131) 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.\r\n\r\nIn 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\r\n\r\n1. chrome inspector wiring\r\n1. command-line checks\r\n1. custom error stack decoration\r\n1. custom inspection\r\n\r\nThe API run down as follows:\r\n\r\n* ~~`process.binding(\"config\")`~~\r\n - ~~experimentalREPLAwait _(command line checks)_~~\r\n - ~~experimentalWorker _(command line checks)_~~\r\n - ~~exposeInternals _(command line checks)_~~\r\n - ~~preserveSymlinks _(command line checks)_~~\r\n - ~~preserveSymlinksMain _(command line checks)_~~\r\n\r\n* `process.binding(\"inspector\")`\r\n - callAndPauseOnStart _(inspector wiring; other utils like [ndb](https://github.com/GoogleChromeLabs/ndb)_ use this too)\r\n - consoleCall _(inspector wiring)_\r\n - ~~open _(only existence checks, much like [Node does](https://github.com/nodejs/node/blob/b7c7c0c4961fd4e382b7cadcfb7c8360b8904a4a/lib/internal/modules/cjs/helpers.js#L113))_~~\r\n\r\n* `process.binding(\"util\")`\r\n - decorated_private_symbol _(error stack decoration)_\r\n - getProxyDetails _(custom inspection)_\r\n - setHiddenValue _(error stack decoration)_\r\n - safeGetenv\r\n\r\nFor chrome inspector wiring there has been some work to expose things like `originalConsole` (#21659), but more in this area is needed.\r\n\r\nFor command-line checks the answer may be to use `process.execArgv`, but a more `config` like object form would be handy.\r\n\r\nFor custom error stack decoration there is early feelers in #21958.\r\n\r\nCustom inspection helpers like `getProxyDetails`/`getPromiseDetails` and `safeGetenv` have nothing simmering at the moment.\r\n\r\n**Updated:**\r\n\r\nI ~~crossed through~~ API that have user-facing options.\r\n\r\n**Update:**\r\n\r\nReplaced `process.binding(\"inspector\").open` inferences with `process.config.variables.v8_enable_inspector` checks.","author":{"url":"https://github.com/jdalton","@type":"Person","name":"jdalton"},"datePublished":"2018-08-01T18:00:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":39},"url":"https://github.com/22064/node/issues/22064"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:000a4400-603e-8ecb-1a08-71697a2b4bc7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C0E:18C74D:112D3BE:1774A2B:6A4D6855 |
| html-safe-nonce | 1fe96225b0b303dc73e88465a0695aed13400d545ecc7ac51d13d02d03715c84 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzBFOjE4Qzc0RDoxMTJEM0JFOjE3NzRBMkI6NkE0RDY4NTUiLCJ2aXNpdG9yX2lkIjoiMTg4MjI5ODAxOTQ0MjY4MTk0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3bd783e2bfd6be0f2a9b9527abc4180386bdd29c5ec475a29d2fbb2a54e22121 |
| hovercard-subject-tag | issue:346706528 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/22064/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c3c72f1dd62728b6a9837ea396efc1422860d74ad9093e8d6f435c231b353baa/nodejs/node/issues/22064 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c3c72f1dd62728b6a9837ea396efc1422860d74ad9093e8d6f435c231b353baa/nodejs/node/issues/22064 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jdalton |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cd8f6a71db61d6012a0cbb134be844fdbe9b8a45 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width