Skip to content

Commit 16892e6

Browse files
committed
chore(schemas): refine browsers schema
1 parent 4113d7a commit 16892e6

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

schemas/browsers.schema.json

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,46 @@
2020
]
2121
},
2222

23+
"browser_name": {
24+
"type": "string",
25+
"description": "Browser key (e.g. 'firefox', 'chrome_android', or 'webview_ios').",
26+
"enum": [
27+
"bun",
28+
"chrome",
29+
"chrome_android",
30+
"deno",
31+
"edge",
32+
"firefox",
33+
"firefox_android",
34+
"ie",
35+
"nodejs",
36+
"oculus",
37+
"opera",
38+
"opera_android",
39+
"safari",
40+
"safari_ios",
41+
"samsunginternet_android",
42+
"webview_android",
43+
"webview_ios"
44+
]
45+
},
46+
47+
"upstream_browser_name": {
48+
"type": "string",
49+
"description": "Upstream browser key (e.g. 'firefox' or 'chrome_android').",
50+
"enum": ["chrome", "chrome_android", "firefox", "safari", "safari_ios"]
51+
},
52+
2353
"browser_status": {
2454
"type": "string",
2555
"enum": ["retired", "current", "beta", "nightly", "esr", "planned"]
2656
},
2757

2858
"browsers": {
2959
"type": "object",
60+
"propertyNames": {
61+
"$ref": "#/definitions/browser_name"
62+
},
3063
"additionalProperties": {
3164
"$ref": "#/definitions/browser_statement"
3265
},
@@ -36,7 +69,7 @@
3669
"minProperties": "A browser must be described within the file.",
3770
"maxProperties": "Each browser JSON file may only describe one browser."
3871
},
39-
"tsType": "Record<BrowserName, BrowserStatement>"
72+
"tsType": "{ [browser: BrowserName]: BrowserStatement }"
4073
},
4174

4275
"browser_statement": {

0 commit comments

Comments
 (0)