(cmd, args, opts)
| 19 | fs.writeFileSync('./package.json', JSON.stringify(rootpkg, null, 2)); |
| 20 | |
| 21 | function run(cmd, args, opts) { |
| 22 | return new Promise((resolve, reject) => { |
| 23 | let child = spawn(cmd, args, opts); |
| 24 | let result = ''; |
| 25 | child.stdout?.on('data', function (data) { |
| 26 | result += data.toString(); |
| 27 | }); |
| 28 | child.on('error', reject); |
| 29 | child.on('close', code => { |
| 30 | if (code !== 0) { |
| 31 | reject(new Error('Child process failed')); |
| 32 | return; |
| 33 | } |
| 34 | |
| 35 | resolve(result); |
| 36 | }); |
| 37 | }); |
| 38 | } |
| 39 | |
| 40 | // { |
| 41 | // "_id": "react@19.0.0-rc-dfd30974ab-20240613", |
no test coverage detected