@mdn/browser-compat-data 4.2.0 → 5.0.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/README.md +46 -4
- package/data.json +1 -1
- package/index.ts +9 -0
- package/legacynode.mjs +4 -0
- package/package.json +1 -1
- package/types.d.ts +41 -17
- package/index.d.ts +0 -10
- package/index.js +0 -1
package/index.ts
ADDED
package/legacynode.mjs
ADDED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"main":"index.
|
|
1
|
+
{"main":"data.json","exports":{".":"./data.json","./forLegacyNode":"./legacynode.mjs"},"types":"index.ts","name":"@mdn/browser-compat-data","version":"5.0.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
|
@@ -13,6 +13,7 @@ export type BrowserNames =
|
|
|
13
13
|
| 'firefox_android'
|
|
14
14
|
| 'ie'
|
|
15
15
|
| 'nodejs'
|
|
16
|
+
| 'oculus'
|
|
16
17
|
| 'opera'
|
|
17
18
|
| 'opera_android'
|
|
18
19
|
| 'safari'
|
|
@@ -29,6 +30,8 @@ export type BrowserEngines =
|
|
|
29
30
|
| 'WebKit'
|
|
30
31
|
| 'V8';
|
|
31
32
|
|
|
33
|
+
export type BrowserTypes = 'desktop' | 'mobile' | 'xr' | 'server';
|
|
34
|
+
|
|
32
35
|
/**
|
|
33
36
|
* The browser namespace.
|
|
34
37
|
*/
|
|
@@ -47,23 +50,44 @@ export interface BrowserStatement {
|
|
|
47
50
|
name: string;
|
|
48
51
|
|
|
49
52
|
/**
|
|
50
|
-
* The
|
|
51
|
-
* `"
|
|
53
|
+
* The platform the browser runs on, for example:
|
|
54
|
+
* `"desktop"`, `"mobile"`, `"server"`, etc.
|
|
52
55
|
*/
|
|
53
|
-
|
|
56
|
+
type: BrowserTypes;
|
|
54
57
|
|
|
55
58
|
/**
|
|
56
|
-
* The
|
|
59
|
+
* The upstream browser
|
|
57
60
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
upstream?: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Whether the browser supports flags to enable or disable features.
|
|
65
|
+
*/
|
|
66
|
+
accepts_flags?: boolean;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Whether the browser supports extensions.
|
|
70
|
+
*/
|
|
71
|
+
accepts_webextensions?: boolean;
|
|
61
72
|
|
|
62
73
|
/**
|
|
63
74
|
* An optional string containing the URL of the page where feature flags can be changed
|
|
64
75
|
* (e.g. `"about:config"` for Firefox or `"chrome://flags"` for Chrome).
|
|
65
76
|
*/
|
|
66
77
|
pref_url?: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The preview browser's name, for example:
|
|
81
|
+
* `"Nightly"`, `"Canary"`, `"TP"`, etc.
|
|
82
|
+
*/
|
|
83
|
+
preview_name?: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The known versions of this browser.
|
|
87
|
+
*/
|
|
88
|
+
releases: {
|
|
89
|
+
[version: string]: ReleaseStatement;
|
|
90
|
+
};
|
|
67
91
|
}
|
|
68
92
|
|
|
69
93
|
/**
|
|
@@ -126,6 +150,7 @@ export interface ReleaseStatement {
|
|
|
126
150
|
export type SupportStatement =
|
|
127
151
|
| SimpleSupportStatement
|
|
128
152
|
| SimpleSupportStatement[];
|
|
153
|
+
|
|
129
154
|
export type VersionValue = string | boolean | null;
|
|
130
155
|
|
|
131
156
|
/**
|
|
@@ -199,6 +224,13 @@ export interface SimpleSupportStatement {
|
|
|
199
224
|
*/
|
|
200
225
|
value_to_set?: string;
|
|
201
226
|
}[];
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* An optional changeset/commit URL for the revision which implemented the feature in the source code, or the URL to the bug tracking the implementation, for the associated browser; e.g. a https://trac.webkit.org/changeset/
|
|
230
|
+
* https://hg.mozilla.org/mozilla-central/rev/, or https://crrev.com/ URL.
|
|
231
|
+
*/
|
|
232
|
+
impl_url?: string;
|
|
233
|
+
|
|
202
234
|
/**
|
|
203
235
|
* A `boolean` value indicating whether or not the implementation of the sub-feature follows
|
|
204
236
|
* the current specification closely enough to not create major interoperability problems.
|
|
@@ -223,7 +255,7 @@ export interface SimpleSupportStatement {
|
|
|
223
255
|
export type Identifier = PrimaryIdentifier & IdentifierMeta;
|
|
224
256
|
|
|
225
257
|
export interface PrimaryIdentifier
|
|
226
|
-
extends Record<
|
|
258
|
+
extends Record<Omit<string, '__compat'>, Identifier> {}
|
|
227
259
|
|
|
228
260
|
interface IdentifierMeta {
|
|
229
261
|
/**
|
|
@@ -260,8 +292,6 @@ export interface CompatStatement {
|
|
|
260
292
|
*/
|
|
261
293
|
mdn_url?: string;
|
|
262
294
|
|
|
263
|
-
matches?: MatchesBlock;
|
|
264
|
-
|
|
265
295
|
/**
|
|
266
296
|
* Each `__compat` object contains support information.
|
|
267
297
|
*
|
|
@@ -283,12 +313,6 @@ export interface SupportBlock
|
|
|
283
313
|
extends Partial<Record<BrowserNames, SupportStatement>>,
|
|
284
314
|
Partial<Record<string, SupportStatement>> {}
|
|
285
315
|
|
|
286
|
-
export interface MatchesBlock {
|
|
287
|
-
keywords?: string[];
|
|
288
|
-
regex_token?: string;
|
|
289
|
-
regex_value?: string;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
316
|
/**
|
|
293
317
|
* The status property contains information about stability of the feature.
|
|
294
318
|
*/
|
|
@@ -328,7 +352,7 @@ interface CompatDataBrowsers {
|
|
|
328
352
|
}
|
|
329
353
|
|
|
330
354
|
interface CompatDataIdentifiers
|
|
331
|
-
extends Record<
|
|
355
|
+
extends Record<Omit<string, 'browsers'>, PrimaryIdentifier> {
|
|
332
356
|
/**
|
|
333
357
|
* Contains data for each [Web API](https://developer.mozilla.org/docs/Web/API)
|
|
334
358
|
* interface.
|
package/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* This file is a part of @mdn/browser-compat-data
|
|
2
|
-
* See LICENSE file for more information. */
|
|
3
|
-
|
|
4
|
-
/// <reference path="./types.d.ts"/>
|
|
5
|
-
import { CompatData } from './types';
|
|
6
|
-
|
|
7
|
-
// This is necessary to have intellisense in projects which
|
|
8
|
-
// import data from this package.
|
|
9
|
-
declare const compatData: CompatData;
|
|
10
|
-
export = compatData;
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./data.json");
|