(
...args: string[] | [args: string[], options?: { cwd?: string }]
)
| 382 | export function silentNpm(...args: string[]): Promise<ProcessOutput>; |
| 383 | export function silentNpm(args: string[], options?: { cwd?: string }): Promise<ProcessOutput>; |
| 384 | export function silentNpm( |
| 385 | ...args: string[] | [args: string[], options?: { cwd?: string }] |
| 386 | ): Promise<ProcessOutput> { |
| 387 | if (Array.isArray(args[0])) { |
| 388 | const [params, options] = args; |
| 389 | return _exec( |
| 390 | { |
| 391 | silent: true, |
| 392 | cwd: (options as { cwd?: string } | undefined)?.cwd, |
| 393 | }, |
| 394 | 'npm', |
| 395 | params, |
| 396 | ); |
| 397 | } else { |
| 398 | return _exec({ silent: true }, 'npm', args as string[]); |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | export function silentYarn(...args: string[]) { |
| 403 | return _exec({ silent: true }, 'yarn', args); |
no test coverage detected