diff --git a/scripts/dist.ts b/scripts/dist.ts index 795b7811113..22ac8a3b3f4 100644 --- a/scripts/dist.ts +++ b/scripts/dist.ts @@ -201,7 +201,7 @@ function toDist(sourcePath: string): YAML.Document { if (source.compat_features) { source.compat_features.sort(); if (isDeepStrictEqual(source.compat_features, taggedCompatFeatures)) { - logger.warn( + logger.silly( `${id}: compat_features override matches tags in @mdn/browser-compat-data. Consider deleting the compat_features override.`, ); } @@ -234,9 +234,18 @@ function toDist(sourcePath: string): YAML.Document { }); if (computedStatus.discouraged) { - logger.warn( - `${id}: contains at least one deprecated compat feature and can never be Baseline. Was this intentional?`, - ); + const isDraft: boolean = source.draft_date ?? false; + + if (!source.draft_date) { + logger.error( + `${id}: contains at least one deprecated compat feature and can never be Baseline. This is forbidden for published features.`, + ); + exitStatus = 1; + } else { + logger.warn( + `${id}: draft contains at least one deprecated compat feature and can never be Baseline. Was this intentional?`, + ); + } } computedStatus = JSON.parse(computedStatus.toJSON());