cli: dynamically determine which packages are unsafe to repack

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-10-29 16:14:25 +02:00
parent bb1539a89f
commit dd355bca46
2 changed files with 11 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Switched to dynamically determining the packages that are unsafe to repack when executing the CLI within the Backstage main repo.
+6 -4
View File
@@ -24,14 +24,16 @@ import { tmpdir } from 'os';
import tar, { CreateOptions } from 'tar';
import { paths } from '../paths';
import { run } from '../run';
import { packageVersions } from '../version';
import { ParallelOption } from '../parallel';
import {
dependencies as cliDependencies,
devDependencies as cliDevDependencies,
} from '../../../package.json';
// These packages aren't safe to pack in parallel since the CLI depends on them
const UNSAFE_PACKAGES = [
...Object.keys(packageVersions),
'@backstage/cli-common',
'@backstage/config-loader',
...Object.keys(cliDependencies),
...Object.keys(cliDevDependencies),
];
type LernaPackage = {