get rid of some core-api mentions too

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-09-23 14:06:12 +02:00
parent 07bd9068b4
commit 12e074a6e4
12 changed files with 35 additions and 27 deletions
+11 -3
View File
@@ -27,13 +27,21 @@ export const includedFilter = (name: string) =>
// Packages that are not allowed to have any duplicates
const FORBID_DUPLICATES = [
/^@backstage\/core$/,
/^@backstage\/core-api$/,
/^@backstage\/core-app-api$/,
/^@backstage\/plugin-/,
];
// There are some packages that ARE explicitly allowed to have duplicates since
// they handle that appropriately. This takes precedence over FORBID_DUPLICATES
// above.
const ALLOW_DUPLICATES = [
/^@backstage\/core-plugin-api$/,
/^@backstage\/plugin-catalog-react$/,
];
export const forbiddenDuplicatesFilter = (name: string) =>
FORBID_DUPLICATES.some(pattern => pattern.test(name));
FORBID_DUPLICATES.some(pattern => pattern.test(name)) &&
!ALLOW_DUPLICATES.some(pattern => pattern.test(name));
export default async (cmd: Command) => {
const fix = Boolean(cmd.fix);