Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions scripts/dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
);
}
Expand Down Expand Up @@ -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());
Expand Down