web-features 2.49.0-dev-20250917152108-acd4cf1 → 2.49.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.schema.json CHANGED
@@ -1,124 +1,53 @@
1
1
  {
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,
2
+ "$ref": "#/definitions/WebFeaturesData",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
78
4
  "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
- },
94
5
  "BrowserData": {
6
+ "additionalProperties": false,
95
7
  "description": "Browser information",
96
- "type": "object",
97
8
  "properties": {
98
9
  "name": {
99
10
  "description": "The name of the browser, as in \"Edge\" or \"Safari on iOS\"",
100
11
  "type": "string"
101
12
  },
102
13
  "releases": {
103
- "type": "array",
14
+ "description": "The browser's releases",
104
15
  "items": {
105
16
  "$ref": "#/definitions/Release"
106
- }
17
+ },
18
+ "type": "array"
107
19
  }
108
20
  },
109
- "required": ["name", "releases"],
110
- "additionalProperties": false
21
+ "required": [
22
+ "name",
23
+ "releases"
24
+ ],
25
+ "type": "object"
111
26
  },
112
27
  "FeatureData": {
113
- "description": "A feature data entry",
114
- "type": "object",
28
+ "additionalProperties": false,
115
29
  "properties": {
116
- "kind": {
117
- "const": "feature"
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)"
118
44
  },
119
- "name": {
120
- "description": "Short name",
121
- "type": "string"
45
+ "compat_features": {
46
+ "description": "Sources of support data for this feature",
47
+ "items": {
48
+ "type": "string"
49
+ },
50
+ "type": "array"
122
51
  },
123
52
  "description": {
124
53
  "description": "Short description of the feature, as a plain text string",
@@ -128,77 +57,212 @@
128
57
  "description": "Short description of the feature, as an HTML string",
129
58
  "type": "string"
130
59
  },
131
- "spec": {
132
- "description": "Specification URLs",
133
- "$ref": "#/definitions/Strings"
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"
134
83
  },
135
84
  "group": {
136
- "description": "Group identifiers",
137
- "$ref": "#/definitions/Strings"
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)"
138
98
  },
139
- "snapshot": {
140
- "description": "Snapshot identifiers",
141
- "$ref": "#/definitions/Strings"
99
+ "name": {
100
+ "description": "Short name",
101
+ "type": "string"
142
102
  },
143
- "caniuse": {
144
- "description": "caniuse.com identifiers",
145
- "$ref": "#/definitions/Strings"
103
+ "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)"
146
117
  },
147
- "compat_features": {
148
- "description": "Sources of support data for this feature",
149
- "$ref": "#/definitions/Strings"
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)"
150
132
  },
151
133
  "status": {
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"
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"
158
253
  }
159
254
  },
160
255
  "required": [
161
- "kind",
162
256
  "name",
163
257
  "description",
164
258
  "description_html",
165
259
  "spec",
166
260
  "status"
167
261
  ],
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
262
+ "type": "object"
199
263
  },
200
264
  "GroupData": {
201
- "type": "object",
265
+ "additionalProperties": false,
202
266
  "properties": {
203
267
  "name": {
204
268
  "description": "Short name",
@@ -209,27 +273,32 @@
209
273
  "type": "string"
210
274
  }
211
275
  },
212
- "required": ["name"],
213
- "additionalProperties": false
276
+ "required": [
277
+ "name"
278
+ ],
279
+ "type": "object"
214
280
  },
215
281
  "Release": {
282
+ "additionalProperties": false,
216
283
  "description": "Browser release information",
217
- "type": "object",
218
284
  "properties": {
219
- "version": {
220
- "description": "The version string, as in \"10\" or \"17.1\"",
285
+ "date": {
286
+ "description": "The release date, as in \"2023-12-11\"",
221
287
  "type": "string"
222
288
  },
223
- "date": {
224
- "description": " The release date, as in \"2023-12-11\"",
289
+ "version": {
290
+ "description": "The version string, as in \"10\" or \"17.1\"",
225
291
  "type": "string"
226
292
  }
227
293
  },
228
- "required": ["version", "date"],
229
- "additionalProperties": false
294
+ "required": [
295
+ "version",
296
+ "date"
297
+ ],
298
+ "type": "object"
230
299
  },
231
300
  "SnapshotData": {
232
- "type": "object",
301
+ "additionalProperties": false,
233
302
  "properties": {
234
303
  "name": {
235
304
  "description": "Short name",
@@ -240,80 +309,81 @@
240
309
  "type": "string"
241
310
  }
242
311
  },
243
- "required": ["name", "spec"],
244
- "additionalProperties": false
312
+ "required": [
313
+ "name",
314
+ "spec"
315
+ ],
316
+ "type": "object"
245
317
  },
246
- "Status": {
247
- "type": "object",
318
+ "WebFeaturesData": {
319
+ "additionalProperties": false,
248
320
  "properties": {
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",
321
+ "browsers": {
322
+ "additionalProperties": false,
323
+ "description": "Browsers and browser release data",
264
324
  "properties": {
265
325
  "chrome": {
266
- "type": "string"
326
+ "$ref": "#/definitions/BrowserData"
267
327
  },
268
328
  "chrome_android": {
269
- "type": "string"
329
+ "$ref": "#/definitions/BrowserData"
270
330
  },
271
331
  "edge": {
272
- "type": "string"
332
+ "$ref": "#/definitions/BrowserData"
273
333
  },
274
334
  "firefox": {
275
- "type": "string"
335
+ "$ref": "#/definitions/BrowserData"
276
336
  },
277
337
  "firefox_android": {
278
- "type": "string"
338
+ "$ref": "#/definitions/BrowserData"
279
339
  },
280
340
  "safari": {
281
- "type": "string"
341
+ "$ref": "#/definitions/BrowserData"
282
342
  },
283
343
  "safari_ios": {
284
- "type": "string"
344
+ "$ref": "#/definitions/BrowserData"
285
345
  }
286
346
  },
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",
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": {
303
366
  "additionalProperties": {
304
- "$ref": "#/definitions/Status"
305
- }
367
+ "$ref": "#/definitions/GroupData"
368
+ },
369
+ "description": "Group identifiers and data",
370
+ "type": "object"
371
+ },
372
+ "snapshots": {
373
+ "additionalProperties": {
374
+ "$ref": "#/definitions/SnapshotData"
375
+ },
376
+ "description": "Snapshot identifiers and data",
377
+ "type": "object"
306
378
  }
307
379
  },
308
- "required": ["baseline", "support"],
309
- "additionalProperties": false
310
- },
311
- "Strings": {
312
- "type": "array",
313
- "items": {
314
- "type": "string"
315
- },
316
- "minItems": 1
380
+ "required": [
381
+ "browsers",
382
+ "features",
383
+ "groups",
384
+ "snapshots"
385
+ ],
386
+ "type": "object"
317
387
  }
318
388
  }
319
- }
389
+ }