MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / findUnpublishedWithCache

Function findUnpublishedWithCache

packages/bumpy/src/commands/publish.ts:731–757  ·  view source on GitHub ↗

* Find unpublished packages, using the ci plan cache if available. * Falls back to registry lookups if no cache or cache is invalid.

(
  rootDir: string,
  packages: Map<string, WorkspacePackage>,
  config: BumpyConfig,
)

Source from the content-addressed store, hash-verified

729 * Falls back to registry lookups if no cache or cache is invalid.
730 */
731async function findUnpublishedWithCache(
732 rootDir: string,
733 packages: Map<string, WorkspacePackage>,
734 config: BumpyConfig,
735): Promise<PlannedRelease[]> {
736 const cachedNames = loadCachedPlan(rootDir, packages);
737 if (cachedNames) {
738 // Build PlannedRelease entries directly from workspace data — no network needed
739 const unpublished: PlannedRelease[] = [];
740 for (const name of cachedNames) {
741 const pkg = packages.get(name)!;
742 unpublished.push({
743 name,
744 type: 'patch',
745 oldVersion: pkg.version,
746 newVersion: pkg.version,
747 bumpFiles: [],
748 isDependencyBump: false,
749 isCascadeBump: false,
750 isGroupBump: false,
751 bumpSources: [],
752 });
753 }
754 return unpublished;
755 }
756 return findUnpublishedPackages(packages, config);
757}
758
759/**
760 * Find packages whose current version is not yet published.

Callers 1

publishCommandFunction · 0.85

Calls 2

loadCachedPlanFunction · 0.85
findUnpublishedPackagesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…