@mdn/browser-compat-data 4.2.1 → 5.0.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/index.ts ADDED
@@ -0,0 +1,9 @@
1
+ /* This file is a part of @mdn/browser-compat-data
2
+ * See LICENSE file for more information. */
3
+
4
+ import "./types";
5
+
6
+ import bcd from "./data.json";
7
+
8
+ export default bcd as CompatData;
9
+ export * from "./types";
package/legacynode.mjs ADDED
@@ -0,0 +1,4 @@
1
+ // A small wrapper to allow ESM imports on older NodeJS versions that don't support import assertions
2
+ import fs from 'node:fs';
3
+ const bcd = JSON.parse(fs.readFileSync(new URL('./data.json', import.meta.url)));
4
+ export default bcd;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"main":"index.js","name":"@mdn/browser-compat-data","version":"4.2.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","types":"index.d.ts"}
1
+ {"main":"data.json","exports":{".":"./data.json","./forLegacyNode":"./legacynode.mjs"},"types":"index.ts","name":"@mdn/browser-compat-data","version":"5.0.0","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
@@ -55,6 +55,11 @@ export interface BrowserStatement {
55
55
  */
56
56
  type: BrowserTypes;
57
57
 
58
+ /**
59
+ * The upstream browser
60
+ */
61
+ upstream?: string;
62
+
58
63
  /**
59
64
  * Whether the browser supports flags to enable or disable features.
60
65
  */
@@ -145,6 +150,7 @@ export interface ReleaseStatement {
145
150
  export type SupportStatement =
146
151
  | SimpleSupportStatement
147
152
  | SimpleSupportStatement[];
153
+
148
154
  export type VersionValue = string | boolean | null;
149
155
 
150
156
  /**
@@ -218,6 +224,13 @@ export interface SimpleSupportStatement {
218
224
  */
219
225
  value_to_set?: string;
220
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
+
221
234
  /**
222
235
  * A `boolean` value indicating whether or not the implementation of the sub-feature follows
223
236
  * the current specification closely enough to not create major interoperability problems.
@@ -279,8 +292,6 @@ export interface CompatStatement {
279
292
  */
280
293
  mdn_url?: string;
281
294
 
282
- matches?: MatchesBlock;
283
-
284
295
  /**
285
296
  * Each `__compat` object contains support information.
286
297
  *
@@ -302,12 +313,6 @@ export interface SupportBlock
302
313
  extends Partial<Record<BrowserNames, SupportStatement>>,
303
314
  Partial<Record<string, SupportStatement>> {}
304
315
 
305
- export interface MatchesBlock {
306
- keywords?: string[];
307
- regex_token?: string;
308
- regex_value?: string;
309
- }
310
-
311
316
  /**
312
317
  * The status property contains information about stability of the feature.
313
318
  */
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");