web-features 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data.json +1 -1
- package/data.schema.json +63 -0
- package/index.d.ts +5 -3
- package/package.json +1 -1
package/data.schema.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$ref": "#/definitions/WebFeaturesData",
|
|
2
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
4
|
"definitions": {
|
|
4
5
|
"FeatureData": {
|
|
@@ -111,6 +112,68 @@
|
|
|
111
112
|
"description": "Date the feature achieved Baseline low status",
|
|
112
113
|
"type": "string"
|
|
113
114
|
},
|
|
115
|
+
"by_compat_key": {
|
|
116
|
+
"additionalProperties": {
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"properties": {
|
|
119
|
+
"baseline": {
|
|
120
|
+
"description": "Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)",
|
|
121
|
+
"enum": [
|
|
122
|
+
"high",
|
|
123
|
+
"low",
|
|
124
|
+
false
|
|
125
|
+
],
|
|
126
|
+
"type": [
|
|
127
|
+
"string",
|
|
128
|
+
"boolean"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"baseline_high_date": {
|
|
132
|
+
"description": "Date the feature achieved Baseline high status",
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
"baseline_low_date": {
|
|
136
|
+
"description": "Date the feature achieved Baseline low status",
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"support": {
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"description": "Browser versions that most-recently introduced the feature",
|
|
142
|
+
"properties": {
|
|
143
|
+
"chrome": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"chrome_android": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"edge": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"firefox": {
|
|
153
|
+
"type": "string"
|
|
154
|
+
},
|
|
155
|
+
"firefox_android": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"safari": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"safari_ios": {
|
|
162
|
+
"type": "string"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"type": "object"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"required": [
|
|
169
|
+
"baseline",
|
|
170
|
+
"support"
|
|
171
|
+
],
|
|
172
|
+
"type": "object"
|
|
173
|
+
},
|
|
174
|
+
"description": "Statuses for each key in the feature's compat_features list, if applicable. Not available to the npm release of web-features.",
|
|
175
|
+
"type": "object"
|
|
176
|
+
},
|
|
114
177
|
"support": {
|
|
115
178
|
"additionalProperties": false,
|
|
116
179
|
"description": "Browser versions that most-recently introduced the feature",
|
package/index.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ interface FeatureData {
|
|
|
5
5
|
description: string;
|
|
6
6
|
/** Short description of the feature, as an HTML string */
|
|
7
7
|
description_html: string;
|
|
8
|
-
/** Alias identifier */
|
|
9
|
-
alias?: string | [string, string, ...string[]];
|
|
10
8
|
/** Specification */
|
|
11
9
|
spec: specification_url | [specification_url, specification_url, ...specification_url[]];
|
|
12
10
|
/** Group identifier */
|
|
@@ -22,7 +20,7 @@ interface FeatureData {
|
|
|
22
20
|
}
|
|
23
21
|
type browserIdentifier = "chrome" | "chrome_android" | "edge" | "firefox" | "firefox_android" | "safari" | "safari_ios";
|
|
24
22
|
type BaselineHighLow = "high" | "low";
|
|
25
|
-
interface
|
|
23
|
+
interface Status {
|
|
26
24
|
/** Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false) */
|
|
27
25
|
baseline: BaselineHighLow | false;
|
|
28
26
|
/** Date the feature achieved Baseline low status */
|
|
@@ -34,6 +32,10 @@ interface SupportStatus {
|
|
|
34
32
|
[K in browserIdentifier]?: string;
|
|
35
33
|
};
|
|
36
34
|
}
|
|
35
|
+
interface SupportStatus extends Status {
|
|
36
|
+
/** Statuses for each key in the feature's compat_features list, if applicable. Not available to the npm release of web-features. */
|
|
37
|
+
by_compat_key?: Record<string, Status>;
|
|
38
|
+
}
|
|
37
39
|
/** Specification URL
|
|
38
40
|
* @format uri
|
|
39
41
|
*/
|