@mdn/browser-compat-data 5.0.2 → 5.1.1
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/index.ts +3 -1
- package/package.json +1 -1
- package/types.d.ts +36 -50
package/index.ts
CHANGED
|
@@ -5,5 +5,7 @@ import { CompatData } from "./types";
|
|
|
5
5
|
|
|
6
6
|
import bcd from "./data.json";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// XXX The cast to "any" mitigates a TS definition issue. This is very bad practice and
|
|
9
|
+
// should be fixed as soon as possible.
|
|
10
|
+
export default bcd as any as CompatData;
|
|
9
11
|
export * from "./types";
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"main":"data.json","exports":{".":"./data.json","./forLegacyNode":"./legacynode.mjs"},"types":"index.ts","name":"@mdn/browser-compat-data","version":"5.
|
|
1
|
+
{"main":"data.json","exports":{".":"./data.json","./forLegacyNode":"./legacynode.mjs"},"types":"index.ts","name":"@mdn/browser-compat-data","version":"5.1.1","description":"Browser compatibility data provided by MDN Web Docs","repository":{"type":"git","url":"git+https://github.com/mdn/browser-compat-data.git"},"keywords":["bcd","browser-compat-data","browser","compatibility","data","mdn","mozilla"],"author":"MDN Web Docs","license":"CC0-1.0","bugs":{"url":"https://github.com/mdn/browser-compat-data/issues"},"homepage":"https://github.com/mdn/browser-compat-data#readme"}
|
package/types.d.ts
CHANGED
|
@@ -15,29 +15,29 @@ export type BrowserName = "chrome" | "chrome_android" | "deno" | "edge" | "firef
|
|
|
15
15
|
export type VersionValue = string | boolean | null;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* This interface was referenced by `
|
|
18
|
+
* This interface was referenced by `BrowserDataFile`'s JSON-Schema
|
|
19
19
|
* via the `definition` "browsers".
|
|
20
20
|
*/
|
|
21
21
|
export type Browsers = Record<BrowserName, BrowserStatement>;
|
|
22
22
|
/**
|
|
23
|
-
* This interface was referenced by `
|
|
23
|
+
* This interface was referenced by `BrowserDataFile`'s JSON-Schema
|
|
24
24
|
* via the `definition` "browser_type".
|
|
25
25
|
*/
|
|
26
26
|
export type BrowserType = "desktop" | "mobile" | "xr" | "server";
|
|
27
27
|
/**
|
|
28
|
-
* This interface was referenced by `
|
|
28
|
+
* This interface was referenced by `BrowserDataFile`'s JSON-Schema
|
|
29
29
|
* via the `definition` "browser_engine".
|
|
30
30
|
*/
|
|
31
31
|
export type BrowserEngine = "Blink" | "EdgeHTML" | "Gecko" | "Presto" | "Trident" | "WebKit" | "V8";
|
|
32
32
|
/**
|
|
33
|
-
* This interface was referenced by `
|
|
33
|
+
* This interface was referenced by `BrowserDataFile`'s JSON-Schema
|
|
34
34
|
* via the `definition` "browser_status".
|
|
35
35
|
*/
|
|
36
36
|
export type BrowserStatus = "retired" | "current" | "exclusive" | "beta" | "nightly" | "esr" | "planned";
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* This interface was referenced by `
|
|
40
|
+
* This interface was referenced by `BrowserDataFile`'s JSON-Schema
|
|
41
41
|
* via the `definition` "browser_statement".
|
|
42
42
|
*/
|
|
43
43
|
export interface BrowserStatement {
|
|
@@ -52,7 +52,7 @@ export interface BrowserStatement {
|
|
|
52
52
|
/**
|
|
53
53
|
* The upstream browser this browser derives from (e.g. Firefox Android is derived from Firefox, Edge is derived from Chrome).
|
|
54
54
|
*/
|
|
55
|
-
upstream?:
|
|
55
|
+
upstream?: BrowserName;
|
|
56
56
|
/**
|
|
57
57
|
* Whether the browser supports flags to enable or disablle features.
|
|
58
58
|
*/
|
|
@@ -75,7 +75,7 @@ export interface BrowserStatement {
|
|
|
75
75
|
releases: {[version: string]: ReleaseStatement};
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* This interface was referenced by `
|
|
78
|
+
* This interface was referenced by `BrowserDataFile`'s JSON-Schema
|
|
79
79
|
* via the `definition` "release_statement".
|
|
80
80
|
*/
|
|
81
81
|
export interface ReleaseStatement {
|
|
@@ -103,52 +103,46 @@ export interface ReleaseStatement {
|
|
|
103
103
|
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* This interface was referenced by `
|
|
106
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema definition
|
|
107
|
+
* via the `patternProperty` "^(?!__compat)(?!webextensions)[a-zA-Z_0-9-$@]*$".
|
|
108
|
+
*
|
|
109
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
110
|
+
* via the `definition` "identifier".
|
|
111
|
+
*/
|
|
112
|
+
export type Identifier = {[key: string]: Identifier} & {__compat?: CompatStatement};
|
|
113
|
+
/**
|
|
114
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
107
115
|
* via the `definition` "support_statement".
|
|
108
116
|
*/
|
|
109
117
|
export type SupportStatement = SimpleSupportStatement | SimpleSupportStatement[];
|
|
110
118
|
/**
|
|
111
|
-
* This interface was referenced by `
|
|
119
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
112
120
|
* via the `definition` "support_block".
|
|
113
121
|
*/
|
|
114
|
-
export type SupportBlock = Partial<Record<
|
|
122
|
+
export type SupportBlock = Partial<Record<BrowserName, SupportStatement>>;
|
|
115
123
|
/**
|
|
116
|
-
* This interface was referenced by `
|
|
124
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
117
125
|
* via the `definition` "spec_url_value".
|
|
118
126
|
*/
|
|
119
127
|
export type SpecUrlValue = string;
|
|
120
128
|
/**
|
|
121
|
-
* This interface was referenced by `
|
|
129
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
122
130
|
* via the `definition` "impl_url_value".
|
|
123
131
|
*/
|
|
124
132
|
export type ImplUrlValue = string;
|
|
125
|
-
|
|
126
|
-
|
|
127
133
|
/**
|
|
128
|
-
* This interface was referenced by `
|
|
129
|
-
* via the `
|
|
130
|
-
*
|
|
131
|
-
* This interface was referenced by `CompatData`'s JSON-Schema
|
|
132
|
-
* via the `definition` "identifier".
|
|
134
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
135
|
+
* via the `definition` "webextensions_identifier".
|
|
136
|
+
* THIS INTERFACE SHOULD NOT BE USED AND MAY BE REMOVED AT ANY TIME; USE THE "Identifier" INTERFACE INSTEAD.
|
|
133
137
|
*/
|
|
134
|
-
export
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
*
|
|
138
|
-
* In other words, identifiers without `__compat` aren't necessarily features, but help to nest the features properly.
|
|
139
|
-
*
|
|
140
|
-
* When an identifier has a `__compat` block, it represents its basic support, indicating that a minimal implementation of a functionality is included.
|
|
141
|
-
*
|
|
142
|
-
* What it represents exactly depends of the evolution of the feature over time, both in terms of specifications and of browser support.
|
|
143
|
-
*/
|
|
144
|
-
__compat?: CompatStatement;
|
|
145
|
-
|
|
146
|
-
}
|
|
138
|
+
export type WebextensionsIdentifier = {[key: string]: Identifier} & {__compat?: CompatStatement};
|
|
139
|
+
|
|
140
|
+
|
|
147
141
|
/**
|
|
148
|
-
* This interface was referenced by `
|
|
142
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema definition
|
|
149
143
|
* via the `patternProperty` "^__compat$".
|
|
150
144
|
*
|
|
151
|
-
* This interface was referenced by `
|
|
145
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
152
146
|
* via the `definition` "compat_statement".
|
|
153
147
|
*/
|
|
154
148
|
export interface CompatStatement {
|
|
@@ -164,6 +158,10 @@ export interface CompatStatement {
|
|
|
164
158
|
* An optional URL or array of URLs, each of which is for a specific part of a specification in which this feature is defined. Each URL must contain a fragment identifier.
|
|
165
159
|
*/
|
|
166
160
|
spec_url?: string | string[];
|
|
161
|
+
/**
|
|
162
|
+
* The path to the file that defines this feature in browser-compat-data, relative to the repository root. Useful for guiding potential contributors towards the correct file to edit. This is automatically generated at build time and should never manually be specified.
|
|
163
|
+
*/
|
|
164
|
+
source_file?: string;
|
|
167
165
|
/**
|
|
168
166
|
* The data for the support of each browser, containing a `support_statement` object for each browser identifier with information about versions, prefixes, or alternate names, as well as notes.
|
|
169
167
|
*/
|
|
@@ -174,7 +172,7 @@ export interface CompatStatement {
|
|
|
174
172
|
status?: StatusBlock;
|
|
175
173
|
}
|
|
176
174
|
/**
|
|
177
|
-
* This interface was referenced by `
|
|
175
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
178
176
|
* via the `definition` "simple_support_statement".
|
|
179
177
|
*/
|
|
180
178
|
export interface SimpleSupportStatement {
|
|
@@ -212,7 +210,7 @@ export interface SimpleSupportStatement {
|
|
|
212
210
|
notes?: string | string[];
|
|
213
211
|
}
|
|
214
212
|
/**
|
|
215
|
-
* This interface was referenced by `
|
|
213
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
216
214
|
* via the `definition` "flag_statement".
|
|
217
215
|
*/
|
|
218
216
|
export interface FlagStatement {
|
|
@@ -230,7 +228,7 @@ export interface FlagStatement {
|
|
|
230
228
|
value_to_set?: string;
|
|
231
229
|
}
|
|
232
230
|
/**
|
|
233
|
-
* This interface was referenced by `
|
|
231
|
+
* This interface was referenced by `CompatDataFile`'s JSON-Schema
|
|
234
232
|
* via the `definition` "status_block".
|
|
235
233
|
*/
|
|
236
234
|
export interface StatusBlock {
|
|
@@ -247,21 +245,9 @@ export interface StatusBlock {
|
|
|
247
245
|
*/
|
|
248
246
|
deprecated: boolean;
|
|
249
247
|
}
|
|
250
|
-
/**
|
|
251
|
-
* This interface was referenced by `CompatData`'s JSON-Schema
|
|
252
|
-
* via the `definition` "webextensions_identifier".
|
|
253
|
-
*/
|
|
254
|
-
export interface WebextensionsIdentifier {
|
|
255
|
-
__compat?: CompatStatement;
|
|
256
|
-
/**
|
|
257
|
-
* This interface was referenced by `WebextensionsIdentifier`'s JSON-Schema definition
|
|
258
|
-
* via the `patternProperty` "^(?!__compat)[a-zA-Z_0-9-$@]*$".
|
|
259
|
-
*/
|
|
260
|
-
[k: string]: Identifier;
|
|
261
|
-
}
|
|
262
248
|
|
|
263
249
|
|
|
264
|
-
export interface MetaBlock{
|
|
250
|
+
export interface MetaBlock {
|
|
265
251
|
version: string;
|
|
266
252
|
}
|
|
267
253
|
|