(
args: string[],
projectDir: string,
spawnOptions: SpawnOptions = {},
)
| 353 | } |
| 354 | |
| 355 | private static async _spawnNpmScript( |
| 356 | args: string[], |
| 357 | projectDir: string, |
| 358 | spawnOptions: SpawnOptions = {}, |
| 359 | ): Promise<SpawnResult> { |
| 360 | if (PnpmVersioning.isUsingPnpm(projectDir)) { |
| 361 | return ChildProcess.spawn('pnpm', ['-s', ...args], { |
| 362 | ...spawnOptions, |
| 363 | cwd: projectDir, |
| 364 | }); |
| 365 | } |
| 366 | |
| 367 | // Note: We cannot use `yarn` directly as command because we might operate in |
| 368 | // a different publish branch and the current `PATH` will point to the Yarn version |
| 369 | // that invoked the release tool. More details in the function description. |
| 370 | const yarnCommand = await resolveYarnScriptForProject(projectDir); |
| 371 | return ChildProcess.spawn(yarnCommand.binary, [...yarnCommand.args, ...args], { |
| 372 | ...spawnOptions, |
| 373 | cwd: projectDir, |
| 374 | }); |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * Invokes the `yarn bazel sync --only=repo` command in order |
nothing calls this directly
no test coverage detected