From 58d91aaaf68ac3b3c654f9c605ffbcda61e2de3d Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Thu, 6 Feb 2025 22:18:06 +0000 Subject: [PATCH] chore: add check for module legacyIds containing itself --- src/manifest.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/manifest.ts b/src/manifest.ts index 8dc3abe..32370bb 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -31,6 +31,10 @@ export function validateManifest(manifest: ModuleManifest, looseChecks: boolean) throw new Error(`Manifest incorrectly references template module 'Your product'`) } + if (manifest.legacyIds.includes(manifest.id)) { + throw new Error(`Manifest contains itself '${manifest.id}' in legacyIds`) + } + if (!validateManifestSchema(manifest)) { const errors = validateManifestSchema.errors if (!errors) throw new Error(`Manifest failed validation with unknown reason`)