(command, options)
| 294 | } |
| 295 | |
| 296 | toPNPMArgs(command, options) { |
| 297 | let args = []; |
| 298 | |
| 299 | if (command === 'install') { |
| 300 | if (options.save) { |
| 301 | args.push('add'); |
| 302 | } else if (options['save-dev']) { |
| 303 | args.push('add', '--save-dev'); |
| 304 | } else if (options.packages) { |
| 305 | throw new Error(`npm command "${command} ${options.packages.join(' ')}" can not be translated to pnpm command`); |
| 306 | } else { |
| 307 | args.push('install'); |
| 308 | } |
| 309 | |
| 310 | if (options['save-exact']) { |
| 311 | args.push('--save-exact'); |
| 312 | } |
| 313 | } else if (command === 'uninstall') { |
| 314 | args.push('remove'); |
| 315 | } else { |
| 316 | throw new Error(`npm command "${command}" can not be translated to pnpm command`); |
| 317 | } |
| 318 | |
| 319 | if (options.packages) { |
| 320 | args = args.concat(options.packages); |
| 321 | } |
| 322 | |
| 323 | return args; |
| 324 | } |
| 325 | |
| 326 | formatStartMessage(/* packages */) { |
| 327 | return ''; |
no outgoing calls
no test coverage detected