@@ -4,6 +4,7 @@ import { features } from "web-features";
44import { readFileSync } from 'fs' ;
55import fetch from 'node-fetch' ;
66import { stdout } from "process" ;
7+ import { FeatureData } from "web-features/types.quicktype" ;
78
89const bcdVersion = readFileSync ( "bcd_version" ) . toString ( ) ;
910
@@ -28,7 +29,18 @@ fetch(`http://unpkg.com/@mdn/browser-compat-data@${bcdVersion}/data.json`)
2829 const failed = [ ] ;
2930
3031 for ( const key in features ) {
31- const feature = features [ key ] ;
32+ let feature : FeatureData = features [ key ] ;
33+
34+ if ( feature . kind === 'moved' ) {
35+ //console.info('[Baseline] Feature has moved to following redirect.', key, feature.redirect_target);
36+ feature = features [ feature . redirect_target ] ;
37+ }
38+
39+ if ( feature . kind == 'split' ) {
40+ // Skip split features for now
41+ continue
42+ }
43+
3244 let webviewBaseline : WebViewStatus = "unknown" ;
3345 // Default to today if unknown because that's when we "worked it out"
3446 let last_test_date = new Date ( ) . toISOString ( ) . split ( 'T' ) [ 0 ] ;
@@ -96,6 +108,7 @@ fetch(`http://unpkg.com/@mdn/browser-compat-data@${bcdVersion}/data.json`)
96108 // fall back to "unknown".
97109 // We should hunt down these cases and bring the
98110 // list of impacted features down.
111+ console . warn ( "[Baseline] Failed to compute baseline for" , key , e ) ;
99112 failed . push ( key ) ;
100113 }
101114
0 commit comments