Skip to content

Commit e9d971b

Browse files
authored
Sort compat_features in public API (#1457)
1 parent 79e48ad commit e9d971b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,13 @@ for (const [key, data] of yamlEntries('features')) {
160160
}
161161
}
162162

163-
// Check that no BCD key is used twice until the meaning is made clear in
164-
// https://github.com/web-platform-dx/web-features/issues/1173.
165163
if (data.compat_features) {
164+
// Sort compat_features so that grouping and ordering in dist files has
165+
// no effect on what web-features users see.
166+
data.compat_features.sort();
167+
168+
// Check that no BCD key is used twice until the meaning is made clear in
169+
// https://github.com/web-platform-dx/web-features/issues/1173.
166170
for (const bcdKey of data.compat_features) {
167171
const otherKey = bcdToFeatureId.get(bcdKey);
168172
if (otherKey) {

0 commit comments

Comments
 (0)