(
args: string[],
nextJSVersion: string,
options:
| execa.Options
| {
reject?: boolean
env?: Record<string, string>
}
)
| 15 | ] |
| 16 | |
| 17 | export const run = async ( |
| 18 | args: string[], |
| 19 | nextJSVersion: string, |
| 20 | options: |
| 21 | | execa.Options |
| 22 | | { |
| 23 | reject?: boolean |
| 24 | env?: Record<string, string> |
| 25 | } |
| 26 | ) => { |
| 27 | return execa('node', [CNA_PATH].concat(args), { |
| 28 | // tests with options.reject false are expected to exit(1) so don't inherit |
| 29 | stdio: options.reject === false ? 'pipe' : 'inherit', |
| 30 | ...options, |
| 31 | env: { |
| 32 | ...process.env, |
| 33 | ...options.env, |
| 34 | NEXT_PRIVATE_TEST_VERSION: nextJSVersion, |
| 35 | }, |
| 36 | }) |
| 37 | } |
| 38 | |
| 39 | export const command = (cmd: string, args: string[]) => |
| 40 | execa(cmd, args, { |
no test coverage detected