Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions features/draft/scroll-marker.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: scroll-marker.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}
6 changes: 6 additions & 0 deletions features/draft/selectlist.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: selectlist.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}
6 changes: 6 additions & 0 deletions features/draft/speech-recognition.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: speech-recognition.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}
6 changes: 6 additions & 0 deletions features/draft/text-box-trim.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: text-box-trim.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}
4 changes: 4 additions & 0 deletions features/http2.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: http2.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/http3.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: http3.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/intersection-observer-v2.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: intersection-observer-v2.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/jpegxl.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: jpegxl.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/mathml.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: mathml.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/notifications.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: notifications.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/scroll-to-text-fragment.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: scroll-to-text-fragment.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/webdriver-bidi.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: webdriver-bidi.yml
# Do not edit this file by hand. Edit the source file instead!

{}
4 changes: 4 additions & 0 deletions features/webp.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated from: webp.yml
# Do not edit this file by hand. Edit the source file instead!

{}
12 changes: 7 additions & 5 deletions scripts/dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ function updateDistFile(sourcePath: string, distPath: string): void {
*/
function checkDistFile(sourcePath: string, distPath: string): boolean {
const expected = toDist(sourcePath).toString({ lineWidth: 0 });
const actual = fs.readFileSync(distPath, { encoding: "utf-8" });
return actual === expected;
try {
const actual = fs.readFileSync(distPath, { encoding: "utf-8" });
return actual === expected;
} catch {
return false;
}
}

type SupportStatus = ReturnType<typeof getStatus>;
Expand Down Expand Up @@ -268,11 +272,9 @@ const tagsToFeatures: Map<string, Feature[]> = (() => {
function main() {
const filePaths = argv.paths.flatMap((fileOrDirectory) => {
if (fs.statSync(fileOrDirectory).isDirectory()) {
// Expand directory to any existing .dist file within.
// TODO: Change this to .yml when all features have dist files.
return new fdir()
.withBasePath()
.filter((fp) => fp.endsWith(".dist"))
.filter((fp) => fp.endsWith(".yml"))
.crawl(fileOrDirectory)
.sync();
}
Expand Down