web-features 2.49.0 → 3.0.0-dev-20250917154839-f630e00

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.schema.json CHANGED
@@ -1,53 +1,124 @@
1
1
  {
2
- "$ref": "#/definitions/WebFeaturesData",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "description": "The top-level web-features data package",
4
+ "type": "object",
5
+ "properties": {
6
+ "browsers": {
7
+ "description": "Browsers and browser release data",
8
+ "type": "object",
9
+ "properties": {
10
+ "chrome": {
11
+ "$ref": "#/definitions/BrowserData"
12
+ },
13
+ "chrome_android": {
14
+ "$ref": "#/definitions/BrowserData"
15
+ },
16
+ "edge": {
17
+ "$ref": "#/definitions/BrowserData"
18
+ },
19
+ "firefox": {
20
+ "$ref": "#/definitions/BrowserData"
21
+ },
22
+ "firefox_android": {
23
+ "$ref": "#/definitions/BrowserData"
24
+ },
25
+ "safari": {
26
+ "$ref": "#/definitions/BrowserData"
27
+ },
28
+ "safari_ios": {
29
+ "$ref": "#/definitions/BrowserData"
30
+ }
31
+ },
32
+ "required": [
33
+ "chrome",
34
+ "chrome_android",
35
+ "edge",
36
+ "firefox",
37
+ "firefox_android",
38
+ "safari",
39
+ "safari_ios"
40
+ ],
41
+ "additionalProperties": false
42
+ },
43
+ "features": {
44
+ "description": "Feature identifiers and data",
45
+ "type": "object",
46
+ "additionalProperties": {
47
+ "oneOf": [
48
+ {
49
+ "$ref": "#/definitions/FeatureData"
50
+ },
51
+ {
52
+ "$ref": "#/definitions/FeatureMovedData"
53
+ },
54
+ {
55
+ "$ref": "#/definitions/FeatureSplitData"
56
+ }
57
+ ],
58
+ "$comment": "Use the `kind` property as a discriminator."
59
+ }
60
+ },
61
+ "groups": {
62
+ "description": "Group identifiers and data",
63
+ "type": "object",
64
+ "additionalProperties": {
65
+ "$ref": "#/definitions/GroupData"
66
+ }
67
+ },
68
+ "snapshots": {
69
+ "description": "Snapshot identifiers and data",
70
+ "type": "object",
71
+ "additionalProperties": {
72
+ "$ref": "#/definitions/SnapshotData"
73
+ }
74
+ }
75
+ },
76
+ "required": ["browsers", "features", "groups", "snapshots"],
77
+ "additionalProperties": false,
4
78
  "definitions": {
79
+ "Discouraged": {
80
+ "type": "object",
81
+ "properties": {
82
+ "according_to": {
83
+ "description": "Links to a formal discouragement notice, such as specification text, intent-to-unship, etc.",
84
+ "$ref": "#/definitions/Strings"
85
+ },
86
+ "alternatives": {
87
+ "description": "IDs for features that substitute some or all of this feature's utility",
88
+ "$ref": "#/definitions/Strings"
89
+ }
90
+ },
91
+ "required": ["according_to"],
92
+ "additionalProperties": false
93
+ },
5
94
  "BrowserData": {
6
- "additionalProperties": false,
7
95
  "description": "Browser information",
96
+ "type": "object",
8
97
  "properties": {
9
98
  "name": {
10
99
  "description": "The name of the browser, as in \"Edge\" or \"Safari on iOS\"",
11
100
  "type": "string"
12
101
  },
13
102
  "releases": {
14
- "description": "The browser's releases",
103
+ "type": "array",
15
104
  "items": {
16
105
  "$ref": "#/definitions/Release"
17
- },
18
- "type": "array"
106
+ }
19
107
  }
20
108
  },
21
- "required": [
22
- "name",
23
- "releases"
24
- ],
25
- "type": "object"
109
+ "required": ["name", "releases"],
110
+ "additionalProperties": false
26
111
  },
27
112
  "FeatureData": {
28
- "additionalProperties": false,
113
+ "description": "A feature data entry",
114
+ "type": "object",
29
115
  "properties": {
30
- "caniuse": {
31
- "anyOf": [
32
- {
33
- "type": "string"
34
- },
35
- {
36
- "items": {
37
- "type": "string"
38
- },
39
- "minItems": 2,
40
- "type": "array"
41
- }
42
- ],
43
- "description": "caniuse.com identifier(s)"
116
+ "kind": {
117
+ "const": "feature"
44
118
  },
45
- "compat_features": {
46
- "description": "Sources of support data for this feature",
47
- "items": {
48
- "type": "string"
49
- },
50
- "type": "array"
119
+ "name": {
120
+ "description": "Short name",
121
+ "type": "string"
51
122
  },
52
123
  "description": {
53
124
  "description": "Short description of the feature, as a plain text string",
@@ -57,212 +128,77 @@
57
128
  "description": "Short description of the feature, as an HTML string",
58
129
  "type": "string"
59
130
  },
60
- "discouraged": {
61
- "additionalProperties": false,
62
- "description": "Whether developers are formally discouraged from using this feature",
63
- "properties": {
64
- "according_to": {
65
- "description": "Links to a formal discouragement notice, such as specification text, intent-to-unship, etc.",
66
- "items": {
67
- "type": "string"
68
- },
69
- "type": "array"
70
- },
71
- "alternatives": {
72
- "description": "IDs for features that substitute some or all of this feature's utility",
73
- "items": {
74
- "type": "string"
75
- },
76
- "type": "array"
77
- }
78
- },
79
- "required": [
80
- "according_to"
81
- ],
82
- "type": "object"
131
+ "spec": {
132
+ "description": "Specification URLs",
133
+ "$ref": "#/definitions/Strings"
83
134
  },
84
135
  "group": {
85
- "anyOf": [
86
- {
87
- "type": "string"
88
- },
89
- {
90
- "items": {
91
- "type": "string"
92
- },
93
- "minItems": 2,
94
- "type": "array"
95
- }
96
- ],
97
- "description": "Group identifier(s)"
98
- },
99
- "name": {
100
- "description": "Short name",
101
- "type": "string"
136
+ "description": "Group identifiers",
137
+ "$ref": "#/definitions/Strings"
102
138
  },
103
139
  "snapshot": {
104
- "anyOf": [
105
- {
106
- "type": "string"
107
- },
108
- {
109
- "items": {
110
- "type": "string"
111
- },
112
- "minItems": 2,
113
- "type": "array"
114
- }
115
- ],
116
- "description": "Snapshot identifier(s)"
140
+ "description": "Snapshot identifiers",
141
+ "$ref": "#/definitions/Strings"
117
142
  },
118
- "spec": {
119
- "anyOf": [
120
- {
121
- "type": "string"
122
- },
123
- {
124
- "items": {
125
- "type": "string"
126
- },
127
- "minItems": 2,
128
- "type": "array"
129
- }
130
- ],
131
- "description": "Specification URL(s)"
143
+ "caniuse": {
144
+ "description": "caniuse.com identifiers",
145
+ "$ref": "#/definitions/Strings"
146
+ },
147
+ "compat_features": {
148
+ "description": "Sources of support data for this feature",
149
+ "$ref": "#/definitions/Strings"
132
150
  },
133
151
  "status": {
134
- "additionalProperties": false,
135
- "description": "Whether a feature is considered a \"baseline\" web platform feature and when it achieved that status",
136
- "properties": {
137
- "baseline": {
138
- "description": "Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)",
139
- "enum": [
140
- "high",
141
- "low",
142
- false
143
- ],
144
- "type": [
145
- "string",
146
- "boolean"
147
- ]
148
- },
149
- "baseline_high_date": {
150
- "description": "Date the feature achieved Baseline high status",
151
- "type": "string"
152
- },
153
- "baseline_low_date": {
154
- "description": "Date the feature achieved Baseline low status",
155
- "type": "string"
156
- },
157
- "by_compat_key": {
158
- "additionalProperties": {
159
- "additionalProperties": false,
160
- "properties": {
161
- "baseline": {
162
- "description": "Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)",
163
- "enum": [
164
- "high",
165
- "low",
166
- false
167
- ],
168
- "type": [
169
- "string",
170
- "boolean"
171
- ]
172
- },
173
- "baseline_high_date": {
174
- "description": "Date the feature achieved Baseline high status",
175
- "type": "string"
176
- },
177
- "baseline_low_date": {
178
- "description": "Date the feature achieved Baseline low status",
179
- "type": "string"
180
- },
181
- "support": {
182
- "additionalProperties": false,
183
- "description": "Browser versions that most-recently introduced the feature",
184
- "properties": {
185
- "chrome": {
186
- "type": "string"
187
- },
188
- "chrome_android": {
189
- "type": "string"
190
- },
191
- "edge": {
192
- "type": "string"
193
- },
194
- "firefox": {
195
- "type": "string"
196
- },
197
- "firefox_android": {
198
- "type": "string"
199
- },
200
- "safari": {
201
- "type": "string"
202
- },
203
- "safari_ios": {
204
- "type": "string"
205
- }
206
- },
207
- "type": "object"
208
- }
209
- },
210
- "required": [
211
- "baseline",
212
- "support"
213
- ],
214
- "type": "object"
215
- },
216
- "description": "Statuses for each key in the feature's compat_features list, if applicable. Not available to the npm release of web-features.",
217
- "type": "object"
218
- },
219
- "support": {
220
- "additionalProperties": false,
221
- "description": "Browser versions that most-recently introduced the feature",
222
- "properties": {
223
- "chrome": {
224
- "type": "string"
225
- },
226
- "chrome_android": {
227
- "type": "string"
228
- },
229
- "edge": {
230
- "type": "string"
231
- },
232
- "firefox": {
233
- "type": "string"
234
- },
235
- "firefox_android": {
236
- "type": "string"
237
- },
238
- "safari": {
239
- "type": "string"
240
- },
241
- "safari_ios": {
242
- "type": "string"
243
- }
244
- },
245
- "type": "object"
246
- }
247
- },
248
- "required": [
249
- "baseline",
250
- "support"
251
- ],
252
- "type": "object"
152
+ "description": "Whether a feature is considered a \"Baseline\" web platform feature and when it achieved that status",
153
+ "$ref": "#/definitions/StatusHeadline"
154
+ },
155
+ "discouraged": {
156
+ "description": "Whether developers are formally discouraged from using this feature",
157
+ "$ref": "#/definitions/Discouraged"
253
158
  }
254
159
  },
255
160
  "required": [
161
+ "kind",
256
162
  "name",
257
163
  "description",
258
164
  "description_html",
259
165
  "spec",
260
166
  "status"
261
167
  ],
262
- "type": "object"
168
+ "additionalProperties": false
169
+ },
170
+ "FeatureMovedData": {
171
+ "description": "A feature has permanently moved to exactly one other ID",
172
+ "type": "object",
173
+ "properties": {
174
+ "kind": {
175
+ "const": "moved"
176
+ },
177
+ "redirect_target": {
178
+ "description": "The new ID for this feature",
179
+ "type": "string"
180
+ }
181
+ },
182
+ "required": ["kind", "redirect_target"],
183
+ "additionalProperties": false
184
+ },
185
+ "FeatureSplitData": {
186
+ "description": "A feature has split into two or more other features",
187
+ "type": "object",
188
+ "properties": {
189
+ "kind": {
190
+ "const": "split"
191
+ },
192
+ "redirect_targets": {
193
+ "description": "The new IDs for this feature",
194
+ "$ref": "#/definitions/Strings"
195
+ }
196
+ },
197
+ "required": ["kind", "redirect_targets"],
198
+ "additionalProperties": false
263
199
  },
264
200
  "GroupData": {
265
- "additionalProperties": false,
201
+ "type": "object",
266
202
  "properties": {
267
203
  "name": {
268
204
  "description": "Short name",
@@ -273,32 +209,27 @@
273
209
  "type": "string"
274
210
  }
275
211
  },
276
- "required": [
277
- "name"
278
- ],
279
- "type": "object"
212
+ "required": ["name"],
213
+ "additionalProperties": false
280
214
  },
281
215
  "Release": {
282
- "additionalProperties": false,
283
216
  "description": "Browser release information",
217
+ "type": "object",
284
218
  "properties": {
285
- "date": {
286
- "description": "The release date, as in \"2023-12-11\"",
287
- "type": "string"
288
- },
289
219
  "version": {
290
220
  "description": "The version string, as in \"10\" or \"17.1\"",
291
221
  "type": "string"
222
+ },
223
+ "date": {
224
+ "description": " The release date, as in \"2023-12-11\"",
225
+ "type": "string"
292
226
  }
293
227
  },
294
- "required": [
295
- "version",
296
- "date"
297
- ],
298
- "type": "object"
228
+ "required": ["version", "date"],
229
+ "additionalProperties": false
299
230
  },
300
231
  "SnapshotData": {
301
- "additionalProperties": false,
232
+ "type": "object",
302
233
  "properties": {
303
234
  "name": {
304
235
  "description": "Short name",
@@ -309,81 +240,80 @@
309
240
  "type": "string"
310
241
  }
311
242
  },
312
- "required": [
313
- "name",
314
- "spec"
315
- ],
316
- "type": "object"
243
+ "required": ["name", "spec"],
244
+ "additionalProperties": false
317
245
  },
318
- "WebFeaturesData": {
319
- "additionalProperties": false,
246
+ "Status": {
247
+ "type": "object",
320
248
  "properties": {
321
- "browsers": {
322
- "additionalProperties": false,
323
- "description": "Browsers and browser release data",
249
+ "baseline": {
250
+ "description": "Whether the feature is Baseline (low substatus), Baseline (high substatus), or not (false)",
251
+ "enum": ["high", "low", false]
252
+ },
253
+ "baseline_high_date": {
254
+ "description": "Date the feature achieved Baseline high status",
255
+ "type": "string"
256
+ },
257
+ "baseline_low_date": {
258
+ "description": "Date the feature achieved Baseline low status",
259
+ "type": "string"
260
+ },
261
+ "support": {
262
+ "description": "Browser versions that most-recently introduced the feature",
263
+ "type": "object",
324
264
  "properties": {
325
265
  "chrome": {
326
- "$ref": "#/definitions/BrowserData"
266
+ "type": "string"
327
267
  },
328
268
  "chrome_android": {
329
- "$ref": "#/definitions/BrowserData"
269
+ "type": "string"
330
270
  },
331
271
  "edge": {
332
- "$ref": "#/definitions/BrowserData"
272
+ "type": "string"
333
273
  },
334
274
  "firefox": {
335
- "$ref": "#/definitions/BrowserData"
275
+ "type": "string"
336
276
  },
337
277
  "firefox_android": {
338
- "$ref": "#/definitions/BrowserData"
278
+ "type": "string"
339
279
  },
340
280
  "safari": {
341
- "$ref": "#/definitions/BrowserData"
281
+ "type": "string"
342
282
  },
343
283
  "safari_ios": {
344
- "$ref": "#/definitions/BrowserData"
284
+ "type": "string"
345
285
  }
346
286
  },
347
- "required": [
348
- "chrome",
349
- "chrome_android",
350
- "edge",
351
- "firefox",
352
- "firefox_android",
353
- "safari",
354
- "safari_ios"
355
- ],
356
- "type": "object"
357
- },
358
- "features": {
359
- "additionalProperties": {
360
- "$ref": "#/definitions/FeatureData"
361
- },
362
- "description": "Feature identifiers and data",
363
- "type": "object"
364
- },
365
- "groups": {
366
- "additionalProperties": {
367
- "$ref": "#/definitions/GroupData"
368
- },
369
- "description": "Group identifiers and data",
370
- "type": "object"
371
- },
372
- "snapshots": {
287
+ "additionalProperties": false
288
+ }
289
+ },
290
+ "required": ["baseline", "support"]
291
+ },
292
+ "StatusHeadline": {
293
+ "type": "object",
294
+ "allOf": [{ "$ref": "#/definitions/Status" }],
295
+ "properties": {
296
+ "baseline": {},
297
+ "baseline_high_date": {},
298
+ "baseline_low_date": {},
299
+ "support": {},
300
+ "by_compat_key": {
301
+ "description": "Statuses for each key in the feature's compat_features list, if applicable. Not available to the npm release of web-features.",
302
+ "type": "object",
373
303
  "additionalProperties": {
374
- "$ref": "#/definitions/SnapshotData"
375
- },
376
- "description": "Snapshot identifiers and data",
377
- "type": "object"
304
+ "$ref": "#/definitions/Status"
305
+ }
378
306
  }
379
307
  },
380
- "required": [
381
- "browsers",
382
- "features",
383
- "groups",
384
- "snapshots"
385
- ],
386
- "type": "object"
308
+ "required": ["baseline", "support"],
309
+ "additionalProperties": false
310
+ },
311
+ "Strings": {
312
+ "type": "array",
313
+ "items": {
314
+ "type": "string"
315
+ },
316
+ "minItems": 1
387
317
  }
388
318
  }
389
- }
319
+ }