Skip to content

Commit ccb1eee

Browse files
committed
repurpose bcd update for web features update with old version for testing
1 parent 2c72dbc commit ccb1eee

File tree

4 files changed

+18
-132
lines changed

4 files changed

+18
-132
lines changed

bcd_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.1.16
1+
3.6.0

package-lock.json

Lines changed: 6 additions & 129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/baseline.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { features, type FeatureDataPlusWebview } from "web-features-plus-webview";
2-
import { readFileSync } from "fs";
32
import { stdout } from "process";
43

54
type WebViewStatus = boolean | "high" | "low" | "unknown";

tools/update_bcd_version.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
'''
1010

1111
import urllib.request, json
12+
import os
13+
import subprocess
14+
from pathlib import Path
1215

1316
CDN_URL = "https://unpkg.com/@mdn/browser-compat-data/data.json"
1417
VERSION_FILE = "bcd_version"
@@ -35,7 +38,14 @@ def validateNotMajor(prevVersion, nextVersion):
3538
file.write(version)
3639
file.truncate()
3740

38-
# TODO update web features npm package
41+
# Run `npm update web-features` at the repository root to refresh package-lock.json
42+
try:
43+
repo_root = Path(__file__).resolve().parent.parent
44+
subprocess.run(["npm", "update", "web-features"], cwd=str(repo_root), check=True)
45+
except Exception as e:
46+
print(f"Warning: failed to run 'npm update web-features': {e}")
47+
exit(1)
48+
3949
else:
4050
# Exit with a non-zero code so that CI/CD can catch this.
4151
print("Major version change detected, not updating.")

0 commit comments

Comments
 (0)