|
112 | 112 | NativeModule.require('internal/inspector_async_hook').setup(); |
113 | 113 | } |
114 | 114 |
|
115 | | - const options = internalBinding('options'); |
116 | | - if (options.getOptions('--help')) { |
| 115 | + const { getOptions } = internalBinding('options'); |
| 116 | + const helpOption = getOptions('--help'); |
| 117 | + const completionBashOption = getOptions('--completion-bash'); |
| 118 | + const experimentalModulesOption = getOptions('--experimental-modules'); |
| 119 | + const experimentalVMModulesOption = getOptions('--experimental-vm-modules'); |
| 120 | + const experimentalWorkerOption = getOptions('--experimental-worker'); |
| 121 | + if (helpOption) { |
117 | 122 | NativeModule.require('internal/print_help').print(process.stdout); |
118 | 123 | return; |
119 | 124 | } |
120 | 125 |
|
121 | | - if (options.getOptions('--completion-bash')) { |
| 126 | + if (completionBashOption) { |
122 | 127 | NativeModule.require('internal/bash_completion').print(process.stdout); |
123 | 128 | return; |
124 | 129 | } |
|
138 | 143 | setupQueueMicrotask(); |
139 | 144 | } |
140 | 145 |
|
141 | | - if (process.binding('config').experimentalWorker) { |
| 146 | + if (experimentalWorkerOption) { |
142 | 147 | setupDOMException(); |
143 | 148 | } |
144 | 149 |
|
|
170 | 175 | 'DeprecationWarning', 'DEP0062', startup, true); |
171 | 176 | } |
172 | 177 |
|
173 | | - if (process.binding('config').experimentalModules || |
174 | | - process.binding('config').experimentalVMModules) { |
175 | | - if (process.binding('config').experimentalModules) { |
| 178 | + if (experimentalModulesOption || experimentalVMModulesOption) { |
| 179 | + if (experimentalModulesOption) { |
176 | 180 | process.emitWarning( |
177 | 181 | 'The ESM module loader is experimental.', |
178 | 182 | 'ExperimentalWarning', undefined); |
|
0 commit comments