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

Function prepareOnePackage

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

Source from the content-addressed store, hash-verified

389 * the workflow tears down right after pkg-pr-new finishes.
390 */
391const prepareOnePackage = async (
392 pkgDir: string,
393 publishable: ReadonlySet<string>,
394 publishableVersions: ReadonlyMap<string, string>,
395) => {
396 const { name, version } = await readPackageMeta(pkgDir);
397 if (!existsSync(join(pkgDir, "dist"))) {
398 throw new Error(`Missing dist/ in ${pkgDir}. Did you run 'bun run build:packages'?`);
399 }
400 console.log(`[prepare] ${name}@${version}`);
401 await applyWorkspaceVersions(pkgDir, publishable, publishableVersions);
402 await applyPublishConfig(pkgDir);
403};
404
405const main = async () => {
406 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