(flag)
| 9 | const knownFlagsSet = new Set(flags); |
| 10 | |
| 11 | function push(flag) { |
| 12 | if (knownFlagsSet.has(flag)) return; |
| 13 | |
| 14 | if (!process.argv.includes("--update")) { |
| 15 | throw new Error( |
| 16 | `Missing flag "${flag}" from Node.js ${process.version} in ./packages/babel-node/data/node-flags-with-value.json.\n` + |
| 17 | `Run node ./packages/babel-node/scripts/list-node-flags.js --update to update it.` |
| 18 | ); |
| 19 | } |
| 20 | |
| 21 | flags.push(flag); |
| 22 | } |
| 23 | |
| 24 | const out = cp.execSync(`${process.execPath} --help`).toString(); |
| 25 | const re = /(?:(-\w), )?(--[\w-]+)\[?(?:=| \[)/g; |
no test coverage detected