(changeset: ChangesetInfoInternal, validPackageNames: ReadonlySet<string>, rootName: string)
| 508 | |
| 509 | const validateSinglePackageName = |
| 510 | (changeset: ChangesetInfoInternal, validPackageNames: ReadonlySet<string>, rootName: string) => |
| 511 | (pkgName: string): readonly string[] => { |
| 512 | const isValid = validPackageNames.has(pkgName); |
| 513 | const isRootPackage = pkgName === rootName; |
| 514 | |
| 515 | return isValid |
| 516 | ? [] |
| 517 | : isRootPackage |
| 518 | ? [ |
| 519 | `❌ Changeset ${changeset.filename} references the private monorepo root package: ${pkgName}`, |
| 520 | ' The monorepo root is private and cannot be published to npm.', |
| 521 | ] |
| 522 | : [ |
| 523 | `❌ Changeset ${changeset.filename} references non-existent package: ${pkgName}`, |
| 524 | ' This package does not exist in the workspace.', |
| 525 | ]; |
| 526 | }; |
| 527 | |
| 528 | const validateChangesetPackages = ( |
| 529 | changesets: readonly ChangesetInfoInternal[], |
no outgoing calls
no test coverage detected