diff --git a/.changeset/cli-postpack-schmostschmack.md b/.changeset/cli-postpack-schmostschmack.md new file mode 100644 index 0000000000..2500c89a8c --- /dev/null +++ b/.changeset/cli-postpack-schmostschmack.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +The `build-workspace` command no longer manually runs `yarn postpack`, relying instead on the fact that running `yarn pack` will automatically invoke the `postpack` script. No action is necessary if you are running the latest version of yarn 1, 3, or 4. diff --git a/packages/cli/src/lib/packager/createDistWorkspace.ts b/packages/cli/src/lib/packager/createDistWorkspace.ts index 7d4c9d4c6d..b966e23a85 100644 --- a/packages/cli/src/lib/packager/createDistWorkspace.ts +++ b/packages/cli/src/lib/packager/createDistWorkspace.ts @@ -309,10 +309,6 @@ async function moveToDistWorkspace( await run('yarn', ['pack', '--filename', archivePath], { cwd: target.dir, }); - // TODO(Rugvip): yarn pack doesn't call postpack, once the bug is fixed this can be removed - if (target.packageJson?.scripts?.postpack) { - await run('yarn', ['postpack'], { cwd: target.dir }); - } const outputDir = relativePath(paths.targetRoot, target.dir); const absoluteOutputPath = resolvePath(workspaceDir, outputDir);