(
pkg: WorkspacePackage,
pkgConfig: WorkspacePackage['bumpy'] & {},
config: BumpyConfig,
opts: PublishOptions,
tarball?: string,
)
| 345 | } |
| 346 | |
| 347 | function buildPublishArgs( |
| 348 | pkg: WorkspacePackage, |
| 349 | pkgConfig: WorkspacePackage['bumpy'] & {}, |
| 350 | config: BumpyConfig, |
| 351 | opts: PublishOptions, |
| 352 | tarball?: string, |
| 353 | ): string[] { |
| 354 | const publishManager = config.publish.publishManager; |
| 355 | const args: string[] = []; |
| 356 | |
| 357 | // Base command |
| 358 | if (config.publish.npmStaged && publishManager === 'npm') { |
| 359 | args.push('npm', 'stage', 'publish'); |
| 360 | } else if (publishManager === 'yarn') { |
| 361 | args.push('yarn', 'npm', 'publish'); |
| 362 | } else { |
| 363 | args.push(publishManager, 'publish'); |
| 364 | } |
| 365 | |
| 366 | // Tarball path (if pack-then-publish) |
| 367 | if (tarball) args.push(tarball); |
| 368 | |
| 369 | // Access |
| 370 | const access = pkgConfig?.access || config.access; |
| 371 | args.push('--access', access); |
| 372 | |
| 373 | // Registry |
| 374 | if (pkgConfig?.registry) args.push('--registry', pkgConfig.registry); |
| 375 | |
| 376 | // Dist tag |
| 377 | if (opts.tag) args.push('--tag', opts.tag); |
| 378 | |
| 379 | // Provenance attestation |
| 380 | if (config.publish.provenance && publishManager === 'npm') { |
| 381 | args.push('--provenance'); |
| 382 | } |
| 383 | |
| 384 | // Extra user-configured args |
| 385 | if (config.publish.publishArgs.length > 0) { |
| 386 | args.push(...config.publish.publishArgs); |
| 387 | } |
| 388 | |
| 389 | return args; |
| 390 | } |
| 391 | |
| 392 | /** |
| 393 | * Parse the tarball path from pack command output. |
no outgoing calls
no test coverage detected
searching dependent graphs…