From 28d5ed85ca459e8e4f9e74f686ae00a74620d93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Fri, 5 Jul 2024 15:45:49 +0200 Subject: [PATCH] Fix incorrect "same status" comment when status override is used For a few features, the comment was added incorrectly based on what the computed status was, but the computed status is never written to dist if the source includes an override. --- features/scroll-snap.yml.dist | 1 - features/web-bluetooth.yml.dist | 1 - scripts/dist.ts | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/features/scroll-snap.yml.dist b/features/scroll-snap.yml.dist index 4f5df78df16..d1d0ab7baf5 100644 --- a/features/scroll-snap.yml.dist +++ b/features/scroll-snap.yml.dist @@ -85,7 +85,6 @@ compat_features: # safari_ios: "11" - css.properties.scroll-snap-type - # ⬇️ Same status as overall feature ⬇️ # baseline: low # baseline_low_date: 2022-07-26 # support: diff --git a/features/web-bluetooth.yml.dist b/features/web-bluetooth.yml.dist index 54e6554d99c..9c5084a3b0e 100644 --- a/features/web-bluetooth.yml.dist +++ b/features/web-bluetooth.yml.dist @@ -75,7 +75,6 @@ compat_features: - api.BluetoothRemoteGATTCharacteristic.writeValueWithResponse - api.BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse - # ⬇️ Same status as overall feature ⬇️ # baseline: false # support: {} - api.Bluetooth.getDevices diff --git a/scripts/dist.ts b/scripts/dist.ts index 01400f29277..00ff9924371 100644 --- a/scripts/dist.ts +++ b/scripts/dist.ts @@ -192,7 +192,7 @@ function toDist(sourcePath: string): YAML.Document { const sortedGroups = new Map(); for (const status of sortedStatus) { let comment = YAML.stringify(status); - if (isDeepStrictEqual(status, computedStatus)) { + if (isDeepStrictEqual(status, source.status ?? computedStatus)) { comment = `⬇️ Same status as overall feature ⬇️\n${comment}`; } sortedGroups.set(comment, groups.get(status));