Merge pull request #24691 from backstage/fix/double-yarn-postpack-run

[cli] Remove manual yarn postpack invocation
This commit is contained in:
Patrik Oldsberg
2024-05-08 15:13:13 +02:00
committed by GitHub
2 changed files with 5 additions and 4 deletions
@@ -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.
@@ -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);