* Initializes the default conditions for ESM module loading. * This function is called during pre-execution, before any user code is run. * @returns {void}
()
| 74 | * @returns {void} |
| 75 | */ |
| 76 | function initializeDefaultConditions() { |
| 77 | const userConditions = getOptionValue('--conditions'); |
| 78 | const noAddons = getOptionValue('--no-addons'); |
| 79 | const addonConditions = noAddons ? [] : ['node-addons']; |
| 80 | const moduleConditions = getOptionValue('--require-module') ? ['module-sync'] : []; |
| 81 | defaultConditions = ObjectFreeze([ |
| 82 | 'node', |
| 83 | 'import', |
| 84 | ...moduleConditions, |
| 85 | ...addonConditions, |
| 86 | ...userConditions, |
| 87 | ]); |
| 88 | defaultConditionsSet = new SafeSet(defaultConditions); |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * @param {string[]} [conditions] |
no test coverage detected
searching dependent graphs…