* Filter `toPublish` to package names that don't exist on npm yet. * Skips packages not going through the standard npm publish flow.
( toPublish: PlannedRelease[], packages: Map<string, WorkspacePackage>, )
| 845 | * Skips packages not going through the standard npm publish flow. |
| 846 | */ |
| 847 | async function findPackagesMissingFromNpm( |
| 848 | toPublish: PlannedRelease[], |
| 849 | packages: Map<string, WorkspacePackage>, |
| 850 | ): Promise<string[]> { |
| 851 | const missing: string[] = []; |
| 852 | await Promise.all( |
| 853 | toPublish.map(async (release) => { |
| 854 | const pkg = packages.get(release.name)!; |
| 855 | const pkgConfig = pkg.bumpy || {}; |
| 856 | if (pkgConfig.publishCommand || pkgConfig.skipNpmPublish) return; |
| 857 | if (pkg.private && !pkgConfig.publishCommand) return; |
| 858 | const exists = await packageExistsOnNpm(release.name, pkgConfig.registry); |
| 859 | if (!exists) missing.push(release.name); |
| 860 | }), |
| 861 | ); |
| 862 | return missing; |
| 863 | } |
no test coverage detected
searching dependent graphs…