Skip to content

Commit

Permalink
chore: add check for module legacyIds containing itself
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Feb 6, 2025
1 parent 22bf7c7 commit 58d91aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down

0 comments on commit 58d91aa

Please sign in to comment.