MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / prepareOnePackage

Function prepareOnePackage

scripts/publish-packages.ts:347–359  ·  view source on GitHub ↗
(
  pkgDir: string,
  publishable: ReadonlySet<string>,
  publishableVersions: ReadonlyMap<string, string>,
)

Source from the content-addressed store, hash-verified

345 * the workflow tears down right after pkg-pr-new finishes.
346 */
347const prepareOnePackage = async (
348 pkgDir: string,
349 publishable: ReadonlySet<string>,
350 publishableVersions: ReadonlyMap<string, string>,
351) => {
352 const { name, version } = await readPackageMeta(pkgDir);
353 if (!existsSync(join(pkgDir, "dist"))) {
354 throw new Error(`Missing dist/ in ${pkgDir}. Did you run 'bun run build:packages'?`);
355 }
356 console.log(`[prepare] ${name}@${version}`);
357 await applyWorkspaceVersions(pkgDir, publishable, publishableVersions);
358 await applyPublishConfig(pkgDir);
359};
360
361const main = async () => {
362 const { dryRun, prepareOnly } = parseArgs(process.argv.slice(2));

Callers 1

mainFunction · 0.85

Calls 4

readPackageMetaFunction · 0.85
applyWorkspaceVersionsFunction · 0.85
applyPublishConfigFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected