|
120 | 120 | NativeModule.require('internal/inspector_async_hook').setup();
|
121 | 121 | }
|
122 | 122 |
|
123 |
| - const options = internalBinding('options'); |
124 |
| - if (options.getOptions('--help')) { |
| 123 | + const { getOptions } = internalBinding('options'); |
| 124 | + const helpOption = getOptions('--help'); |
| 125 | + const completionBashOption = getOptions('--completion-bash'); |
| 126 | + const experimentalModulesOption = getOptions('--experimental-modules'); |
| 127 | + const experimentalVMModulesOption = getOptions('--experimental-vm-modules'); |
| 128 | + const experimentalWorkerOption = getOptions('--experimental-worker'); |
| 129 | + if (helpOption) { |
125 | 130 | NativeModule.require('internal/print_help').print(process.stdout);
|
126 | 131 | return;
|
127 | 132 | }
|
128 | 133 |
|
129 |
| - if (options.getOptions('--completion-bash')) { |
| 134 | + if (completionBashOption) { |
130 | 135 | NativeModule.require('internal/bash_completion').print(process.stdout);
|
131 | 136 | return;
|
132 | 137 | }
|
|
144 | 149 | setupGlobalURL();
|
145 | 150 | }
|
146 | 151 |
|
147 |
| - if (process.binding('config').experimentalWorker) { |
| 152 | + if (experimentalWorkerOption) { |
148 | 153 | setupDOMException();
|
149 | 154 | }
|
150 | 155 |
|
|
176 | 181 | 'DeprecationWarning', 'DEP0062', startup, true);
|
177 | 182 | }
|
178 | 183 |
|
179 |
| - if (process.binding('config').experimentalModules || |
180 |
| - process.binding('config').experimentalVMModules) { |
181 |
| - if (process.binding('config').experimentalModules) { |
| 184 | + if (experimentalModulesOption || experimentalVMModulesOption) { |
| 185 | + if (experimentalModulesOption) { |
182 | 186 | process.emitWarning(
|
183 | 187 | 'The ESM module loader is experimental.',
|
184 | 188 | 'ExperimentalWarning', undefined);
|
|
0 commit comments